[Samba] samba dc as source for postfix ldap maps
Thorsten Marquardt
Marquardt at koehler-bracht.de
Thu Jan 18 09:32:19 UTC 2024
Hi,
I want to use my samba ad dc as the source for several postfix maps
(virtual mailboxes, aliases and so on) but have trouble to authenticate
against the ldap server.
My config for ldap-aliases.cf:
server_host = ldap://pi4.fritz.box
search_base = OU=FritzUser,DC=fritz,DC=box
start_tls = yes
version = 3
bind = yes
bind_dn = "CN=postfix,OU=FritzUser,DC=fritz,DC=box"
bind_pw = postfixpw
timeout=60
tls_require_cert = yes
tls_ca_cert_dir = /etc/ssl/certs
tls_cert = /etc/samba/tls/pi4cert.pem
tls_key = /etc/samba/tls/pi4key.pem
But postmap fails with:
# postmap -q thorsten at fritz.box ldap:/etc/postfix/ldap-aliases.cf
postmap: warning: dict_ldap_connect: Unable to bind to server
ldap://pi4.fritz.box with dn "CN=postfix,OU=FritzUser,DC=fritz,DC=box":
49 (Invalid credentials)
postmap: fatal: table ldap:/etc/postfix/ldap-aliases.cf: query error:
Application error
Whereas ldapsearch performs:
ldapsearch -D "CN=postfix,OU=FritzUser,DC=fritz,DC=box" -w postfixpw -ZZZ
# extended LDIF
#
# LDAPv3
# base <DC=fritz,DC=box> (default) with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# NTDS Quotas, fritz.box
dn: CN=NTDS Quotas,DC=fritz,DC=box
...
result: 0 Success
# numResponses: 309
# numEntries: 305
# numReferences: 3
What am I doing wrong?
Thanks in advance
Thorsten
More information about the samba
mailing list