To configure the Amazon Web Services (AWS) Simple Email Service (SES) with Postfix Mail Transfer Agent (MTA), you will need to perform the following steps:
Install and configure Postfix on your server. You can refer to the Postfix documentation for instructions on how to do this.
Obtain the necessary AWS access keys to allow Postfix to connect to SES. You will need an AWS access key ID and secret access key.
Modify the Postfix main configuration file, /etc/postfix/main.cf
, to include the following lines:
relayhost = [email-smtp.us-east-1.amazonaws.com]:587 smtp_sasl_auth_enable = yes smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
/etc/postfix/sasl_passwd
file and add the following line to it, replacing <access key ID>
and <secret access key>
with your own AWS access keys:[email-smtp.us-east-1.amazonaws.com]:587 <access key ID>:<secret access key>
postmap
command to create a hashed version of the sasl_passwd
file:postmap /etc/postfix/sasl_passwd
systemctl restart postfix