Amazon SES with Postfix in Ubuntu

Was looking at but it’s not really working as it’s missing some key commands.

Install packages apt install -y postfix libsasl2-modules\ select ‘no configuration’

Config files

cp /usr/share/postfix/ /etc/postfix/

in /etc/postfix/

smtp_tls_note_starttls_offer = yes 
smtp_tls_security_level = encrypt 
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd 
smtp_sasl_security_options = noanonymous 
relayhost = []:587 
smtp_sasl_auth_enable = yes 
smtp_use_tls = yes 
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt 
mydestination = 

in /etc/postfix/sasl_passwd


Apply configs and restart the service

postmap hash:/etc/postfix/sasl_passwd 
systemctl restart postfix

(optional) Test

sendmail -f 
From: test 
Subject: test 

then check /var/log/mail.log for -snip- status=sent (250 Ok -snip-