Public | Automated Build

Last pushed: 9 days ago
Short Description
Postfix docker image configured for Check the README to reconfigure.
Full Description


Postfix docker image configured for Forwards from `*@rachael.iotorachael.passov+rachaelio@gmail.comand allows me to send mail from gmail` (once I've set up the alias at

To use this for yourself, here are the things to replace:

  1. hostname: and
  2. postfix container username: rae
  3. forwarding address: ``

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 `, userrae, port25`.

That's whatever@yourhostname, user yourusername, port 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 $HOME directory.
Change the hostname and container name if you're not me.

docker stop postfix
docker rm postfix
docker run -d --name=postfix --hostname \
        -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 mail subdomain (the A record should point to the host box running this container), and a CNAME from your smtp subdomain to your mail subdomain.


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 :)

Docker Pull Command
Source Repository