Redirect All emails to
I have a test system in ubuntu that I want to redirect all emails to using PostFix, the following works, But I want to have multiple recipients, or to allow specific people to get emails.
edit /etc/postfix/main.cf and add
canonical_maps = regexp:/etc/postfix/canonical-redirect
create /etc/postfix/canonical-redirect and enter the address you want all emails sent to.
/^.*$/ [email protected]
sudo postfix reload
I have tried following but doesn't work
[email protected] [email protected] # to allow that persons emails to go through
/^.*$/ [email protected],[email protected] # to have 2 mails being replaced
When you need to replace only recipients addresses then it is better to use virtual alias maps instead of canonical address rewriting. See VIRTUAL REAMDE from postfix documentation.