Skip to content

Instantly share code, notes, and snippets.

@gene1wood
Created August 23, 2013 19:52
Show Gist options
  • Save gene1wood/6323301 to your computer and use it in GitHub Desktop.
Save gene1wood/6323301 to your computer and use it in GitHub Desktop.
Steps to switch from sendmail to postfix on Amazon Linux and enable using SES
yum install postfix
alternatives --set mta /usr/sbin/sendmail.postfix
service sendmail stop
chkconfig sendmail off
# https://github.com/mozilla/identity-ops/blob/master/chef/cookbooks/persona-common/recipes/postfix.rb
HISTCONTROL=ignoreboth
USERNAME="usernamegoeshere"
PASSWORD="passwordgoeshere"
echo "email-smtp.us-east-1.amazonaws.com:25 $USERNAME:$PASSWORD" > /etc/postfix/sasl_passwd
/usr/sbin/postmap /etc/postfix/sasl_passwd
cat << 'EOF' >> /etc/postfix/main.cf
relayhost = email-smtp.us-east-1.amazonaws.com:25
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
EOF
service postfix start
chkconfig postfix on
@thahartner
Copy link

Should this not be smtpd_sasl_auth_enable = yes, using smtpd instead of smtp ?

For me this didn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment