Topic: OpenVPN auth LDAP with iRedMail slapd
I am trying to get OpenVPN 2.1.3-2 with openvpn-auth-ldap 2.0.3-1 to authenticate against slapd 2.4.23-7.2 on up-to-date Debian Squeeze and iRedMail 0.8.0.
/etc/dovecot/dovecot-ldap.conf (generated by iRedMail) has:
user_filter = (&(objectClass=mailUser)(accountStatus=active)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
/etc/openvpn/auth/auth-ldap.conf has:
BaseDN ((copied from /etc/dovecot/dovecot-ldap.conf)) SearchFilter "(&(objectClass=mailUser)(accountStatus=active)(enabledService=vpn)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))"
openvpn log:
LDAP search failed: Insufficient access
LDAP user "postmaster@X.Y" was not found.
...PLUGIN_CALL: POST /usr/lib/openvpn/openvpn-auth-ldap.so/PLUGIN_AUTH_USER_PASS_VERIFY status=1
...PLUGIN_CALL: plugin function PLUGIN_AUTH_USER_PASS_VERIFY failed with status 1: /usr/lib/openvpn/openvpn-auth-ldap.so
slapd log:
SRCH base="o=domains,dc=X,dc=Y" scope=2 deref=0 filter="(&(objectClass=mailUser)(accountStatus=active)(enabledService=vpn)(|(mail=postmaster@X.Y)(&(enabledService=shadowaddress)(shadowAddress=postmaster@X.Y))))"
SEARCH RESULT tag=101 err=50 nentries=0 text=
Can anyone suggest a better searchfilter, or ask after other log lines?
P.S. The mail user has enabledService vpn according to phpldap.
P.P.S. the mail use is mail=postmaster@X.Y,ou=Users,domainName=X.Y,o=domains,dc=X,dc=Y
----
Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.