Timo Boettcher
2005-Jan-10 01:21 UTC
[Dovecot] ldap auth (with user and domain a different places)
Hi, I am trying to use dovecot with my virtual-hosting setup. I have all users in LDAP like uid=user,dc=domain.tld,o=myorganization for the user with the mail-address user at domain.tld. This is also the username that user should use for login, but it is nowhere in the ldap-db in this form together, just user and domain at their own places. Is it possible to authenticate with dovecot against such an ldap-directory? After reading docs and comments in the config-file, I think no, but I am not sure. As I read the source, it is not possible just now, but would be, if I could use %d in the searchbase. Or did I understand something wrong? TIA Timo Boettcher
Peter Clark
2005-Jan-10 04:06 UTC
[Dovecot] ldap auth (with user and domain a different places)
On Monday 10 January 2005 04:21, Timo Boettcher wrote:> I am trying to use dovecot with my virtual-hosting setup. I have > all users in LDAP like uid=user,dc=domain.tld,o=myorganization for > the user with the mail-address user at domain.tld. This is also the > username that user should use for login, but it is nowhere in the > ldap-db in this form together, just user and domain at their own > places. Is it possible to authenticate with dovecot against such an > ldap-directory?If you don't have multiple domains, you could just authenticate the user using %n. E.g., in dovecot-ldap.conf: user_filter = (uid=%n) pass_filter = (uid=%n) If you do have multiple domains, it's not that more complicated: user_filter = (&(uid=%n)(dc=%d)) pass_filter = (&(uid=%n)(dc=%d)) :Peter