postfix-users October 2010 archive
Main Archive Page > Month Archives  > postfix-users archives
postfix-users: virtual users and accepting mail for /^prefix-.+&

virtual users and accepting mail for /^prefix-.+@.+$/ regex

From: Tomasz Chmielewski <mangoo_at_nospam>
Date: Thu Oct 21 2010 - 10:14:02 GMT

I'm trying to configure Postfix to accept mail for addresses matching the /^prefix-.+@.+$/ regex only.

I can do this with:

virtual_alias_maps = regexp:/etc/postfix/virtual
virtual_maps = regexp:/etc/postfix/virtual
mydestination = $myhostname, localhost.$mydomain, localhost, regexp:/etc/postfix/domains


cat virtual:

/^prefix-.+@.+$/ prefixuser

cat domains (since we want to accept mail for all domains):

/.+/ OK

However, with that catch-all domain entry, I'm not able to send out mail, since everything is delivered locally.

Without the catch-all domain entry, I'm able to send out mail, but Postfix won't accept mail for /^prefix-.+@.+$/ (from remote).

How can I configure postfix to accept mail for /^prefix-.+@.+$/ users, and be able to send out mail to a proper MX?

-- Tomasz Chmielewski