Sign inSign up

b32147/smtp-relay

By b32147

Updated almost 9 years ago

Postfix SMTP relay

Image
0

6.3K

b32147/smtp-relay repository overview

Postfix Mail Relay

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.

This container runs under the s6 supervisor. Docker secrets are supported and the instructions for usage are included in the 'Variables' section.

Running

Run the container with a command similar to the following:

$ docker run -d -h relay.example.com -e SMTP_LOGIN=<username> -e SMTP_PASSWORD=<password> -p 8025:25 b32147/smtp-relay

The container defaults to listening on port 25 but can be set to anything. The above example sets the container on the host's port 8025.

Variables

VariableDefaultDescription
SMTP_LOGINLogin to connect to the external relay (required, otherwise the container fails to start)
SMTP_PASSWORDPassword to connect to the external relay (required, otherwise the container fails to start)
EXT_RELAY_HOSTemail-smtp.us-east-1.amazonaws.comExternal relay DNS name
EXT_RELAY_PORT587External relay TCP port
USE_TLSyesRemote require tls. Might be "yes" or "no"
TLS_VERIFYmayTrust level for checking the remote side cert. (none, may, encrypt, dane, dane-only, fingerprint, verify, secure).
HOST_NAMErelay.example.comA DNS name for this relay container (usually the same as the Docker's hostname)
ACCEPTED_NETWORKS172.16.0.0/12 10.0.0.0/8A network (or a list of networks) to accept mail from

If using Docker Secrets, format the value of the argument as:

  • SMTP_LOGIN=/run/secrets/smtp-login

where smtp-login is the name of the secret created in Docker. This will read the secret at that location (should be /run/secrets/) and assign its contents to the original argument.

Tag summary

Content type

Image

Digest

Size

24.1 MB

Last updated

almost 9 years ago

docker pull b32147/smtp-relay