Nina, Micha and Franka

LDAP based SMTP AUTH with Exim

Michael Dipper 03.02.2014

The following configuration file needs to be added to /etc/exim4/conf.d/auth/40_exim4_config_ldap:

BASEDN=dc=dipper,dc=info
USERDN=${lookup ldapdn{ldap:///BASEDN?dn?sub?uid=${quote_ldap:$1} }}
ldap_login:
 driver = plaintext
 public_name = LOGIN
 server_prompts = Username:: : Password::
 server_condition = ${if ldapauth {user="USERDN" pass=${quote_ldap:$2} ldap://localhost/}{yes}{no}}
 server_set_id = ${sg{$ldap_dn}{\s+}{}}
 server_advertise_condition = ${if eq{$tls_cipher}{}{}{*}}
 

After the file has been created a refresh of exim config is required, followed by a restart:

update-exim4.conf