[TriLUG] Postfix config to catch all domains
aaron at schrab.com
Mon May 19 19:34:29 EDT 2008
At 17:39 -0400 19 May 2008, Randy Barlow <randy at electronsweatshop.com> wrote:
>Hi all, I'm building an isolated test machine with postfix that is
>designed to be used in a testing environment with another server. I need
>this test machine to accept mail for all users of all domains (*@*.*) and
>give all that mail to a local user. I know that /etc/postfix/virtual can
>be used to allow all mail from certain domains to go to a certain user,
>but how can I do this for all possible domains? Thanks!
You could add a regexp file to the virtual_maps list.
virtual_maps = hash:/etc/postfix/virtual pcre:/etc/postfix/virtual.re
Then create a new the /etc/postfix/virtual.re file like:
Note, in my experience with doing this you need to restart postfix for
it to notice any changes to the regexp map, unlike for the hash map.
More information about the TriLUG