To send emails with Postfix and Amazon AWS Simple Email Service (SES) on RHEL/CentOS 8, follow these steps:
sudo yum install postfix
/etc/postfix/main.cf
configuration file, and add the following lines at the end: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:[email-smtp.us-east-1.amazonaws.com]:587 YOUR_AWS_ACCESS_KEY_ID:YOUR_AWS_SECRET_ACCESS_KEY
Replace YOUR_AWS_ACCESS_KEY_ID
and YOUR_AWS_SECRET_ACCESS_KEY
with your AWS access key ID and secret access key, respectively.
sasl_passwd
file:sudo postmap /etc/postfix/sasl_passwd
sudo systemctl restart postfix
sendmail
.