Jeff Abrahamson: > On 24/01/2021 16:08, Wietse Venema wrote: > > Jeff Abrahamson: > >> I've a domain (mobilitains.fr) with mail mostly configured.? I've also > >> registered mobilitain.fr (without the "s") to catch misspellings.? This > >> is easy for https, but I don't see how to get it working with postfix > >> (aside from manually mapping each user in /etc/postfix/virtual). > > If the users are in /etc/passwd, it is sufficient to add the domain > > to main.cf:mydestination. If your users are defined in a different > > way, some Postfix details are needed. > > Virtual users, not system.? Sorry, forgot to paste config: ... > virtual_alias_domains = > virtual_alias_maps = hash:/etc/postfix/virtual > virtual_mailbox_domains = hash:/etc/postfix/virtual-mailbox-domains > virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox-users > virtual_transport = dovecot
List mobilitains.fr and mobilitain.fr in virtual_mailbox_domains. Then, configure virtual_mailbox_maps as described in https://wiki.dovecot.org/LDA/Postfix. Look the section "Virtual users (dynamic)". With this, Postfix and Dovecot will always agree on what is a valid recipient address. There is no "easy" way to tell Postfix to replace mobilitain.fr with mobilitains.fr. The easy way causes Postfix to accept mail for non-existent addresses. Wietse