Alpine based container image for E-MailRelay
50K+
Available Tags:
latest, 2.62.5.22.5.1a2.5.12.52.4.12.42.3Alpine based Docker image for E-MailRelay. You can find more on its website.
Container configuration is done via environment variables and command line arguments. Command line arguments are given directly to emailrelay executable.
To see all command line options of emailrelay command:
docker run --rm dcagatay/emailrelay --help --verbose
Some usage examples are given in docker-compose.yml.
Sample configuration for sending emails from your Gmail account.
Add your credentials to client-auth.txt.
client plain [email protected] gmail-or-app-password
Run the docker container
docker run --rm \
-p "25:25" \
-v "$PWD/client-auth.txt:/client-auth.txt" \
dcagatay/emailrelay --forward-on-disconnect --forward-to smtp.gmail.com:587 --client-tls --client-auth=/client-auth.txt
DEFAULT_OPTSBy default the following arguments are given on runtime. You can overwrite DEFAULT_OPTS environment variable to change or disable this behaviour.
--no-daemon --no-syslog --log --log-time --remote-clients
PORTThe port that E-MailRelay runs on. Default value is 25. If you did TLS configuration you need to set this variable to 587 or something else.
SPOOL_DIRSpool directory for E-MailRelay. No need to change. Default value: /var/spool/emailrelay
SWAKS_OPTSThis variable is used to give options to swaks, it is used on built-in health-check functionality. If you serve with TLS configuration you need to set this variable to -tls. Default value: empty-string
Inside config directory you will find sample files for usage with filter functionality, SMTP client authentication and relay server authentication.
For any further configuration or details, refer to the E-MailRelay documentation.
You can test your configuration with swaks.
echo "This is a test message." | swaks --to [email protected] --from [email protected] --server emailrelay --port 9025
Or use a container, after running the containers in docker-compose.yml you could run the following command to test with swaks and see the test email on localhost:8025.
docker-compose run \
--entrypoint /bin/sh \
emailrelay \
-c 'echo "This is a test message." | swaks --to <[email protected]> --from <[email protected]> --server emailrelay --port 25'
drdaeman/docker-emailrelaybash shell for further scripting.Content type
Image
Digest
sha256:a75ffd988…
Size
37.8 MB
Last updated
almost 2 years ago
docker pull dcagatay/emailrelay