Is this a dovecot problem on your side? dovecot usually accepts mail from MTA like postfix, so it would be better to remove example1.com from postfix relaydomains (mailbox domains, alias domains, ...). Then there is no delivery to dovecot. Most MTAs ignore MX records - if a domain is configured locally, it gets delivered.
Best regards Gerald
Am 11.09.2018 um 20:20 schrieb Kai Schaetzl <maillists@conactive.com>:
Given the following:
mailboxes: user1@example1.com user2@example1.com user3@example1.com etc.
aliases: whatever@example1.com -> user1@example1.com whatever@example2.com -> user1@example1.com whatever@example3.com -> user1@example1.com
Now the problem: example1.com MX goes elsewhere (doesn't point to this server anymore). Domains example2.com and example3.com still point to that server and should be able to accept mail. I have to disable mail acceptance for example1.com. If not, mail sent *from* that server (e.g. from a web form) to that domain will not leave the server. However, if I disable example1.com for mail dovecot lmtp will not deliver mail to this mail box anymore, although the mailbox still exists.
How can I solve this? Is there a way of solving this, but keeping the domain example1.com in the name for these mailboxes? Or is there a way to tell dovecot to ignore domains for mailbox names? e.g. deliver to "user1"? (All user localparts are unique.)
Thanks for any hints.
Kai