[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?
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.
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.
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
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 <nothing>=<Dovecot Param>=<Value> form documented somewhere? I mean, is it documented that the LDAP Attribute is allowed to be empty?
.., =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?
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.
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?
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 }
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.
On 10/13/2009, Edgar Fuß (ef@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...
participants (3)
-
Charles Marcus
-
Edgar Fuß
-
Timo Sirainen