mirror of
https://github.com/docker-mailserver/docker-mailserver
synced 2026-11-13 12:52:53 +01:00
`_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