Am 18.01.24 um 10:59 schrieb Thorsten Marquardt via Postfix-users:
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 thors...@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


I found the mistake. The quotes around the bind_dn were causing the trouble.

Bye


Thorsten

_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to