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.
- Open up
sendmail.mc
typically located at/etc/mail
- Add
FEATURE(`mailertable’)dnl
below where all theFEATURE()
codes are - 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
- Save the file
- Generate
sendmail.cf
by doingm4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
- Open up
mailertable
typically located in/etc/mail
and add.[TAB]aws-email:%0
. Replace[TAB]
with a real TAB character - Build the
mailertable
database by doingmakemap hash /etc/mail/mailertable < /etc/mail/mailertable
- Test the configuration by doing
sendmail -bv test-email@domain.com
- If all goes well, restart sendmail by doing
/etc/init.d/sendmail restart