{"id":18781549,"url":"https://github.com/devture/exim-relay","last_synced_at":"2025-04-08T03:12:12.225Z","repository":{"id":40448184,"uuid":"167825973","full_name":"devture/exim-relay","owner":"devture","description":"🐳 A lightweight non-root Docker image for an Exim mail relay, based on Alpine Linux.","archived":false,"fork":false,"pushed_at":"2025-03-08T05:33:17.000Z","size":69,"stargazers_count":41,"open_issues_count":2,"forks_count":34,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-31T18:20:17.620Z","etag":null,"topics":["docker-image","email","exim"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devture.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"liberapay":"s.pantaleev"}},"created_at":"2019-01-27T15:44:59.000Z","updated_at":"2025-03-11T16:49:03.000Z","dependencies_parsed_at":"2024-11-07T20:34:56.837Z","dependency_job_id":"c94f89f1-beef-4298-ae7e-503fa15c1aaa","html_url":"https://github.com/devture/exim-relay","commit_stats":null,"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fexim-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fexim-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fexim-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devture%2Fexim-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devture","download_url":"https://codeload.github.com/devture/exim-relay/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767236,"owners_count":20992548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-image","email","exim"],"created_at":"2024-11-07T20:32:30.146Z","updated_at":"2025-04-08T03:12:12.210Z","avatar_url":"https://github.com/devture.png","language":"Makefile","funding_links":["https://liberapay.com/s.pantaleev"],"categories":[],"sub_categories":[],"readme":"# Docker Exim Relay Image\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) [![GitHub Tag](https://img.shields.io/github/tag/devture/exim-relay.svg)](https://github.com/devture/exim-relay/pkgs/container/exim-relay/versions)\n\nA lightweight Docker image for an [Exim](https://www.exim.org/) mail relay, based on the official Alpine image.\n\nFor extra security, the container runs as exim (`uid=100` and `gid=101`), not root.\n\nThis is a fork of [Industrie\u0026Co](https://github.com/industrieco)'s wonderful (but seemingly unmaintained) [industrieco/docker-exim-relay](https://github.com/industrieco/docker-exim-relay) image.\nThe following changes have been done on top of it:\n\n- based on a newer Alpine release (and thus, newer exim)\n\n- removing Received headers for mail received by exim (helps email deliverability)\n\n\n## Docker\n\n### Default setup\n\nThis will allow relay from all private address ranges and will relay directly to the internet receiving mail servers\n\n```\ndocker run \\\n       --user=100:101 \\\n       --name smtp \\\n       --restart always \\\n       -e HOSTNAME=my.host.name \\\n       -d \\\n       -p 25:8025 \\\n       ghcr.io/devture/exim-relay:SOME_TAGGED_RELEASE\n```\n\n**Note**: we advise setting the hostname using a `HOSTNAME` environment variable, instead of `--hostname`. Since Docker 20.10, the latter has the side-effect of making other services on the same Docker network resolve said hostname to the in-container IP address of the mailer container. If you'd rather this hostname resolves to the actual public IP address, avoid using `--hostname`.\n\n\n### Smarthost setup\n\nTo send forward outgoing email to a smart relay host\n\n```\ndocker run \\\n       --user=100:101 \\\n       --name smtp \\\n       --restart always \\\n       -d \\\n       -p 25:8025 \\\n       -e HOSTNAME=my.host.name \\\n       -e SMARTHOST=some.relayhost.name::587 \\\n       -e SMTP_USERNAME=someuser \\\n       -e SMTP_PASSWORD=password \\\n       ghcr.io/devture/exim-relay:SOME_TAGGED_RELEASE\n```\n\n### DKIM setup\n\nTo sign outgoing email with DKIM\n\n```\ndocker run \\\n       --user=100:101 \\\n       --name smtp \\\n       --restart always \\\n       -d \\\n       -p 25:8025 \\\n       -e HOSTNAME=my.host.name \\\n       -e SMARTHOST=some.relayhost.name::587 \\\n       -e SMTP_USERNAME=someuser \\\n       -e SMTP_PASSWORD=password \\\n       --mount type=bind,src=/PATH/TO/THE/PRIVATE/KEY.pem,dst=/etc/exim/dkim.pem,ro \\\n       ghcr.io/devture/exim-relay:SOME_TAGGED_RELEASE\n```\n\nYou can adjust the [DKIM selector](https://dmarcly.com/blog/what-is-dkim-selector-and-how-does-it-work-dkim-selector-explained) value by passing an additional `DKIM_SELECTOR` environment variable. By default, it has a value of `default`.\n\n## Docker Compose\n\n```\nversion: \"3.7\"\n\nservices:\n  smtp:\n    image: ghcr.io/devture/exim-relay:SOME_TAGGED_RELEASE\n    user: 100:101\n    restart: always\n    ports:\n      - \"25:8025\"\n    environment:\n      HOSTNAME: my.host.name\n      SMARTHOST: some.relayhost.name::587\n      SMTP_USERNAME: someuser\n      SMTP_PASSWORD: password\n```\n\n## Other Variables\n\n###### HOSTNAME\n\n* The hostname that is sent as part of the `HELO` message.\n\n###### LOCAL_DOMAINS\n\n* List (colon separated) of domains that are delivered to the local machine\n* Defaults to the hostname of the local machine\n* Set blank to have no mail delivered locally\n\n###### RELAY_FROM_HOSTS\n\n* A list prefixed with `\u003c; `, which contains `;`-separated IPv4/IPv6 subnets to allow relay from (see the default value below for an example)\n* Set to \"\\*\" to allow any host to relay - use this with RELAY_TO_DOMAINS to allow any client to relay to a list of domains\n* Defaults value: `\u003c; 10.0.0.0/8; 172.16.0.0/12; 192.168.0.0/16; fc00::/7`\n\n💡 Lists in exim use `:` as a value separator by default. Since IPv6 addresses are written with `:` inside them, we override the default separator by adding the `\u003c; ` prefix. This allows for `:` to be used in IP address ranges without being interpreted as a separator.\n\n###### RELAY_TO_DOMAINS\n\n* A list (colon separated) of domains to allow relay to\n* Defaults to \"\\*\" to allow relaying to all domains\n* Setting both RELAY_FROM_HOSTS and RELAY_TO_DOMAINS to \"\\*\" will make this an open relay\n* Setting both RELAY_FROM_HOSTS and RELAY_TO_DOMAINS to other values will limit which clients can send and who they can send to\n\n###### RELAY_TO_USERS\n\n* A whitelist (colon separated) of recipient email addresses to allow relay to\n* This list is processed in addition to the domains in RELAY_TO_DOMAINS\n* Use this for more precise whitelisting of relayable mail\n* Defaults to \"\" which doesn't whitelist any addresses\n\n###### DISABLE_SENDER_VERIFICATION\n\nIf the environment variable is set, sender address verification will be disabled.\n\n###### SMARTHOST\n\n* A relay host to forward all non-local email through\n\n###### SMTP_USERNAME\n\n* The username for authentication to the smarthost\n\n###### SMTP_PASSWORD\n\n* The password for authentication to the smarthost - leave this blank to disable authenticaion\n\n\n## Docker Secrets\n\nThe 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\n\n## Debugging\n\nThe logs are sent to /dev/stdout and /dev/stderr and can be viewed via docker logs\n\n```shell\ndocker logs smtp\n```\n\n```shell\ndocker logs -f smtp\n```\n\nExim commands can be run to check the status of the mail server as well\n\n```shell\ndocker exec -ti smtp exim -bp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fexim-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevture%2Fexim-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevture%2Fexim-relay/lists"}