[Dovecot] user_attrs seems not to set 'mail'.

ian at comtek.co.uk ian at comtek.co.uk
Tue May 12 20:04:16 EEST 2009


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 at Y,10.4.4.113): 
user search: base=ou=users,dc=Y scope=subtree filter=(& (mail=X at Y) 
(|(accountStatus=active) (accountStatus=migrate)) ) fields=uid,uid
   May 12 15:24:40 alpha dovecot: auth(default): ldap(X at 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 at 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 at Y,1.1.1.1): user 
search: base=ou=users,dc=Y scope=subtree filter=(& (mail=X at Y) 
(|(accountStatus=active) (accountStatus=migrate)) ) fields=uid
   May 12 15:31:28 alpha dovecot: auth(default): ldap(X at 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 at 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






More information about the dovecot mailing list