Configure Postfix to use Amazon SES

Install postfix with

Update postfix config with

Edit

Add to end of the file

In the above, replace SMTP_SERVER_NAME with your Amazon SES mail server, for example “email-smtp.us-east-1.amazonaws.com”, you can see it in your Amazon SES console.

Run

Replace SMTP_SERVER_NAME, SMTP_USERNAME and SMTP_PASSWORD with your actual credentials.

Now run

Restart postfix

You can test mail working with

For sending from Apache, you may need to set myorigin in postfix confgiration with your veirfied domain. This can be done by editing

You can verify myorgin with

Sending Mail from Amazon EC2

When sending email from Amazon EC2, it rejected with

Problem is solved by editing

Find

Replace with

Amazon SES