Public | Automated Build

Last pushed: 2 years ago
Short Description
Postfix relay with optional rewrite recipient setup (for development/test purpose).
Full Description

Postfix Mail Relay

This is a copy of alterrebe/postfix-relay with the option to rewrite recipients, pointing any recipient to a single e-mail address (useful for development and test of web applications).


  • Postfix, running in a simple relay mode
  • RSyslog

Processes are managed by supervisord, including cronjobs

The container provides a simple proxy relay for environments like Amazon VPC where you may have private servers with no Internet connection
and therefore with no access to external mail relays (e.g. Amazon SES, SendGrid and others). You need to supply the container with your
external mail relay address and credentials. The configuration is tested with Amazon SES.


  • Postfix on 25


  • A DNS name for this relay container (usually the same as the Docker's hostname)
  • ACCEPTED_NETWORKS= A network (or a list of networks) to accept mail from
  • External relay DNS name
  • EXT_RELAY_PORT=25: External relay TCP port
  • SMTP_LOGIN=: Login to connect to the external relay (required, otherwise the container fails to start)
  • SMTP_PASSWORD=: Password to connect to the external relay (required, otherwise the container fails to start)
  • USE_TLS=: Remote require tls. Might be "yes" or "no". Default: no.
  • TLS_VERIFY=: Trust level for checking the remote side cert. (none, may, encrypt, dane, dane-only, fingerprint, verify, secure). Default: may.
  • DEFAULT_RECIPIENT=: Redirect all recipient to a single e-mail. Usefull for development. Disabled by default.


Launch Postfix container:

$ docker run -d -h --name=mailrelay \
    -e SMTP_LOGIN=myLogin \
    -e SMTP_PASSWORD=myPassword \
    -p 25:25 \
Docker Pull Command
Source Repository