Batista R. Harahap

Amazon SES with Sendmail as Relay

Over and over, sendmail keeps getting whacked out of configuration and it's puzzling why this keeps happening. I followed everything at Amazon SES' instruction here with no luck.

So to set things straight once for all, here are the steps to make the changes permanent.

  1. Open up sendmail.mc typically located at /etc/mail
  2. Add FEATURE(`mailertable')dnl below where all the FEATURE() codes are
  3. Add the lines below at the end of file
    • MAILER_DEFINITIONS Maws-email, P=/etc/aws/ses-send-email.pl, F=mDFMuXn, U=mail, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, A=ses-send-email.pl -r -k /etc/aws/aws-credentials -e https://email.us-east-1.amazonaws.com -f $f $u
  4. Save the file
  5. Generate sendmail.cf by doing m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
  6. Open up mailertable typically located in /etc/mail and add .[TAB]aws-email:%0. Replace [TAB] with a real TAB character
  7. Build the mailertable database by doing makemap hash /etc/mail/mailertable < /etc/mail/mailertable
  8. Test the configuration by doing sendmail -bv [email protected]
  9. If all goes well, restart sendmail by doing /etc/init.d/sendmail restart
25 January 2012 by Batista Harahap on amazon | aws | cloud | email | relay | sendmail | ses | simple email service
comments powered by Disqus