Docker image based on https://github.com/mildred/docker-mail/
based on default debian autogenerated 'smarthost' config.
- disabled ipv6
- transport remote_smtp_smarthost - protocol = smtps
- routers: added first router catch_all_outgoing, that redirect all local_domain / MAILNAME mail to %REDIRECT_TO% address (default: [email protected]). Based on http://serverfault.com/questions/164507/basic-exim-configuration-redirect-all-out-bound-emails-to-local-address
run via daemontools http://cr.yp.to/daemontools.html exim default log: /var/log/exim4/mainlog debug log: /var/log/exim/current
if you want to use TLS authorization with smarthost, create passwd.client file in working directory and run docker image with key
-v $pwd:/mnt
init scripts will copy it to /etc/exim4/passwd.client
https://wiki.debian.org/GmailAndExim4
... Gmail provides SMTP under the name smtp.gmail.com . You can get the canonical host names of these servers by running:
$ host smtp.gmail.com smtp.gmail.com is an alias for gmail-smtp-msa.l.google.com. gmail-smtp-msa.l.google.com has address 74.125.127.109 gmail-smtp-msa.l.google.com has address 74.125.127.108
So gmail*.google.com matches all the real host names.
The authentication information for the external SMTP service is stored in /etc/exim4/passwd.client. Run
# editor /etc/exim4/passwd.client
and add the following lines:
*.google.com:[email protected]:y0uRpaSsw0RD
...