{"id":13588201,"url":"https://github.com/Tecnativa/docker-postfix-relay","last_synced_at":"2025-04-08T02:35:07.474Z","repository":{"id":80605035,"uuid":"62546038","full_name":"Tecnativa/docker-postfix-relay","owner":"Tecnativa","description":"SMTP server and SMTP relay host","archived":true,"fork":false,"pushed_at":"2019-10-25T11:06:51.000Z","size":39,"stargazers_count":19,"open_issues_count":0,"forks_count":25,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-11-06T07:40:28.595Z","etag":null,"topics":["docker-image","postfix","smtp-relay"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/Tecnativa.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}},"created_at":"2016-07-04T08:42:17.000Z","updated_at":"2023-10-06T03:00:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"539f5c52-c427-4a03-a482-76d02c0c1049","html_url":"https://github.com/Tecnativa/docker-postfix-relay","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tecnativa%2Fdocker-postfix-relay","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tecnativa%2Fdocker-postfix-relay/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tecnativa%2Fdocker-postfix-relay/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tecnativa%2Fdocker-postfix-relay/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tecnativa","download_url":"https://codeload.github.com/Tecnativa/docker-postfix-relay/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247765210,"owners_count":20992263,"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","postfix","smtp-relay"],"created_at":"2024-08-01T15:06:34.094Z","updated_at":"2025-04-08T02:35:07.223Z","avatar_url":"https://github.com/Tecnativa.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# [Dockerized SMTP relay](https://hub.docker.com/r/tecnativa/postfix-relay)\n\n[![Docker Automated build](https://img.shields.io/docker/automated/tecnativa/postfix-relay.svg)](https://hub.docker.com/r/tecnativa/postfix-relay/)\n\n## What?\n\nSMTP relay with local queue.\n\n## Why?\n\nSending emails through a controlled network (possibly localhost or LAN) is\nfaster and more controlled than sending them directly through the Internet.\n\nThis container retains email queue in a volume under `/var/spool/postfix`, so\nin case your network fails or your real SMTP server is down for maintenance\nor whatever, queue will be sent when network connection is restored.\n\nThis way your app can send emails faster, forget about possible temporary\nnetwork failures, and concentrate on its business.\n\n## How?\n\nConfigure through these environment variables:\n\n- `MAILNAME`: The default host for cron job mails.\n- `MAIL_RELAY_HOST`: The real SMTP server (e.g. `smtp.mailgun.org`).\n- `MAIL_RELAY_PORT`: The port in `MAIL_RELAY_HOST`. Depending on the port,\n  a specific security configuration will be used.\n- `MAIL_RELAY_USER`: The user to authenticate in `MAIL_RELAY_HOST`.\n- `MAIL_RELAY_PASS`: The password to authenticate in `MAIL_RELAY_HOST`.\n- `MAIL_CANONICAL_DOMAINS`: A space-separated list of domains that are\n  considered [canonical][].\n- `MAIL_NON_CANONICAL_DEFAULT`: A domain that should be found in the list of\n  `MAIL_CANONICAL_DOMAINS`, which will be used as the replacement domain when\n  a non-[canonical][] message comes in. Leave it empty to skip that\n  replacement system.\n- `MAIL_CANONICAL_PREFIX`: Defaults to `noreply+`, and it is what will be\n  prefixed to replaced non-[canonical][] sender addresses.\n- `MESSAGE_SIZE_LIMIT` in bytes, defaults to 50MiB. Most generous servers offer\n  a limit of 25iMB (Gmail, Mailgun...), so by defaulting to 50MiB, basically\n  we are forcing the remote server to fail in case of a big email, instead of\n  making the local relay to fail. Change at will if you prefer a different\n  behavior.\n- `ROUTE_CUSTOM` space separated list of subnets in the CIDR standard notation\n  (e.g 192.168.0.0/16).\n\n### Examples\n\n#### SMTP relay via Gmail\n\n    docker container run \\\n        -e MAIL_RELAY_HOST='smtp.gmail.com' \\\n        -e MAIL_RELAY_PORT='587' \\\n        -e MAIL_RELAY_USER='your_gmail_addr@gmail.com' \\\n        -e MAIL_RELAY_PASS='your_gmail_pass' \\\n        tecnativa/postfix-relay\n\n## FAQ\n\n### What Is A Canonical Domain\n\nIt means \"domains that are allowed to send from here\".\n\nSuppose your app allows users to define their own emails, and that one is used\nto send emails to other users from the system.\n\nIf you only own the `example.com` and `example.net` domains, but somebody\nconfigures his email as `pink@example.org`. If you send this email as it came,\nSPAM filters will block it.\n\nBy defining `MAIL_CANONICAL_DOMAINS=example.com example.net` and\n`MAIL_NON_CANONICAL_DEFAULT=example.com`, the mail would be modified as if it\ncame from `noreply+pink-example.org@example.com`, and SPAM filters will\nbe happy with that.\n\n[canonical]: #what-is-a-canonical-domain\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTecnativa%2Fdocker-postfix-relay","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTecnativa%2Fdocker-postfix-relay","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTecnativa%2Fdocker-postfix-relay/lists"}