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?
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. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20091012/275bb5fc/attachment-0002.bin>
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 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20091012/93d1327f/attachment-0002.bin>
> 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.
> .., =home=/import/mail/%u/homeAh, using % Expansion works even if returned from an LDAP query? Great. Is this <nothing>=<Dovecot Param>=<Value> form documented somewhere? I mean, is it documented that the LDAP Attribute is allowed to be empty? Thanks.
> .., =home=/import/mail/%u/homeUnfortunately, 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?