Configure Postfix to use Amazon SES

Install postfix with

Update postfix config with


Add to end of the file

In the above, replace SMTP_SERVER_NAME with your Amazon SES mail server, for example “”, you can see it in your Amazon SES console.


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


Replace with

Amazon SES