Tested with OpenBSD 5.8
Verify your domain and a sender in AWS SES console . Save your SMTP Settings.
Set up the SMTP authentication details in the mail secrets database (replacing $smtpUsername:$smtpPassword
with the values from step 1)
# touch /etc/mail/secrets # chmod 640 /etc/mail/secrets # chown root:_smtpd /etc/mail/secrets # echo "ses $smtpUsername:$smtpPassword" >> /etc/mail/secrets # makemap /etc/mail/secrets
Configure OpenSMTPD:
# nano /etc/mail/smtpd.conf listen on lo0 table aliases db:/etc/mail/aliases.db table secrets db:/etc/mail/secrets.db accept for local alias <aliases> deliver to mbox accept from local for any relay via tls+auth://ses@email-smtp.us-east-1.amazonaws.com auth <secrets>
Restart OpenSMTPD:
# rcctl restart smtpd
Test it:
# sendmail -v -f verified-sender@verified-domain.com to@example.com Subject: test subject test body ^D
Errors?
watch your line-breaks in smtpd.conf
# smtpd -n
to check for syntax errors in smtpd.conf
Try port 587 if your machine is blocking port 25 (add :587 to end of aws url in smtpd.conf
)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.