Sign inSign up

dcagatay/emailrelay

By dcagatay

•Updated almost 2 years ago

Alpine based container image for E-MailRelay

Image
Web servers
1

50K+

dcagatay/emailrelay repository overview

⁠Docker image for E-MailRelay (dcagatay/emailrelay⁠)

Docker Pulls GitHub tag

Available Tags:

List of all image tags⁠

  • latest, 2.6
  • 2.5.2
  • 2.5.1a
  • 2.5.1
  • 2.5
  • 2.4.1
  • 2.4
  • 2.3

Alpine 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

⁠Usage

Some usage examples are given in docker-compose.yml.

⁠Example Usage with for Gmail SMTP Service

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

⁠Environment Variables

⁠DEFAULT_OPTS

By 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
⁠PORT

The 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_DIR

Spool directory for E-MailRelay. No need to change. Default value: /var/spool/emailrelay

⁠SWAKS_OPTS

This 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

⁠Filter Scripts, Client/Server Authentication, and Others

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⁠.

⁠Testing

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'

⁠Additions to drdaeman/docker-emailrelay

  • E-MailRelay version upgrade(s).
  • Smaller container images.
  • Included bash shell for further scripting.
  • Default TLS configuration is changed to insecure configuration.
  • Sample files for advanced configuration.

Tag summary

Content type

Image

Digest

sha256:a75ffd988…

Size

37.8 MB

Last updated

almost 2 years ago

docker pull dcagatay/emailrelay