apt-get install sasl2-bin
START=yes OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
mkdir -p /var/spool/postfix/var/run/saslauthd/ dpkg-statoverride --add root sasl 710 /var/spool/postfix/var/run/saslauthd
MECHANISMS="pam"
apt-get install libsasl2-modules-ldap
MECHANISMS="ldap"
ldap_servers: ldap://ldap0.example.com ldap://ldap1.example.com ldap_search_base: o=example ldap_timeout: 10 ldap_filter: (|(uid=%U)(mail=%u)) ldap_bind_dn: uid=saslauthd,ou=sysaccounts,o=example ldap_password: SASL-LDAP-PW ldap_deref: never ldap_restart: yes ldap_scope: sub ldap_use_sasl: no ldap_start_tls: no ldap_version: 3 ldap_auth_method: bind
pwcheck_method: saslauthd mech_list: login plain
smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_tls_auth_only = yes smtpd_tls_security_level=may smtpd_use_tls = yes
submission inet n - - - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject
adduser postfix sasl