Postfix docker image configured for mail.rachael.io. Forwards from `*@rachael.io
and allows me to send mail from gmail firstname.lastname@example.org` (once I've set up the alias at gmail.com).
To use this for yourself, here are the things to replace:
- postfix container username:
- forwarding address: `email@example.com`
Gmail send as
On your box:
Install sasl2-bin on the host machine:
sudo apt install sasl2-bin
Make sure the following is in /etc/default/saslauthd:
OPTIONS="-c -m /var/run/saslauthd"
Configure Gmail to send as `firstname.lastname@example.org
25 unless you've configured their default 587.
Alias option should be checked but keep in mind for testing purposes anything sent from this address will skip the inbox. No, the send as address and username don't have to match.
Run the container
Recommend saving the following as
run in your
Change the hostname and container name if you're not me.
#!/bin/bash docker stop postfix docker rm postfix docker run -d --name=postfix --hostname mail.rachael.io \ -v /var/run/saslauthd:/var/spool/postfix/var/run/saslauthd \ -p 25:25 --restart=always rachaelp/docker-postfix
Last but not least: DNS
Make sure you have MX and A records set up for your
smtp subdomain to your
A generic image with a configuration script so you don't have to manually replace my shit. Really though it's not that hard so it'll probably be a while if ever :)