[Dovecot] user_attrs seems not to set 'mail'.
Hi, I am using Dovecot 1.1.13 (from a Debian package). I was having problems using user_attrs to set 'mail' and 'home'. Initially I tried: user_attrs = uid=mail=maildir:/var/mail/virtual/users/%$/Maildir/,uid=home=/var/mail/virtual/users/%$/
This appeared to set 'home' but not 'mail'. In the debug lot I see:
May 12 15:24:40 alpha dovecot: auth(default): ldap(X@Y,10.4.4.113):
user search: base=ou=users,dc=Y scope=subtree filter=(& (mail=X@Y)
(|(accountStatus=active) (accountStatus=migrate)) ) fields=uid,uid
May 12 15:24:40 alpha dovecot: auth(default): ldap(X@Y,1.1.1.1):
result: uid(home=/var/mail/virtual/users/%$/)=/var/mail/virtual/users/uid/
May 12 15:24:40 alpha dovecot: auth(default): master out: USER
30688 X@Y home=/var/mail/virtual/users/uid/
Note that 'home' seems to be set on the last line, but not 'mail'. I was hoping to see 'mail=/var/mail/virtual/users/uid/Maildir/'. Next I tried: user_attrs = =mail=maildir:~/Maildir/,uid=home=/var/mail/virtual/users/%$/
Now I see:
May 12 15:31:28 alpha dovecot: auth(default): ldap(X@Y,1.1.1.1): user
search: base=ou=users,dc=Y scope=subtree filter=(& (mail=X@Y)
(|(accountStatus=active) (accountStatus=migrate)) ) fields=uid
May 12 15:31:28 alpha dovecot: auth(default): ldap(X@Y,1.1.1.1):
result: uid(home=/var/mail/virtual/users/%$/)=/var/mail/virtual/users/uid/
May 12 15:31:28 alpha dovecot: auth(default): master out: USER
30712 X@Y home=/var/mail/virtual/users/uid/ mail=maildir:~/Maildir/
Now both 'home' and 'mail' are set, which is what I want. This means the following lines are not synonymous: user_attrs = uid=mail=maildir:/var/mail/virtual/users/%$/Maildir/,uid=home=/var/mail/virtual/users/%$/ user_attrs = =mail=maildir:~/Maildir/,uid=home=/var/mail/virtual/users/%$/
Either I misunderstand the documentation for user_attrs or there is a bug. Assuming the former, can somebody please explain what I am doing wrong?
Thanks,
Ian
On Tue, 2009-05-12 at 18:04 +0100, ian@comtek.co.uk wrote:
Hi, I am using Dovecot 1.1.13 (from a Debian package). I was having problems using user_attrs to set 'mail' and 'home'. Initially I tried: user_attrs = uid=mail=maildir:/var/mail/virtual/users/%$/Maildir/,uid=home=/var/mail/virtual/users/%$/
You can't currently use the same LDAP field twice. I guess I could make it give an error message instead. Hopefully some day this will be supported though.
Note that 'home' seems to be set on the last line, but not 'mail'. I was hoping to see 'mail=/var/mail/virtual/users/uid/Maildir/'. Next I tried: user_attrs = =mail=maildir:~/Maildir/,uid=home=/var/mail/virtual/users/%$/
You can also not set "mail" here and instead just set mail_location=~/Maildir setting.
You can't currently use the same LDAP field twice. I guess I could make it give an error message instead. Hopefully some day this will be supported though.
Ah, okay. An error message would be really useful. We were scratching our heads about that for a while!
Note that 'home' seems to be set on the last line, but not 'mail'. I was hoping to see 'mail=/var/mail/virtual/users/uid/Maildir/'. Next I tried: user_attrs = =mail=maildir:~/Maildir/,uid=home=/var/mail/virtual/users/%$/
You can also not set "mail" here and instead just set mail_location=~/Maildir setting.
Yes, in our case that should work.
Thanks,
Ian
participants (2)
-
ian@comtek.co.uk
-
Timo Sirainen