Re: [Dovecot] Homedir for sieve/LDAP
On 10/13/2009, Edgar Fuß (e...@math.uni-bonn.de) wrote: > Regarding your response time, sometimes I'm convinced that ,,Timo > Sirainen'' is really a pseudonym for a group of some ten people > operating in 12-hour shifts, half of whose keep hacking on dovecot > around the clock while the other half keep answering stupid and > non-stupid questions around the clock. Rotflmao! I've had similar thoughts on more than one occasion...
Re: [Dovecot] Homedir for sieve/LDAP
> See if this works: > > plugin { > home = /blah/%u > } YES! Thanks! Regarding your response time, sometimes I'm convinced that ,,Timo Sirainen'' is really a pseudonym for a group of some ten people operating in 12-hour shifts, half of whose keep hacking on dovecot around the clock while the other half keep answering stupid and non-stupid questions around the clock.
Re: [Dovecot] Homedir for sieve/LDAP
On Tue, 2009-10-13 at 21:57 +0200, Edgar Fuß wrote: > Wouldn't it be much simpler to either > -- make sieve (optionally) put .dovecot.lda-dupes in sieve_dir > -- have a dovecot.conf home_dir parameter that, like mail_location, may be > overridden by userdb? See if this works: plugin { home = /blah/%u } signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Homedir for sieve/LDAP
> If you're not giving -d parameter to deliver, it doesn't do userdb > lookup at all. Ouch! I seem to be not only blind, but stupid, too. Of course, what should it look up otherwise! However, I would still prefer an easier solution. I just want deliver/Sieve. Sieve wants .dovecot.lda-dupes, therefore it wants a home dir. Since I use userdb ldap, I must fake a home dir in dovecot-ldap.conf. I must now even call deliver with -d. Wouldn't it be much simpler to either -- make sieve (optionally) put .dovecot.lda-dupes in sieve_dir -- have a dovecot.conf home_dir parameter that, like mail_location, may be overridden by userdb?
Re: [Dovecot] Homedir for sieve/LDAP
On Tue, 2009-10-13 at 15:25 +0200, Edgar Fuß wrote: > > .., =home=/import/mail/%u/home > Unfortunately, the whole thing doesn't work. > I'm using Postfix with mailbox_command set to dovecot's deliver. > Now, Postfix seems to use nss to get the user's home dir and passes > this to mailbox_command as HOME. If you're not giving -d parameter to deliver, it doesn't do userdb lookup at all. signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Homedir for sieve/LDAP
On Tue, 2009-10-13 at 12:44 +0200, Edgar Fuß wrote: > > .., =home=/import/mail/%u/home > Ah, using % Expansion works even if returned from an LDAP query? Great. > > Is this == form documented somewhere? I mean, > is it documented that the LDAP Attribute is allowed to be empty? Yeah. http://wiki.dovecot.org/AuthDatabase/LDAP/Userdb signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Homedir for sieve/LDAP
.., =home=/import/mail/%u/home Unfortunately, the whole thing doesn't work. I'm using Postfix with mailbox_command set to dovecot's deliver. Now, Postfix seems to use nss to get the user's home dir and passes this to mailbox_command as HOME. It looks like deliver prefers the environment variable over an LDAP lookup: we have nss_override_attribute_value homeDirectory /tmp in nss_ldap.conf, and deliver uses /tmp as the home directory. The only way it may get /tmp appears to be via nss, but we use userdb ldap. So I think it's the value of HOME set by postfix that deliver uses. Is there a way to override the environment? How would deliver behave if I use something like env HOME= deliver ..., i.e. HOME is set, but empty?
Re: [Dovecot] Homedir for sieve/LDAP
> .., =home=/import/mail/%u/home Ah, using % Expansion works even if returned from an LDAP query? Great. Is this == form documented somewhere? I mean, is it documented that the LDAP Attribute is allowed to be empty? Thanks.
Re: [Dovecot] Homedir for sieve/LDAP
> It doesn't matter if Dovecot's home directories are different from the > users' primary home directories. It's probably even better if they're > different. Yes, I thought so. > http://wiki.dovecot.org/VirtualUsers#homedirs should apply to your use > case as well. Yes, I read that one. But I couldn't figure out from that how to set home with userdb ldap.
Re: [Dovecot] Homedir for sieve/LDAP
On Tue, 2009-10-13 at 00:02 +0200, Edgar Fuß wrote: > Is there an easier way to give lda/sieve a home directory than > setting something along the lines of > user_attrs = ...,uid=home=/import/mail/%$/home > in dovecot-ldap.conf? You could also avoid using "uid" for that and use instead: .., =home=/import/mail/%u/home signature.asc Description: This is a digitally signed message part
Re: [Dovecot] Homedir for sieve/LDAP
On Tue, 2009-10-13 at 00:02 +0200, Edgar Fuß wrote: > We have system users, passdb ldap, userdb ldap, but home directories > are not mounted on the mail server. It doesn't matter if Dovecot's home directories are different from the users' primary home directories. It's probably even better if they're different. http://wiki.dovecot.org/VirtualUsers#homedirs should apply to your use case as well. signature.asc Description: This is a digitally signed message part
[Dovecot] Homedir for sieve/LDAP
I'm somewhat confused regarding Home Directories needed by sieve and setting them for an LDAP userdb. We have system users, passdb ldap, userdb ldap, but home directories are not mounted on the mail server. Now apparently, sieve needs the home directory for .dovecot.lda-dupes. Is there an easier way to give lda/sieve a home directory than setting something along the lines of user_attrs = ...,uid=home=/import/mail/%$/home in dovecot-ldap.conf?