I saw the recent threads but didn't help for me. Here's my configuration: The domain isn't getting expanded as per logs: Jan 4 08:06:40 vds5 dovecot: [ID 107833 mail.info] IMAP(admin): maildir: data=/var/mail/apps//admin/Maildir # 20080102: /usr/local/dovecot/etc/dovecot.conf listen: *:143 ssl_disable: yes disable_plaintext_auth: no login_dir: /usr/local/dovecot/var/run/dovecot/login login_executable: /usr/local/dovecot/libexec/dovecot/imap-login login_log_format_elements: user=<%n@%d> method=%m rip=%r lip=%l %c login_max_connections: 64 max_mail_processes: 128 mail_location: maildir:/var/mail/apps/%d/%n/Maildir mail_debug: yes auth default: passdb: driver: ldap args: /usr/local/dovecot/etc/dovecot-ldap.conf userdb: driver: static args: uid=vmail gid=vmail home=/var/mail/apps/%d/%n Here's the relevant LDAP configuration: auth_bind = yes pass_attrs = uid=user pass_filter = uid=%n I tried setting the mail_location to: maildir:~/Maildir and explicitly specifying the full path, but still the Maildir is getting created with out the %d. Of course, the user is logging in with "admin at domain.com". Any ideas?
On Fri, 2008-01-04 at 08:12 -0800, Anil wrote:> pass_attrs = uid=user > pass_filter = uid=%nuid=user makes Dovecot change the full username to uid's value, which means it drops the domain. You could probably just leave pass_attrs empty. I don't remember if LDAP lookups are case-insensitive though. If they are, use %Ln and %Ld in your home and mail_location to avoid getting "user" and "User" and "uSer" directories. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080105/b8c70427/attachment-0002.bin>
LDAP will return whatever the LDAP schema is defined as (for the case), which is "uid". I took out the pass_attrs, but didn't appear to be working. I then added: pass_attrs = uid then, it was able to find the domain! http://wiki.dovecot.org/AuthDatabase/LDAP is a bit confusing in the documentation of pass_attrs. IMO, pass_attrs_map is a better name, since its used for mapping attributes from LDAP attributes to Dovecot names. But, if "pass_attrs = uid" is working, what exactly is getting mapped to what? On Jan 4, 2008 4:04 PM, Timo Sirainen <tss at iki.fi> wrote:> On Fri, 2008-01-04 at 08:12 -0800, Anil wrote: > > pass_attrs = uid=user > > pass_filter = uid=%n > > uid=user makes Dovecot change the full username to uid's value, which > means it drops the domain. You could probably just leave pass_attrs > empty. I don't remember if LDAP lookups are case-insensitive though. If > they are, use %Ln and %Ld in your home and mail_location to avoid > getting "user" and "User" and "uSer" directories. > >
> Here's the relevant LDAP configuration: > auth_bind = yes > pass_attrs = uid=user > pass_filter = uid=%n > > I tried setting the mail_location to: maildir:~/Maildir and explicitly > specifying the full path, but still the Maildir is getting created > with out the %d. Of course, the user is logging in with > "admin at domain.com". > > Any ideas?I'll take a stab at it... meaning I could be totally off-base... pass_attrs = uid=user my LDAP attributes look like uid: jhorner mail: jhorner at arinbe.com so my pass_attrs are (among others) pass_attrs = mail=user