{"id":21531509,"url":"https://github.com/aguslr/docker-postfix","last_synced_at":"2026-04-17T02:31:13.376Z","repository":{"id":162113262,"uuid":"633907805","full_name":"aguslr/docker-postfix","owner":"aguslr","description":"Set up Postfix to relay local emails over the internet","archived":false,"fork":false,"pushed_at":"2025-06-06T20:57:08.000Z","size":59,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-08T22:13:33.247Z","etag":null,"topics":["docker","podman","postfix"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aguslr.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-28T14:57:39.000Z","updated_at":"2025-06-06T20:57:09.000Z","dependencies_parsed_at":"2025-01-24T06:36:31.236Z","dependency_job_id":null,"html_url":"https://github.com/aguslr/docker-postfix","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aguslr/docker-postfix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-postfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-postfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-postfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-postfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aguslr","download_url":"https://codeload.github.com/aguslr/docker-postfix/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aguslr%2Fdocker-postfix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31912317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","podman","postfix"],"created_at":"2024-11-24T02:14:36.631Z","updated_at":"2026-04-17T02:31:13.336Z","avatar_url":"https://github.com/aguslr.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"[aguslr/docker-postfix][1]\n==========================\n\n[![docker-pulls](https://img.shields.io/docker/pulls/aguslr/postfix)](https://hub.docker.com/r/aguslr/postfix) [![image-size](https://img.shields.io/docker/image-size/aguslr/postfix/latest)](https://hub.docker.com/r/aguslr/postfix)\n\n\nThis *Docker* image sets up *Postfix* inside a docker container.\n\n\u003e **[Postfix][2]** is a free and open-source mail transfer agent (MTA) that\n\u003e routes and delivers electronic mail.\n\n\nInstallation\n------------\n\nTo use *docker-postfix*, follow these steps:\n\n1. Clone and start the container:\n\n       docker run -p 25:25 \\\n         -e POSTFIX_HOSTNAME=mail.example.com \\\n         -e POSTFIX_RELAYSERVER=smtp.mail.com \\\n         -e POSTFIX_RELAYUSER=me@mail.com \\\n         -e POSTFIX_RELAYPASS=123456 \\\n         docker.io/aguslr/postfix:latest\n\n2. Configure your systems to send email to your *Postfix* server's IP address on\n   port `25`.\n\n\n### Variables\n\nThe image is configured using environment variables passed at runtime. All these\nvariables are prefixed by `POSTFIX_`.\n\n| Variable      | Function                                       | Required |\n| :------------ | :--------------------------------------------- | -------- |\n| `HOSTNAME`    | Hostname for the container                     | Y        |\n| `DOMAIN`      | Domain name for Postfix                        | N        |\n| `RELAYSERVER` | Address of the SMTP server to use              | Y        |\n| `RELAYPORT`   | Port to connect to the SMTP server             | N        |\n| `RELAYUSER`   | Username of SMTP server                        | Y        |\n| `RELAYPASS`   | Password of SMTP server                        | N        |\n| `OVERWRITE`   | Use this *from* address for all relayed emails | N        |\n| `FROM`        | Rewrite *from* address                         | N        |\n| `TO`          | Rewrite *to* address                           | N        |\n| `DESTINATION` | List of domains allowed to use relay server    | N        |\n| `NETWORKS`    | List of networks allowed to use relay server   | N        |\n\n\n#### Password file\n\nAs an alternative to passing the relay's server password at runtime, we can use\na password file (e.g. `passwd`) with the format:\n\n    [RELAYSERVER]:RELAYPORT RELAYUSER:RELAYPASS\n\nWe can then mount this file at runtime with this command:\n\n    docker run -p 25:25 \\\n      -e POSTFIX_HOSTNAME=mail.example.com \\\n      -e POSTFIX_RELAYSERVER=smtp.mail.com \\\n      -e POSTFIX_RELAYUSER=me@mail.com \\\n      -v \"${PWD}\"/passwd:/etc/postfix/sasl_passwd \\\n      docker.io/aguslr/postfix:latest\n\n\nBuild locally\n-------------\n\nInstead of pulling the image from a remote repository, you can build it locally:\n\n1. Clone the repository:\n\n       git clone https://github.com/aguslr/docker-postfix.git\n\n2. Change into the newly created directory and use `docker-compose` to build and\n   launch the container:\n\n       cd docker-postfix \u0026\u0026 docker-compose up --build -d\n\n\n[1]: https://github.com/aguslr/docker-postfix\n[2]: https://www.postfix.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faguslr%2Fdocker-postfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faguslr%2Fdocker-postfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faguslr%2Fdocker-postfix/lists"}