[Dovecot] virtual domains/users and LDAP
I have two suffixes in LDAP with users, e.g. ou=People, o=example.com ou=People, o=somethingelse.com
I have the following two users: dn: uid=test1, ou=People, o=example.com uid: test1 mail: test@gmail.com
dn: uid=test2, ou=People, o=somethingelse.com mail: test@yahoo.com uid: test2
The users login to IMAP as: test1@examle.com and test2@somethingelse.com.
Here's an (excerpt) of the dovecot.conf file I am using:
auth_bind = yes base = ou=People,o=%d scope = onelevel
pass_attrs = mail=user pass_filter = (uid=%n)
userdb static { args = uid=vmail gid=vmail home=/var/mail/apps/%d/%n }
The problem I am seeing when the user logs in, the home dir is getting created incorrectly:
Jan 3 14:08:12 vds5 dovecot: [ID 107833 mail.info] imap-login: Login: user=test@gmail.com, method=PLAIN, rip=, lip= Jan 3 14:08:12 vds5 dovecot: [ID 107833 mail.info] IMAP(test@gmail.com): Effective uid=500, gid=500, home=/var/mail/apps/gmail.com/test Jan 3 14:08:12 vds5 dovecot: [ID 107833 mail.info] IMAP(test@gmail.com): maildir: data=/var/mail/apps/gmail.com/test/Maildir ...
I was expecting it to create the home dir under: /var/mail/apps/example.com/test1, since that is what they are logging in with.
Any ideas?
I am actually surprised that it even let me login with this configuration, something looks odd in this setup. :)
Thanks, Anil
On Thu, 2008-01-03 at 14:28 -0800, Anil wrote:
Here's an (excerpt) of the dovecot.conf file I am using:
auth_bind = yes base = ou=People,o=%d scope = onelevel
pass_attrs = mail=user pass_filter = (uid=%n)
userdb static { args = uid=vmail gid=vmail home=/var/mail/apps/%d/%n }
The problem I am seeing when the user logs in, the home dir is getting created incorrectly:
Jan 3 14:08:12 vds5 dovecot: [ID 107833 mail.info] imap-login: Login: user=test@gmail.com, method=PLAIN, rip=, lip=
Apparently the bind succeeds with the ou=People,o=gmail.com. auth_debug=yes might show something useful.
Or have you enabled auth cache? v1.0.10 fixed a bug related to this.
I was expecting it to create the home dir under: /var/mail/apps/example.com/test1, since that is what they are logging in with.
They're logging in with gmail.com domain, so it creates gmail.com.
participants (2)
-
Anil
-
Timo Sirainen