{"id":15502754,"url":"https://github.com/j-siu/docker_postfix","last_synced_at":"2026-03-01T12:33:48.934Z","repository":{"id":132734673,"uuid":"277916559","full_name":"J-Siu/docker_postfix","owner":"J-Siu","description":"Docker - Postfix with sasldb2 support","archived":false,"fork":false,"pushed_at":"2025-11-26T16:33:31.000Z","size":17,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-29T13:44:41.199Z","etag":null,"topics":["docker","postfix"],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/J-Siu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-07-07T20:34:08.000Z","updated_at":"2025-11-26T16:33:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"06eb8ce5-958c-4578-8722-0ad44a3ba118","html_url":"https://github.com/J-Siu/docker_postfix","commit_stats":null,"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/J-Siu/docker_postfix","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fdocker_postfix","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fdocker_postfix/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fdocker_postfix/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fdocker_postfix/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J-Siu","download_url":"https://codeload.github.com/J-Siu/docker_postfix/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J-Siu%2Fdocker_postfix/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29969245,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T11:43:06.159Z","status":"ssl_error","status_checked_at":"2026-03-01T11:43:03.887Z","response_time":124,"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","postfix"],"created_at":"2024-10-02T09:10:57.893Z","updated_at":"2026-03-01T12:33:48.906Z","avatar_url":"https://github.com/J-Siu.png","language":"Dockerfile","readme":"# Docker - Postfix with cyrus/sasldb2 support [![Paypal donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif)](https://www.paypal.com/donate/?business=HZF49NM9D35SJ\u0026no_recurring=0\u0026currency_code=CAD)\n\n\u003e Berkeley DB (DBD) is no longer supported on Alpine Linux. https://wiki.alpinelinux.org/wiki/Release_Notes_for_Alpine_3.13.0#Deprecation_of_Berkeley_DB_.28BDB.29\n\n\u003c!--more--\u003e\n### Build\n\n```sh\ngit clone https://github.com/J-Siu/docker_postfix.git\ncd docker_postfix\ndocker build -t jsiu/postfix .\n```\n\n### Usage\n\n#### Host Directories and Volume Mapping\n\nHost|Inside Container|Mapping Required|Usage\n---|---|---|---\n${POSTFIX_CNF}|/postfix|Yes|postfix configuration volume\n${POSTFIX_HOSTNAME}|hostname|no|hostname inside container\n${TZ}|${P_TZ}|no|time zone\n\n#### Postfix Configuration\n\n##### Configuration Volume\n\nContainer will automatically exit if no configuration volume (`${POSTFIX_CNF}`), or if configuration volume is empty.\n\nThe permission and ownership of `${POSTFIX_CNF}` is not important. Container `start.sh` copies `/postfix` to `/etc/` and applies ownership and permission to `/etc/postfix` accordingly.\n\nPostfix configuration come with Alpine package install is included in the container at `/postfix.pkg.tgz`. Retrieve it with following commands:\n\n```docker\ndocker run -d -it --rm --name tmp jsiu/postfix sh\ndocker cp tmp:/postfix.pkg.tgz .\ndocker stop tmp\n```\n\n##### aliases\n\nIf `aliases` is used, it should be placed at `${POSTFIX_CNF}/aliases`. Container `start.sh` script will execute `newaliases`.\n\nIn `main.cf`:\n\n```ini\nalias_maps = hash:/etc/postfix/aliases\nalias_database = hash:/etc/postfix/aliases\n```\n\n##### sasldb2\n\nIf sasldb2 is to be used, `sasldb2` and `smtpd.conf` should be placed in `${POSTFIX_CNF}/sasl2/`. Container `start.sh` script will copy them to `/etc/sasl2/`.\n\nSample `smtpd.conf` content:\n\n```ini\npwcheck_method: auxprop\nauxprop_plugin: sasldb\nmech_list: PLAIN LOGIN\n```\n\n#### Logs\n\nThere are two ways to log to journald.\n\n##### /dev/log\n\nMount host `/dev/log` to container `/dev/log` to enable postfix logs to host logging system.\n\n##### /dev/stdout\n\nTo have postfix log to stdout:\n\nAdd following to `master.cf`\n\n```ini\npostlog   unix-dgram n  -       n       -       1       postlogd\n```\n\nAdd following to `main.cf`\n\n```ini\nmaillog_file = /dev/stdout\n```\n\nShow postfix log from journald:\n\n```sh\njournalctl -t \u003cpostfix container name\u003e\njournalctl -t postfix\n```\n\n#### Run\n\n```docker\ndocker run \\\n-d \\\n-e P_TZ=America/New_York \\\n-v /home/jsiu/postfix:/postfix \\\n-v /dev/log:/dev/log\n-p 25 \\\n-p 587 \\\njsiu/postfix\n```\n\n#### Compose\n\nGet docker-compose template from image:\n\n```docker\ndocker run --rm jsiu/postfix cat /docker-compose.yml \u003e docker-compose.yml\ndocker run --rm jsiu/postfix cat /env \u003e env\n```\n\nFill in `.env` according to your environment.\n\n```sh\ndocker-compose up\n```\n\n### Repository\n\n- [docker_postfix](https://github.com/J-Siu/docker_postfix)\n\n### Contributors\n\n- [John Sing Dao Siu](https://github.com/J-Siu)\n\n### Change Log\n\n- 1.0\n  - Initial commit.\n- 1.1\n  - Dockerfile remove apk update\n  - start.sh\n    - Use exec so start.sh can exit\n- 3.5.3-r0\n  - Adopt Postfix version\n  - Postfix version 3.5.3-r0\n- 3.5.4-r0\n  - Auto update to 3.5.4-r0\n- 3.5.4-r0-p0\n  - Remove cyrus-sasl-plain\n- 3.5.6-r0\n  - Auto update to 3.5.6-r0\n- 3.5.7-r0\n  - Auto update to 3.5.7-r0\n- 3.5.7-r2\n  - Auto update to 3.5.7-r2\n- 3.5.8-r0\n  - Auto update to 3.5.8-r0\n- 3.5.8-r0-p1\n  - Create /etc/sasl2 directory\n- 3.5.8-r0-p2\n  - Fix start.sh\n- 3.5.9-r0\n  - Auto update to 3.5.9-r0\n- 3.5.9-r0-p0\n  - Force rebuild to use cyrus-sasl 2.1.27-r12\n- 3.6.0-r0\n  - Auto update to 3.6.0-r0\n- 3.6.1-r0\n  - Auto update to 3.6.1-r0\n- 3.7.0-r2\n  - Auto update to 3.7.0-r2\n- 3.7.0-r2-p1\n  - Add docker push github workflow\n- 3.7.1-r1\n  - Auto update to 3.7.1-r1\n- 3.7.2-r0\n  - Auto update to 3.7.2-r0\n- 3.7.2-r1\n  - Auto update to 3.7.2-r1\n- 3.7.4-r0\n  - Auto update to 3.7.4-r0\n- 3.8.0-r1\n  - Auto update to 3.8.0-r1\n- 3.8.1-r0\n  - Auto update to 3.8.1-r0\n- 3.9.0-r1\n  - Auto update to 3.9.0-r1\n\u003c!--CHANGE-LOG-END--\u003e\n\n### License\n\nThe MIT License\n\nCopyright (c) 2024\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":["https://www.paypal.com/donate/?business=HZF49NM9D35SJ\u0026no_recurring=0\u0026currency_code=CAD"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-siu%2Fdocker_postfix","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj-siu%2Fdocker_postfix","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj-siu%2Fdocker_postfix/lists"}