Philip wrote:
Hello,
We are testing a new mail system and I want to duplicate mail flow to
the new system at the same time allow flow to the exist system.
To send mail to an additional destination, you need to add an
additional recipient. Use virtual_alias_maps to add a second
recipient, transport_maps to direct the mail where it should
go, and optionally smtp_generic_maps to rewrite the address
back to the original form.
A basic example:
main.cf:
virtual_alias_maps = hash:/etc/postfix/virtual
virtual:
us...@example.com us...@example.com us...@new.example.com
Then use a transport table entry to route the new mail to the
proper server.
main.cf:
transport_maps = hash:/etc/postfix/transport
transport:
new.example.com relay:[192.168.192.168]
You can optionally use a pcre smtp_generic_maps to rewrite the
recipient back to the original domain.
main.cf
smtp_generic_maps = pcre:/etc/postfix/smtp_generic.pcre
smtp_generic.pcre:
/^(.*)@new\.example\.com$/ $...@example.com
Important Notes:
Do not change your current setting for virtual_alias_domains.
Do not use wildcard or regexp rewrites in virtual_alias_maps;
each recipient must be listed individually.
-- Noel Jones