I have set up differently:
I share it because can be useful also for other users
I assume that on Amazon SES you already configured everything
Go in /etc/postfix and add in main.cf:
relayhost = [email-smtp.us-west-2.amazonaws.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_security_level = encrypt
smtp_tls_note_starttls_offer = yes
default_transport = smtp
relay_transport = smtp
smtpd_sasl_type = cyrus
cyrus_sasl_config_path = /etc/postfix/
Create the file sasl_passwd with username and password:
[email-smtp.us-west-2.amazonaws.com]:587 username:password
Create the db file:
postmap /etc/postfix/sasl_passwd
Change permissions
chown 640 /etc/posfix/sasl_passwd*
Restart postfix
systemctl reload postfix
Now you can use localhost in your ERPNext domain configuration for outgoing emails
Links: