# apt-get install postfix
# vim /etc/postfix/sasl_passwd
[smtp.mandrillapp.com] [email protected]:XXXXXXXXXXXXX
# chmod 600 /etc/postfix/sasl_passwd
# postmap /etc/postfix/sasl_passwd
# TLS parameters
#smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
#smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
#smtpd_use_tls=yes
#smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
#smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# enable SASL authentication
smtp_sasl_auth_enable = yes
# tell Postfix where the credentials are stored
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
# use STARTTLS for encryption
#smtp_use_tls = yes
# Mandrill
relayhost = [smtp.mandrillapp.com]
Check that all domain are correctly being set:
cat /etc/hostname
HOSTNAME
cat /etc/mailname
HOSTNAME.localdomain
cat /etc/postfix/main.cf | grep mydest
HOSTNAME.localdomain, localhost.localdomain, localhost
# service postfix reload
Watch log here: /var/log/mail.log