black and gray digital device

Resetting AWS SES Credentials On An EC2 Instance Running Postfix

The SaaS SLP service , known internally as MySLP, uses AWS Simple Email Service (SES) for processing outbound email. AWS deprecated an older SMTP user account that was being used by Postfix on the MySLP application cluster causing outbound email messaging to fail. Below are the steps for resolution.

Create New SMTP Credentials

Through AWS SES use the Create SMTP Credentials link to create a new IAM user with a hashed username and password as well as the proper SES policy to allow sending email.

When this process finished it will provide the username and password hash ONE TIME. Make sure to copy this information and/or download the CSV with the credentials when offered.

Update Postfix Credentials On The Cluster Image

Spin up the current cluster image for the MySLP servers. Login as a privileged user.

Go to /etc/postfix

Edit the sasl_passwd file and replace the username and password.

Hash the password.

Restart postfix.

cd /etc/postfix
sudo vim sasl_passwd
..type stuff.. then exit the editor
sudo postmap -v hash:/etc/postfix/sasl_passwd
sudo systemctl restart postfix

Restart The Cluster With The New Image

Exit the cluster image instance, stop the instance, and create an AMI image from it.

Login to AWS EC2, update scaling group to use the new image.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.