Before today I has integrated Amazon SES with postfix using stunnel. But today I have integrated Amazon SES with Postfix without stunnel.

To integrate Amazon SES with Potsfix I have followed the Amazon documentations. Next I describe the basic steps to integrate Amazon SES with Postfix in Ubuntu 12.04TLS.

1. Configure /etc/postfix/main.cf


# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

 

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

smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

 

2. Edit /etc/postfix/sasl_password and add the folowwing lines repleacing USERNAME:PASSWORD for your credentials.


email-smtp.us-east-1.amazonaws.com:25 USERNAME:PASSWORD
ses-smtp-prod-335357831.us-east-1.elb.amazonaws.com:25 USERNAME:PASSWORD

 
3. Create a encryptation file

postmap hash:/etc/postfix/sasl_passwd

 
4. Tell Postfix where to find CA certificate


postconf -e 'smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt'