Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save junaid18183/1997537207891dea1821056b40bfc37c to your computer and use it in GitHub Desktop.
Save junaid18183/1997537207891dea1821056b40bfc37c to your computer and use it in GitHub Desktop.
Relaying mail through AWS SES | Chef + Postfix Cookbook + Sasl
HOWTO: Use the Postfix Chef Cookbook to have your EC2 server relay all mail through AWS SES.
node.default['postfix']['mailtype'] = "master"
node.override['postfix']['main']['relayhost'] = "[email-smtp.us-west-2.amazonaws.com]:25"
node.default['postfix']['main']['smtp_sasl_auth_enable'] = "yes"
node.default['postfix']['main']['smtp_sasl_password_maps'] = "hash:/etc/postfix/sasl_passwd"
node.default['postfix']['main']['smtp_sasl_security_options'] = "noanonymous"
node.default['postfix']['main']['smtpd_use_tls'] = "yes"
node.default['postfix']['main']['mynetworks'] = "42.42.42.0/24, 127.0.0.1/32"
node.default['postfix']['main']['mydomain'] = "solongandthanksforallthefi.sh"
node.default['postfix']['main']['myorigin'] = "solongandthanksforallthefi.sh"
node.default['postfix']['main']['smtp_tls_security_level'] = "encrypt"
node.default['postfix']['main']['smtp_tls_note_starttls_offer'] = "yes"
node.override['postfix']['sasl']['smtp_sasl_user_name'] = "DONTPANIC"
node.override['postfix']['sasl']['smtp_sasl_passwd'] = "DONTPANIC"
include_recipe "postfix"
include_recipe "postfix::sasl_auth"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment