Authenticate Postfix through Dovecot with slightly different LDAP settings
Hi,
I'm setting up a server with Dovecot (2.2.2) and Postfix (3.1.0). Dovecot authenticates against LDAP and Postfix uses Dovecots SASL. That already works fine. But I would like to have slightly different LDAP settings for Dovecot and Postfix. Current setup:
passdb { driver = ldap args = /etc/dovecot/dovecot-ldap.conf.ext } userdb { driver = ldap args = /etc/dovecot/dovecot-ldap.conf.ext }
Excerpt from dovecot-ldap.conf.ext:
user_filter = (&
(objectClass=gosaMailAccount)
(allowedServices=*I*)
(uid=%u)
)
I wanted to have sparate LDAP filters (allowedServices=*I* for Dovecot and allowedServices=*S* for Postfix), to be able to disable SMTP and IMAP independently. Does anybody know a way to separate those settings?
Thanks in advance, Jakob
On 15.11.2017 14:16, Jakob Lenfers wrote:
Hi,
I'm setting up a server with Dovecot (2.2.2) and Postfix (3.1.0). Dovecot authenticates against LDAP and Postfix uses Dovecots SASL. That already works fine. But I would like to have slightly different LDAP settings for Dovecot and Postfix. Current setup:
passdb { driver = ldap args = /etc/dovecot/dovecot-ldap.conf.ext } userdb { driver = ldap args = /etc/dovecot/dovecot-ldap.conf.ext }
Excerpt from dovecot-ldap.conf.ext:
user_filter = (&
(objectClass=gosaMailAccount)
(allowedServices=*I*)
(uid=%u)
)I wanted to have sparate LDAP filters (allowedServices=*I* for Dovecot and allowedServices=*S* for Postfix), to be able to disable SMTP and IMAP independently. Does anybody know a way to separate those settings?
Thanks in advance, Jakob
You can use %1Ls variable to produce I or S.
Aki
On 15.11.2017 13:18, Aki Tuomi wrote:
On 15.11.2017 14:16, Jakob Lenfers wrote:
user_filter = (&
(objectClass=gosaMailAccount)
(allowedServices=*I*)
(uid=%u)
)I wanted to have sparate LDAP filters (allowedServices=*I* for Dovecot and allowedServices=*S* for Postfix), to be able to disable SMTP and IMAP independently. Does anybody know a way to separate those settings? You can use %1Ls variable to produce I or S.
Genius, thanks, that works!
Thanks, Jakob
participants (2)
-
Aki Tuomi
-
Jakob Lenfers