{"id":13558735,"url":"https://github.com/tozd/docker-mail","last_synced_at":"2025-04-28T08:31:24.704Z","repository":{"id":82333765,"uuid":"47112183","full_name":"tozd/docker-mail","owner":"tozd","description":"Docker image with a full-fledged e-mail service with virtual users. Read-only mirror of https://gitlab.com/tozd/docker/mail","archived":false,"fork":false,"pushed_at":"2023-07-14T02:32:26.000Z","size":45,"stargazers_count":15,"open_issues_count":3,"forks_count":2,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-04T09:37:34.934Z","etag":null,"topics":["docker","docker-image","email","postfix"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tozd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["plast8","mitar"]}},"created_at":"2015-11-30T10:43:34.000Z","updated_at":"2023-11-22T14:40:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"c1e95954-cacc-4b14-a3ed-ef1887589d48","html_url":"https://github.com/tozd/docker-mail","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/tozd%2Fdocker-mail","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fdocker-mail/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fdocker-mail/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tozd%2Fdocker-mail/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tozd","download_url":"https://codeload.github.com/tozd/docker-mail/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224102269,"owners_count":17256129,"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","docker-image","email","postfix"],"created_at":"2024-08-01T12:05:07.644Z","updated_at":"2024-11-11T12:27:17.618Z","avatar_url":"https://github.com/tozd.png","language":"Shell","funding_links":["https://github.com/sponsors/plast8","https://github.com/sponsors/mitar"],"categories":["Shell","docker"],"sub_categories":[],"readme":"# tozd/mail\n\n**WORK IN PROGRESS**\n\n\u003chttps://gitlab.com/tozd/docker/mail\u003e\n\nAvailable as:\n\n- [`tozd/mail`](https://hub.docker.com/r/tozd/mail)\n- [`registry.gitlab.com/tozd/docker/mail`](https://gitlab.com/tozd/docker/mail/container_registry)\n\n## Image inheritance\n\n[`tozd/base`](https://gitlab.com/tozd/docker/base) ← [`tozd/dinit`](https://gitlab.com/tozd/docker/dinit) ← [`tozd/postfix`](https://gitlab.com/tozd/docker/postfix) ← `tozd/mail`\n\n## Description\n\nImage extending [tozd/postfix](https://gitlab.com/tozd/docker/postfix) image to provide\na full-fledged e-mail service with virtual users.\n\nYou should make sure you mount all volumes (especially `/srv/mail`) so that you do not lose e-mails and other\ndata when you are recreating a container. If volumes are empty, image will initialize them at the first startup.\n\nIntegrated services:\n\n- [tozd/postfix](https://gitlab.com/tozd/docker/postfix) – sending and receiving e-mails, extends the image\n- [tozd/sympa](https://gitlab.com/tozd/docker/sympa) – mailing lists, runs alongside the image\n- [tozd/postfixadmin](https://gitlab.com/tozd/docker/postfixadmin) – virtual users, runs alongside the image\n- [Amavis](https://www.ijs.si/software/amavisd/) – interface for virus and spam scanning\n- [Clamav](http://www.clamav.net/) – antivirus engine\n- [SpamAssassin](https://spamassassin.apache.org/) – anti-spam platform\n- [Postgrey](http://postgrey.schweikert.ch/) – greylisting\n- [Dovecot](http://www.dovecot.org/) – IMAP and POP3 server\n\nThe intended use of this image is that it is extended to provide necessary configuration files and customizations\nfor your installation, and used together with `tozd/sympa` and `tozd/postfixadmin`.\nYou can use [tozd/postgresql](https://gitlab.com/tozd/docker/postgresql)\nPostgreSQL database.\nYou might find [tozd/external-ip](https://gitlab.com/tozd/docker/external-ip) Docker image useful, too.\n\n**The image cannot run without extending (or mounting necessary files into it).**\n\nBesides various data volumes they are configuration volumes you have to mount:\n\n- `/config` is a volume which should provide all sensitive and custom configurations for services\n- `/etc/postfixadmin/shared` is a volume shared with `tozd/postfix` container to provide necessary SSH keys for communication between containers\n- `/etc/sympa/shared` is a volume shared with `tozd/sympa` container to get necessary SSH keys for communication between containers\n\n`/config` volume should contain files:\n\n- `/config/amavis/50-user` – Amavis configuration, the best place to configure your hostname, local domains, and spam handling\n- `/config/dovecot/`\n  - `connect.conf` – should contain only PostgreSQL `connect` configuration parameter\n  - `local.conf` – hostname, postmaster address, and paths to your SSL keys (probably the best is to store them in `/config/ssl`)\n- `/config/postfix/`\n  - `main.cf.append` – if it exists, it is appended to the `main.cf`\n  - `master.cf.append` – if it exists, it is appended to the `master.cf`\n- `/config/postfixadmin/pgpass` – PostgreSQL password in the [password file format](http://www.postgresql.org/docs/9.3/static/libpq-pgpass.html),\n  used by the `postfixadmin-mailbox-postcreation.sh` script\n- `/config/postgrey/`\n  - `whitelist_clients.local` – list of extra whitelisted clients\n  - `whitelist_recipients.local` – list of extra whitelisted recipients\n  - `run.config` – is run at the beginning of Postfix startup, use it to further configure Postfix and run `postmap` on files\n  - `run.initialization` – is run just before Postfix process itself is started, possibly use to fix any file permissions\n- `/config/spamassassin/local.cf` – you probably want to set `trusted_networks` and `internal_networks` to `172.17.0.0/16`, and configure things like\n  Bayes; you can set `bayes_store_module Mail::SpamAssassin::BayesStore::PgSQL` to use a PostgreSQL database for Bayes learning, configure access to it,\n  and initialize it using `/usr/share/doc/spamassassin/sql/bayes_pg.sql`\n\nIn your `main.cf.append` you probably want to configure virtual users and PostgreSQL database access. Something similar\nto:\n\n```\nvirtual_alias_maps =\n  proxy:pgsql:/config/postfix/pgsql_virtual_alias_maps.cf,\n  proxy:pgsql:/config/postfix/pgsql_virtual_alias_domain_maps.cf,\n  proxy:pgsql:/config/postfix/pgsql_virtual_alias_domain_catchall_maps.cf,\n  regexp:/config/postfix/sympa_rewrite\nvirtual_minimum_uid = 120\nvirtual_uid_maps = static:120\nvirtual_gid_maps = static:120\nvirtual_mailbox_base = /srv/mail/domains\nvirtual_mailbox_domains = proxy:pgsql:/config/postfix/pgsql_virtual_domains_maps.cf\nvirtual_mailbox_limit = 0\nvirtual_mailbox_maps =\n  proxy:pgsql:/config/postfix/pgsql_virtual_mailbox_maps.cf,\n  proxy:pgsql:/config/postfix/pgsql_virtual_alias_domain_mailbox_maps.cf,\n  regexp:/config/postfix/sympa_transport\nvirtual_transport = dovecot\ndovecot_destination_recipient_limit = 1\nrelay_domains = proxy:pgsql:/config/postfix/pgsql_relay_domains_maps.cf\n```\n\nSee [full documentation](https://github.com/postfixadmin/postfixadmin/blob/master/DOCUMENTS/POSTFIX_CONF.txt) on how\nto configure Postfix with Postfix Admin (`tozd/postfixadmin`).\n\nThe `/etc/sympa/shared` volume should contain also `sympa_rewrite` and `sympa_transport` files configuring the mailing\nlists which exist.\n\nExample of a `sympa_rewrite` file:\n\n```\n/^sympa-request@/\tpostmaster\n/^sympa-owner@/\t\tpostmaster\n/(.+)-owner@(.+)/\t$1+owner@$2\n```\n\nExample of a `sympa_transport` file, for each domain you have Sympa providing mailing lists:\n\n```\n/^sympa@example\\.com$/\t sympadomain:\n/^abuse-feedback-report@example\\.com$/\t sympabouncedomain:\n/^bounce\\+.*@example\\.com$/\t sympabouncedomain:\n/^listmaster@example\\.com$/\t sympa:\n/^.+(announce|list|info|event|press|talk|news)\\+owner@example\\.com$/\tsympabounce:\n/^.+(announce|list|info|event|press|talk|news)(-request|-editor|-subscribe|-unsubscribe)?@example\\.com$/\tsympa:\n```\n\n## GitHub mirror\n\nThere is also a [read-only GitHub mirror available](https://github.com/tozd/docker-mail),\nif you need to fork the project there.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftozd%2Fdocker-mail","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftozd%2Fdocker-mail","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftozd%2Fdocker-mail/lists"}