I learned about hectane from https://github.com/docker-library/wordpress/issues/30#issuecomment-145320414.
I installed the WordPress plugin, and have the following service in my docker-compose.yml:
mail:
image: hectane/hectane:0.3.1
environment:
LOGFILE: /dev/stderr
DEBUG: 1
volumes:
- mail:/data
networks:
- external
WordPress successfully queues mail with hectane:
$ ls -la $(docker volume inspect website_mail --format {{.Mountpoint}})
total 12
drwxr-xr-x 3 root root 4096 Sep 12 00:40 .
drwxr-xr-x 3 root root 4096 Sep 12 00:39 ..
drwx------ 2 root root 4096 Sep 12 00:40 6708342d-b706-499a-b51e-69dca2499388
But hectane cannot connect to the SMTP servers:
$ docker logs $(docker container ls --filter name=mail --format {{.Names}})
time="2019-09-12T00:51:45Z" level=info msg="loaded 1 message(s) from /data" context=Queue
time="2019-09-12T00:51:45Z" level=info msg="message received in queue" context=<my domain>
time="2019-09-12T00:51:45Z" level=debug msg="connecting to mail server" context=<my domain>
time="2019-09-12T00:51:45Z" level=debug msg="unable to connect to gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:51:47Z" level=debug msg="unable to connect to alt1.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:51:48Z" level=debug msg="unable to connect to alt2.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:51:48Z" level=debug msg="unable to connect to alt3.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:51:49Z" level=debug msg="unable to connect to alt4.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:51:49Z" level=error msg="unable to connect to a mail server" context=<my domain>
time="2019-09-12T00:53:49Z" level=debug msg="connecting to mail server" context=<my domain>
time="2019-09-12T00:53:49Z" level=debug msg="unable to connect to gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:53:51Z" level=debug msg="unable to connect to alt1.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:53:52Z" level=debug msg="unable to connect to alt2.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:53:52Z" level=debug msg="unable to connect to alt3.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:53:53Z" level=debug msg="unable to connect to alt4.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:53:53Z" level=error msg="unable to connect to a mail server" context=<my domain>
time="2019-09-12T00:57:53Z" level=debug msg="connecting to mail server" context=<my domain>
time="2019-09-12T00:57:53Z" level=debug msg="unable to connect to gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:57:55Z" level=debug msg="unable to connect to alt1.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:57:56Z" level=debug msg="unable to connect to alt2.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:57:56Z" level=debug msg="unable to connect to alt3.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:57:57Z" level=debug msg="unable to connect to alt4.gmr-smtp-in.l.google.com" context=<my domain>
time="2019-09-12T00:57:57Z" level=error msg="unable to connect to a mail server" context=<my domain>
What other setup is necessary to get hectane working?