HUB
Sign inSign up

pure/smtp-relay

By pure

•Updated over 10 years ago

Simple dockerized smtp relay server based on postfix

Image
1

2.8K

pure/smtp-relay repository overview

⁠Simple dockerized smtp relay server based on postfix

Project forked from xadozuk/smtp-relay⁠

You must configure your domain accordingly (reverse DNS, SPF, ...) for mail not to be considered as spam.

⁠Security Consideration

This image has not been extensively tested for security.

Only containers from docker networks and RELAY_NETWORKS can use the smtp relay.

You shouldn't expose the port 25 of this container directly on the Internet.

⁠Usage

  1. First start the smtp relay container
docker run -d --name smtp-relay -e SMTP_HOSTNAME=smtp.domain.tld pure/smtp-relay
  1. Link the smtp relay to another container
docker run -d --link smtp-relay:smtp <image>
  1. Connect to the smtp relay with smtp:25 inside your container.
  2. Enjoy !

⁠Relay for networks

Set environment variable RELAY_NETWORKS to add subnets in postfix configuration (as example for two subnets 10.11.12.0/24, 10.22.32.0/24 and exposing port to host):

  docker run \
    -d \
    -p 25:25 \
    --name smtp-relay \
    -e SMTP_HOSTNAME=smtp.domain.tld \
    -e RELAY_NETWORKS="10.11.12.0/24 10.22.32.0/24" \
    pure/smtp-relay

Tag summary

Content type

Image

Digest

Size

16.8 MB

Last updated

over 10 years ago

docker pull pure/smtp-relay