Download the latest Cyrus SASL2 package.
On Debian/Ubuntu systems you can do
% sudo apt-get install sasl2-bin libsasl2-modules
Edit: /etc/postfix/sasl/smtpd.conf
mech_list: PLAIN LOGIN ANONYMOUS pwcheck_method: saslauthd
Edit: /etc/default/saslauthd and check the following lines
START=yes MECHANISMS="rimap" MECH_OPTIONS="localhost"
saslauthd will make an additional IMAP connection to local IMAP server every time postfix attempts to authenticate a user.
On Redhat-like systems the saslauthd config is done via /etc/sysconfig/saslauthd :
SOCKETDIR=/var/run/saslauthd MECH=rimap FLAGS="-O 127.0.0.1"
Follow the doc/README.postfix in the source distribution for DBMail and first make sure delivery works as required.
Activate SMTP/AUTH by setting some parameters. One way to do that is by editing main.cf which for Debian/Ubuntu resides in /etc/postfix/main.cf
smtpd_sasl_auth_enable = yes
this will activate smtp-auth
smtpd_recipient_restrictions = permit_mynetworks reject_invalid_hostname reject_non_fqdn_sender reject_non_fqdn_recipient reject_unknown_recipient_domain reject_unknown_sender_domain reject_unauth_pipelining permit_sasl_authenticated reject_unauth_destination
Here the actual settings for this parameter may be different in your case. But make sure the 'permit_sasl_authenticated' option is in there, before the 'reject_unauth_destination' option.
Restart saslauthd and postfix, and SMTP-Auth should work!
/etc/init.d/saslauthd restart /etc/init.d/postfix reload