This is a Docker Image containing the Postfix MTA, preconfigured so it is easy to use as mail relay for docker other container.
The behaviour of the mail relay can be controlling using a few environment variables:
PF_HOSTNAME
: The hostname of the mail relay. Used for the HELO commandPF_RELAY_HOST
: Another mail server, to which the mails should be relayedPF_USERNAME
: SMTP Username for the relayPF_PASSWORD
: SMTP Password for the relayPF_ALLOWED_NETWORK
: Space separated list of allowed networks (cf. mynetworks)
If PF_USERNAME
and PF_PASSWORD
are not provided application do not need to authenticate to the the Relay Server.
Simply run
docker build -t freakybytes/postfix-relay .