Score:0

Postfix: How to forward mail matching a specific pattern to a local mailbox, instead of a catch-all?

cn flag

I have a Postfix mailserver, and when I made it I expected to be the only user, so I set up a catch-all rule using a virtual_alias_maps rule using regexp mode:

/[email protected]/ username

I have since then given out several [email protected] addresses to different people and websites, so I need to maintain the catch-all rule. However, now I need to create a separate mailbox that should receive mail that has a specific prefix: a message sent to [email protected] should still go to the username mailbox, but mail to [email protected] should go to prefixed instead.

The obvious idea of putting the second rule into the regexp file doesn't work, and the mail still goes to the catch-all:

/[email protected]/ prefixed
/[email protected]/ username

Neither does creating a separate file for the catch-all rule, and putting it after the prefix one:

virtual_alias_maps=regexp:/etc/postfix/regexp-prefix-rule, regexp:/etc/postfix/regexp-catchall
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.