- apt-get install exim4
- dpkg-reconfigure exim4-config
- Select: internet site; mail is sent and received directly using SMTP
- IP-addresses to listen on for incoming SMTP connections:
- 127.0.0.1 ; ::1 (it's the default anyways)
- Take most defaults
- Split configuration into small files?
- NO!
- lsof -nP -i :25
- Make sure you aren't allowing the world to connect!
- 127.0.0.1:25 is good
- AWS -> SES
- Verified Senders
- Verify one of your existing email addresses
- SMTP Settings
- Create My SMTP Credentials
- Use downloaded credentials.csv file contents for below steps
- Edit /etc/exim4/exim4.conf.template
- Find ALREADY existing line "public_name = LOGIN"
- change to "public_name = OLD_LOGIN"
- Add below sections to existing sections in the file
- Use info from credentials.csv in place of pointy brackets, e.g. <aws_id>
- service exim4 stop
- service exim4 start
- tail -F /var/log/exim4/mainlog
- Keep this running in another terminal while you do the below
- echo test001 | mail -r <email_you_verified_with_aws> -s "Test subject" <a_test_email_address>
- e.g. echo test001 | mail -r bob@myawsverified.com -s test bob@testaccount.com
- See this to set the "From:" field to your verified user for every email sent from your system
begin routers
send_via_ses:
driver = manualroute
domains = ! +local_domains
transport = ses_smtp
route_list = * email-smtp.us-east-1.amazonaws.com
begin transports
ses_smtp:
driver = smtp
port = 25
hosts_require_auth = $host_address
hosts_require_tls = $host_address
begin authenticators
ses_login:
driver = plaintext
public_name = LOGIN
client_send = : <aws_id> : <aws_secret>
No comments:
Post a Comment
Note: only a member of this blog may post a comment.