mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2026-11-21 03:26:29 +03:00
* fix(postfix): deliver mail to accounts on a domain with a catch-all alias Postfix resolves `virtual_alias_maps` before `virtual_mailbox_maps`, so a catch-all alias (`@example.com`) in `postfix-virtual.cf` also captured the mail of every account on that domain. The documented workaround (an alias to itself, `addr addr`) cannot be created with `setup alias add`, as the CLI rejects an alias that is also an account. Add that alias for each account of a catch-all domain to the generated `/etc/postfix/virtual`, at startup and when `postfix-accounts.cf` changes. `postfix-virtual.cf` is left untouched, so the CLI guard stays, the Dovecot quota dummy accounts are unaffected, and entries added by hand are kept. Only applies to `ACCOUNT_PROVISIONER=FILE`. Also fix the overlap checks of `setup alias add` and `setup email add`: they used a prefix `grep`, so `user@example.com` was rejected when `user@example.com.au` existed. They now use `_db_has_entry_with_key`, which compares the whole address. Closes #4856