Public | Automated Build

Last pushed: 8 months ago
Short Description
Docker image for simple customizable smart host configured with postfix.
Full Description

Postfix Smart Host Docker

Smart Host (or Relay Host) is server which routes all outgoing messages to specified remote domain.
You can use it as mail server for applications which do not support SASL authentication or for other needs.

Customization of variable parameters as relay server, mail account credentials and allowed IP addresses or networks is done with docker environment variables.


For full installation use:

git clone
cd smart-host-postfix-docker
docker build -t lirt/smart-host-postfix-docker .

Or download docker image from dockerhub with:

docker pull lirt/smart-host-postfix-docker


Run with following environment variables:

  • HOSTNAME: hostname for this docker smart host (eg.
  • RELAY_HOST: mail server where we need to authenticate user account (eg.
  • USERNAME: account username to log to (eg.
  • PASSWORD: account password (eg. abcd1234)
  • MYNETWORKS: Networks which are allowed to send mail through this smart-host (eg. "")

Example run

docker run \
   -h \
   -p 25:25 \
   -e \
   -e \
   -e \
   -e PASSWORD=abcd1234 \
   -e MYNETWORKS="" \
   -d lirt/smart-host-postfix-docker
Docker Pull Command

Comments (0)