Production-ready fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) running inside a container. https://docker-mailserver.github.io/docker-mailserver/latest/
  • Shell 97.1%
  • Dockerfile 1.7%
  • Makefile 0.5%
  • Python 0.3%
  • PHP 0.2%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Georg Lauterbach 08b3cf3bb2
breaking(networking): replace PERMIT_DOCKER with DMS_TRUSTED_NETWORKS (#4848)
`_setup_docker_permit` always parsed an IPv4 address from
`NETWORK_INTERFACE` and aborted startup when there was none, even for the
default `PERMIT_DOCKER=none`, which does not need it. DMS therefore
failed to start in IPv6-only networks.

Replace `PERMIT_DOCKER` with `DMS_TRUSTED_NETWORKS`, which no longer
implies Docker, carries the `DMS_` prefix and supports IPv6:

- `none` (default): trust no client
- `host`, `subnet`: delegate to Postfix `mynetworks_style`, so no
  `ip addr` parsing is needed
- a list of CIDR ranges (IPv4 and IPv6, separated by spaces or commas)

The ranges Postfix derives or the user provides are normalized (lower
case, compressed IPv6, host bits masked) before they are added to the
OpenDKIM and OpenDMARC trust lists, as both only match that text form.
An invalid value now stops the startup instead of being cleared with a
warning.

`NETWORK_INTERFACE` is removed together with `helpers/network.sh`.
`PERMIT_DOCKER` and `NETWORK_INTERFACE` log an error when still set and
are ignored, so no client is trusted until the user migrates:

- `container` => `host`
- `host`, `connected-networks` => `subnet`
- `network` => `172.16.0.0/12` (or the exact range of the network)

- docs: document `DMS_TRUSTED_NETWORKS` with a migration table and update
  all pages and demo setups that used the old variables
- tests: add `trusted_networks.bats` (no IPv4 address, `host`, CIDR list,
  invalid value, legacy variables), rename `permit_docker.bats` and
  migrate all tests to the new variable
- changelog: add `Breaking` and `Fixed` entries

Closes #4634
Closes #3478
2026-11-11 19:50:14 +01:00
.github chore(deps): Bump github/codeql-action from 4.39.1 to 4.39.3 (#4845) 2026-11-09 14:35:08 +01:00
config-examples chore: disable F2B postfix-sasl jail (#4535) 2025-08-03 10:37:41 +02:00
demo-setups breaking(networking): replace PERMIT_DOCKER with DMS_TRUSTED_NETWORKS (#4848) 2026-11-11 19:50:14 +01:00
docs breaking(networking): replace PERMIT_DOCKER with DMS_TRUSTED_NETWORKS (#4848) 2026-11-11 19:50:14 +01:00
target breaking(networking): replace PERMIT_DOCKER with DMS_TRUSTED_NETWORKS (#4848) 2026-11-11 19:50:14 +01:00
test breaking(networking): replace PERMIT_DOCKER with DMS_TRUSTED_NETWORKS (#4848) 2026-11-11 19:50:14 +01:00
.dockerignore chore: remove VERSION file (#4321) 2025-01-19 01:27:07 +01:00
.editorconfig ci(fix): Normalize for .gitattributes + improve eclint coverage (#3566) 2023-10-04 12:53:32 +02:00
.gitattributes ci: Remove CONTRIBUTORS.md (#4141) 2024-07-31 09:04:51 +02:00
.gitignore feat: Auth - OAuth2 (Dovecot PassDB) (#3480) 2024-01-13 09:45:14 +13:00
.gitmodules removal: configomat (submodule) (#3045) 2023-02-05 12:39:05 +01:00
AGENTS.md chore: rewrite Code of Conduct and add AGENTS.md for LLMs (#4821) 2026-10-31 15:04:12 +01:00
CHANGELOG.md breaking(networking): replace PERMIT_DOCKER with DMS_TRUSTED_NETWORKS (#4848) 2026-11-11 19:50:14 +01:00
CODE_OF_CONDUCT.md chore: rewrite Code of Conduct and add AGENTS.md for LLMs (#4821) 2026-10-31 15:04:12 +01:00
compose.yaml feat: add dms-healthcheck script for container health checks (#4706) 2026-06-10 23:18:03 +02:00
Dockerfile feat: prevent docker user login (#4842) 2026-11-11 09:55:54 +01:00
LICENSE Final Migration Step (#6) 2021-01-16 10:16:05 +01:00
mailserver.env breaking(networking): replace PERMIT_DOCKER with DMS_TRUSTED_NETWORKS (#4848) 2026-11-11 19:50:14 +01:00
Makefile ci: add run-local-instance target to Makefile (#3663) 2023-12-04 10:28:40 +13:00
README.md Fix broken/defunct fail2ban link (#4736) 2026-08-02 17:43:45 +02:00
SECURITY.md release: v17.0.0 2026-11-06 00:49:20 +01:00
setup.sh Change 'while' style (#3365) 2023-05-26 01:39:39 +02:00

Docker Mailserver

ci::status docker::pulls documentation::badge

📃 About

A production-ready fullstack but simple containerized mail server (SMTP, IMAP, LDAP, Anti-spam, Anti-virus, etc.).

  • Only configuration files, no SQL database. Keep it simple and versioned. Easy to deploy and upgrade.
  • Originally created by @tomav, this project is now maintained by volunteers since January 2021.

Tip

Be sure to read our documentation. It provides guidance on initial setup of your mail server.

Important

If you have issues, please search through the documentation for your version before opening an issue.

The issue tracker is for issues, not for personal support.
Make sure the version of the documentation matches the image version you're using!

  1. FAQ
  2. Usage
  3. Examples
  4. Issues and Contributing
  5. Release Notes
  6. Environment Variables
  7. Updating

📦 Included Services