A lightweight non-root Docker image for an Exim mail relay, based on Alpine Linux.
1M+
A lightweight Docker image for an Exim mail relay, based on the official Alpine image (Github repository).
For extra security, the container runs as exim (uid=100 and gid=101), not root.
This is a fork of Industrie&Co's wonderful (but seemingly unmaintained) industrieco/docker-exim-relay image. The following changes have been done on top of it:
based on a newer Alpine release (and thus, newer exim)
removing Received headers for mail received by exim (helps email deliverability)
This will allow relay from all private address ranges and will relay directly to the internet receiving mail servers
docker run \
--user=100:101 \
--name smtp \
--restart always \
-h my.host.name \
-d \
-p 25:8025 \
devture/exim-relay
To send forward outgoing email to a smart relay host
docker run \
--user=100:101 \
--restart always \
-h my.host.name \
-d \
-p 25:8025 \
-e SMARTHOST=some.relayhost.name::587 \
-e SMTP_USERNAME=someuser \
-e SMTP_PASSWORD=password \
devture/exim-relay
version: "2"
services:
smtp:
image: devture/exim-relay
user: 100:101
restart: always
ports:
- "25:8025"
hostname: my.host.name
environment:
- SMARTHOST=some.relayhost.name::587
- SMTP_USERNAME=someuser
- SMTP_PASSWORD=password
The smarthost password can also be supplied via docker swarm secrets / rancher secrets. Create a secret called SMTP_PASSWORD and don't use the SMTP_PASSWORD environment variable
The logs are sent to /dev/stdout and /dev/stderr and can be viewed via docker logs
docker logs smtp
docker logs -f smtp
Exim commands can be run to check the status of the mail server as well
docker exec -ti smtp exim -bp
Content type
Image
Digest
sha256:7ba30080c…
Size
4.8 MB
Last updated
over 1 year ago
docker pull devture/exim-relay:4.98-r0-4