[Dovecot] user_filter problem
Hello,
I have a little bit complex setup. I'm trying to use dovecot lmtp and pop3 with user information stored in the LDAP database. The main problem is that email address and pop3 username are different for every mailbox (I cannot change this behaviour, because thousands of people already configured their email client for such a setup). So in my situation, user_filter for lmtp should be: user_filter=(mail=%u), but for pop3 it should be: user_filter=(cn=%u).
Please, see:
E-mail address: john@example.com pop3 username: 0005a pop3 password: very_secure_password
And ldap ldiff for this mailbox:
dn: cn=0005a,dc=example.com,ou=localmail,ou=mail uid: 0005a mail: john@example.com mailbox: /data/mail/example.com/0005a/Maildir/ sn: 0005a description: testing homeDirectory: /data/mail/example.com/0005a cn: 0005a userPassword:: e0NSWVBUfWxpOXBVaEw5SWJkRWc= objectClass: inetOrgPerson objectClass: CourierMailAccount objectClass: top
I think I need to use different user_filter for lmtp and pop3, but it's not possible or I cannot find how to do it. Please, help!
-- Best regards, dammit
On 17.2.2012, at 17.39, sanito@progresas.lt wrote:
I have a little bit complex setup. I'm trying to use dovecot lmtp and pop3 with user information stored in the LDAP database. The main problem is that email address and pop3 username are different for every mailbox (I cannot change this behaviour, because thousands of people already configured their email client for such a setup). So in my situation, user_filter for lmtp should be: user_filter=(mail=%u), but for pop3 it should be: user_filter=(cn=%u).
Can't it be either?
user_filter = (|(mail=%u)(cn=%u))
I think I need to use different user_filter for lmtp and pop3, but it's not possible or I cannot find how to do it. Please, help!
With v2.x you can also do something like:
protocol lmtp { userdb { driver = ldap args = dovecot-ldap-lmtp.conf.ext } } protocol !lmtp { userdb { driver = ldap args = dovecot-ldap.conf.ext } }
participants (2)
-
sanito@progresas.lt
-
Timo Sirainen