{"id":13587971,"url":"https://github.com/ix-ai/smtp","last_synced_at":"2026-01-16T18:34:06.637Z","repository":{"id":42662838,"uuid":"236667234","full_name":"ix-ai/smtp","owner":"ix-ai","description":"This is a SMTP docker container for sending emails. You can also relay emails to gmail and amazon SES.","archived":false,"fork":false,"pushed_at":"2025-04-10T03:00:37.000Z","size":78,"stargazers_count":107,"open_issues_count":0,"forks_count":14,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T04:19:11.759Z","etag":null,"topics":["docker-smtp","smtp-server"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ix-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2020-01-28T05:44:45.000Z","updated_at":"2025-04-10T03:00:40.000Z","dependencies_parsed_at":"2024-07-22T15:33:31.200Z","dependency_job_id":"21cec0dd-4671-41f7-9d31-f6315b8652f8","html_url":"https://github.com/ix-ai/smtp","commit_stats":null,"previous_names":[],"tags_count":22,"template":false,"template_full_name":null,"purl":"pkg:github/ix-ai/smtp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fsmtp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fsmtp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fsmtp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fsmtp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ix-ai","download_url":"https://codeload.github.com/ix-ai/smtp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ix-ai%2Fsmtp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28480932,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-smtp","smtp-server"],"created_at":"2024-08-01T15:06:26.883Z","updated_at":"2026-01-16T18:34:06.623Z","avatar_url":"https://github.com/ix-ai.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# SMTP\n\n## Deprecation Notice\n\n**This project is deprecated and has been archived**. Please switch to [gitlab.com/egos-tech/smtp](https://gitlab.com/egos-tech/smtp).\n\nReplace your docker image with `registry.gitlab.com/egos-tech/smtp:latest`.\n\nPlease note, a new versioning format is established, starting with `1.0.0` - this version is one-to-one compatible with the latest version in this repository:\n\n```yml\nimage: registry.gitlab.com/egos-tech/smtp:1.0.0\n```\n\nAll future updates will only be done to that project.\n\n## Description\n\n[![Pipeline Status](https://gitlab.com/ix.ai/smtp/badges/master/pipeline.svg)](https://gitlab.com/ix.ai/smtp/)\n[![Gitlab Project](https://img.shields.io/badge/GitLab-Project-554488.svg)](https://gitlab.com/ix.ai/smtp/)\n\nThis is a SMTP docker container for sending emails. You can also relay emails to gmail and amazon SES.\n\n**Disclaimer**: This is an implementation of Exim.\n\n## Environment variables\n\nThe container accepts `RELAY_NETWORKS` environment variable which *MUST* start with `:` e.g `:192.168.0.0/24` or `:192.168.0.0/24:10.0.0.0/16`.\n\nThe container accepts `KEY_PATH` and `CERTIFICATE_PATH` environment variable that if provided will enable TLS support. The paths must be to the key and certificate file on a exposed volume. The keys will be copied into the container location.\n\nThe container accepts `MAILNAME` environment variable which will set the outgoing mail hostname.\n\nThe container also accepts the `PORT` environment variable, to set the port the mail daemon will listen on inside the container. The default port is `25`.\n\nThe container accepts `BIND_IP` and `BIND_IP6` environment variables. The defaults are `0.0.0.0` and `::0`.\n\nTo disable IPV6 you can set the `DISABLE_IPV6` environment variable to any value.\n\nThe container accepts `OTHER_HOSTNAMES` environment variable which will set the list of domains for which this machine should consider itself the final destination.\n\nThe container accepts `NET_DEV` environment variable to override the default `eth0` interface for retrieving the IP address for relay networks.\n\nThe container accepts `SMTPPORTOUT`environment variable to override the default port of 25 for connecting to the primary mailserver when used as secondary(eg. setting RELAY_DOMAINS)\n\nIf you want to switch to using split config instead of the monolithic one, specify `USE_SPLIT_CONFIG=true` in the environment variables. This will allow you to mount your own exim config files in the structure under `/etc/exim4/conf.d/{acl,auth,main,retry,rewrite,router,transport}`. For details see \u003chttps://wiki.debian.org/Exim\u003e.\n\n## Below are scenarios for using this container\n\n### As SMTP Server\n\nYou don't need to specify any environment variable to get this up.\n\n### As a Secondary SMTP Server\n\nSpecify 'RELAY_DOMAINS' to setup what domains should be accepted to forward to lower distance MX server.\n\nFormat is `\u003cdomain1\u003e : \u003cdomain2\u003e : \u003cdomain3\u003e etc`\n\n### As Gmail Relay\n\nYou need to set the `GMAIL_USER` and `GMAIL_PASSWORD` to be able to use it.\n\n### As Amazon SES Relay\n\nYou need to set the `SES_USER` and `SES_PASSWORD` to be able to use it.\n\nYou can override the SES region by setting `SES_REGION` as well.\nIf you use Google Compute Engine you also should set `SES_PORT` to 2587.\n\n### As generic SMTP Relay\n\nYou can also use any generic SMTP server with authentication as smarthost.\u003c/br\u003e\nYou need to set `SMARTHOST_ADDRESS`, `SMARTHOST_PORT` (connection parameters), `SMARTHOST_USER`, `SMARTHOST_PASSWORD` (authentication parameters), and `SMARTHOST_ALIASES`: this is a list of aliases to puth auth data for authentication, semicolon separated.\u003c/br\u003e\n\nExample 1:\n\n```txt\nSMARTHOST_ADDRESS=mail.mysmtp.com\nSMARTHOST_PORT=587\nSMARTHOST_USER=myuser\nSMARTHOST_PASSWORD=secret\nSMARTHOST_ALIASES=*.mysmtp.com\n```\n\nExample 2 using docker-compose.yml:\n\n```yml\nversion: '3'\n\nservices:\n  smtp:\n    image: registry.gitlab.com/ix.ai/smtp:latest\n    ports:\n      # this port mapping allows you to send email from the host.\n      # if you only send from other docker containers you don't need this.\n      - 127.0.0.1:25:25\n    environment:\n      - SMARTHOST_ADDRESS=smtp.sendgrid.net\n      - SMARTHOST_PORT=587\n      - SMARTHOST_USER=apikey\n      - SMARTHOST_PASSWORD=SG.blahblahblahblahWoSpQodvLakqXQfxo\n      - SMARTHOST_ALIASES=*.sendgrid.net\n```\n\n## Enabling DKIM support\n\nFirst, generate a public/private key pair.\n\n```sh\nopenssl genrsa -out rsa.private 1024\nopenssl rsa -in rsa.private -out rsa.public -pubout -outform PEM\n```\n\nOptionally, set the environment variable `DKIM_SELECTOR` (default: `dkim`).\n\nThen, with the contents of the public key (`cat rsa.public`), create two new TXT DNS records:\n\n- At the location `${DKIM_SELECTOR}._domainkey.DOMAIN-NAME-HERE`, create a new TXT record with the contents `k=rsa; p=PUBLIC-KEY-HERE`. Only include the text between the dashed boundaries. Remove any line breaks so that it's only letters, numbers, +, and /.\n- At your location `DOMAIN-NAME-HERE`, create a new TXT record with the contents: `v=spf1 a mx ip4:SERVER-IP-ADDRESS-HERE -all`\n\nFinally, customize your `docker-compose.yml` to enable DKIM support and mount the necessary files. In this example, we've put the private key on the host at `./config/ixdotai-smtp`.\n\n```yml\nmail:\n  image: \"registry.gitlab.com/ix.ai/smtp\"\n  volumes:\n   - ./config/ixdotai-smtp/rsa.private:/etc/exim4/dkim.key.temp:ro\n  environment:\n    - MAILNAME=${DOMAIN}\n    - DKIM_KEY_PATH=/etc/exim4/dkim.key.temp\n```\n\n## Tags and Arch\n\nStarting with version v0.0.1, the images are multi-arch, with builds for amd64, arm64 and armv7. Starting with v0.1.3 support for i386 was added.\n\n- `vN.N.N` - for example v0.0.1\n- `latest` - always pointing to the latest version\n- `dev-master` - the last build on the master branch\n\n## Resources\n\n- Gitlab Registry: `registry.gitlab.com/ix.ai/smtp` - [gitlab.com/ix.ai/smtp](https://gitlab.com/ix.ai/smtp)\n- GitHub Registry: `ghcr.io/ix-ai/smtp` [github.com/ix-ai/smtp](https://github.com/ix-ai/smtp)\n- Docker Hub: `registry.gitlab.com/ix.ai/smtp` - [hub.docker.com/r/registry.gitlab.com/ix.ai/smtp](https://hub.docker.com/r/registry.gitlab.com/ix.ai/smtp)\n\n## Troubleshooting\n\nCheck the container logs to see exim output.\n\n### Certificate Verification Error in Exim 4.93 and 4.94\n\nAdditional checking added in Exim 4.93 can cause certificate verification to fail with this error message:\n\n```txt\n    TLS session: (certificate verification failed): certificate invalid: delivering unencrypted to H=smtp.sendgrid.net [167.89.115.117] (not in hosts_require_tls)\n```\n\nExim then tries to deliver unencrypted but this may fail because authentication may only be possible on TLS connections:\n\n```txt\n    smtp        |   293   SMTP\u003c\u003c 550 Unauthenticated senders not allowed\n    smtp        |   293   SMTP\u003c\u003c 503 Must have sender before recipient\n    smtp        |   293   SMTP\u003c\u003c 503 Must have valid receiver and originator\n    smtp        |   293   SMTP\u003e\u003e QUIT\n    smtp        |   293   SMTP(close)\u003e\u003e\n    smtp        |   292 LOG: MAIN\n    smtp        |   292   ** autosender@commonword.ca R=smarthost T=remote_smtp_smarthost H=smtp.sendgrid.net [167.89.123.82]: SMTP error from remote mail server after pipelined MAIL FROM:\u003c\u003e SIZE=3128: 550 Unauthenticated senders not allowed\n    smtp        |   292 LOG: MAIN\n    smtp        |   292   Frozen (delivery error message)\n```\n\nThis issue will hopefully be resolved in Exim 4.95 (see [bugs.exim.org/show_bug.cgi?id=2594](https://bugs.exim.org/show_bug.cgi?id=2594)), but at the time of writing (Sept 2021) the debian stable bas image we use has Exim 4.94.  One possible workaround in the meantime is to disable TLS verification when sending to your smarthost.\n\nPut this into a config file `exim4_additional_macros`:\n\n```sh\n# disable TLS verification as a workaround\nREMOTE_SMTP_SMARTHOST_TLS_VERIFY_HOSTS = :\n```\n\nand bind-mount this file to `/etc/exim4/_docker_additional_macros`.\n\n## Third Party Implementations\n\n- Helm Chart: \u003chttps://artifacthub.io/packages/helm/ntppool/smtp\u003e (thanks [@abh](https://github.com/abh))\n\n## Credits\n\nSpecial thanks to [namshi/docker-smtp](https://github.com/namshi/docker-smtp).\n\n### Differences from namshi/docker-smtp\n\nIn terms of configuration, this image works the same as namshi/docker-smtp.\n\nThe main differences are:\n\n- this image is based on `debian:stable` (vs. `debian:buster` used by namshi) so it has a newer version of Exim with the latest security updates.  The newer version may result in some differences vs. namshi.\n- this image in addition to AMD64, is built for ARM64, ARMv7, ARMv6 and i386.\n- cosmetic changes in `entrypoint.sh` to make [shellcheck](https://github.com/koalaman/shellcheck/) happy\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fix-ai%2Fsmtp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fix-ai%2Fsmtp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fix-ai%2Fsmtp/lists"}