James Devine
2012-Jul-17 23:04 UTC
[Dovecot] Different LDAP filters for different protocols
Is it possible to query LDAP differently for different protocols? I am using dovecot for both pop3/imap and lmtp deliveries and there are different enable flags in ldap for them. I tried wrapping user_filter inside the protocols in the file dovecot-ldap.conf.ext as shown below but this didn't seem to work. protocol lmtp { user_filter (&(objectClass=posixAccount)(cn=%u)(active=1)(msmtp=1)) } protocol imap { user_filter = (&(objectClass=posixAccount)(cn=%u)(active=1)(mpop=1)) } protocol pop3 { user_filter = (&(objectClass=posixAccount)(cn=%u)(active=1)(mpop=1)) }
James Devine
2012-Jul-17 23:18 UTC
[Dovecot] Different LDAP filters for different protocols
nevermind I think I got it, wrapping the ldap userdb in the protocols and making a copy of the ldap configuration files seems to work On Tue, Jul 17, 2012 at 5:04 PM, James Devine <fxmulder at gmail.com> wrote:> Is it possible to query LDAP differently for different protocols? I am > using dovecot for both pop3/imap and lmtp deliveries and there are > different enable flags in ldap for them. I tried wrapping user_filter > inside the protocols in the file dovecot-ldap.conf.ext as shown below but > this didn't seem to work. > > protocol lmtp { > user_filter > (&(objectClass=posixAccount)(cn=%u)(active=1)(msmtp=1)) > } > > protocol imap { > user_filter > (&(objectClass=posixAccount)(cn=%u)(active=1)(mpop=1)) > } > > protocol pop3 { > user_filter > (&(objectClass=posixAccount)(cn=%u)(active=1)(mpop=1)) > } > >