Monday, November 30, 2020

OpenSMTPD and ldap+tls

Hello
Is there a way to make opensmtpd work
with ldap aliases over a secure connection?

I do not know where to find working examples of this
My current /etc/mail/ldap.conf look like this:
1 url>---->------->-------ldap://ldap1.mydomain.ru
2 basedn>->------->-------dc=mydomain,dc=ru
3 username>------->-------cn=service,dc=mydomain,dc=ru
4 password>------->-------passpasspass
5
6 domain_filter>-->-------(&(objectClass=domain)(dc=%s))
7 domain_attributes>------dc
8
9 credentials_filter>-----(&(objectClass=posixAccount)(uid=%s))
10 credentials_attributes>-uid,userPassword
11
12 userinfo_filter>>-------(&(objectClass=posixAccount)(uid=%s))
13 userinfo_attributes>----uid,uidNumber,gidNumber,homeDirectory
14
15 alias_filter>--->-------(&(objectClass=nisMailAlias)(cn=%s))
16 alias_attributes>-------rfc822MailMember

ldapd daemon is set up on another host to work over tls and ssl and
working correctly.

If I change url to ldaps://ldap1.mydomain.ru
or to ldap+tls://ldap1.mydomain.ru
then smtpd -dv shows:
"""
_____________________________________________
vdomains[50952]: warn: ldap_parse_url fail
vdomains[50952]: warn: ldap_connect error
vdomains[50952]: fatal: failed to connect
"""
_____________________________________________

--
Best Regards
Maksim Rodin

No comments:

Post a Comment