On 27 Mar 2018, at 9:55, Michaux Julien wrote:
Hi Everyone,
I'm facing a problem with the way postfix handle my catchall.
I am running Postfix 2.10.1 with Cyrus 2.4.17.
I use virtual_mailbox and virtual_alias to handle mailboxes.
Everything works fine with users.
I would like to implement a catchall mailbox (I know it's not a good
idea, but this is essential in my business) BUT only for alias that do
not already exist.
Everything is flat file.
If I send a mail to us...@mail.domain.tld , this mail go to user1
mailbox. A mail to name1.surna...@mail.domain.tld go to user1 mailbox.
A mail to t...@mail.domain.tld should be redirect to the user mailbox
I want.
Actually I put something like "@mail.domain.tld user1" in
virtual_alias_maps. The problem is that it actually catches ALL mail
that arrive on the server. User1 gets all unknown mails AND user2
mail.
How can user1 receive mail that are normally bounced because of "
Recipient address rejected: mailbox does not exist"
Use a pcre (or regexp) table for virtual_alias_maps. That gives you the
ability to use the order of rules to implement a default for everything
not matched specifically.
When doing that, you probably will eventually want a pcre or regexp
check_recipient_access map to make the catchall a catch-most.