Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
LDAP URI supported by Postfix

From: Павел Бычихин (pavelhte.vl.net.ua)
Date: Mon Jun 11 2012 - 02:04:59 CDT


Does Postfix support LDAP URI like ldapsearch?
Name of my domain is "testdomain.local".
With ldapsearch in order to connect to AD controller I use next URI: ldap:///dc%3Dtestdomain%2Cdc%3Dlocal
All goes ok: ldapsearch looks for SRV records in DNS and successfully connects to controller.
But in Postfix this URI doesn't work. My config:

version = 3
server_host = ldap:///dc%3Dtestdomain%2Cdc%3Dlocal
bind = sasl
sasl_mechs = GSSAPI
search_base = cn=users,dc=testdomain,dc=local
scope = one
query_filter = (cn=%s)
result_attribute = name

With this config I see an error:
postmap: warning: dict_ldap_connect: Unable to bind to server ldap:///dc%3Dtestdomain%2Cdc%3Dlocal with dn empty or implicit: -1 (Can't contact LDAP
postmap: fatal: table ldap:./test_postfix_msdcs.cf: query error: Connection reset by peer

If I use "server_host = dc1", then all works fine ("dc1" is the short name of my domain controller).
Please, tell me, whats wrong with my config?
Thanks in advance.

С уважением,
Павел Бычихин
тел. (057) 758-84-12