| Did this page help you? Yes No Tell us about it... |
To integrate ses-send-email.pl with Sendmail
On your mail server, open the sendmail.cf file. On many systems, this file resides in the /etc/mail directory.
Configure a new mailer: Add the following line to the file, modifying it to reflect your particular situation:
Maws-email, P=/opt/third-party/amazon/ses-send-email.pl, F=mDFMuXn, U=mailuser, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, A=ses-send-email.pl -r -k /opt/third-party/amazon/aws-credentials -e https://email.us-east-1.amazonaws.com -f $f $u
Note the following about this example:
The U parameter must specify a non-root user (i.e., a nonadministrative user). The user "mailuser" is for illustrative purposes only.
The ses-send-email.pl script and the credentials file reside in the /opt/third-party/amazon directory.
The endpoint for communicating with Amazon SES is https://email.us-east-1.amazonaws.com.
You should modify these parameters as appropriate.
Verify that the mailertable feature is enabled. Look for the following line:
FEATURE(`mailertable')dnl
If this line does not exist, you will need to add it.
Save sendmail.cf.
Open the mailertable file. On many systems, this file resides in the /etc/mail directory. If the file does not exist, create it.
Add the following line to send all email using the aws-email mailer:
.<TAB>aws-email:%0
![]() | Note |
|---|---|
Replace |
Build the mailertable database.
makemap hash /etc/mail/mailertable < /etc/mail/mailertable
To verify your configuration, generate a deliverability report:
sendmail -bv user@example.com
In this report, look for the following output:
user@example.com... deliverable: mailer awsemail, host example.com, user user@example.com
Restart Sendmail. At the command line, type the following command and press ENTER.
sudo /etc/init.d/sendmail restart
![]() | Tip |
|---|---|
If you encounter errors when restarting Sendmail, you can restart Sendmail in debug mode:
|
From this point on, your outgoing email is sent via Amazon SES. To test your configuration, send an email message through your Sendmail server, and then verify that arrives at its destination. If the message is not delivered, then check your system's mail log for errors. On many systems, this is the /var/log/mail.log file.
![]() | Tip |
|---|---|
If your mail does not arrive, look in the mail log for the following error:
This message indicates that the SES.pm Perl module does not exist or cannot be found on your system. For more information, refer to the README file that comes with the Amazon SES scripts. |