Configure postfix to forward all email for a domain to another destination. (#Ubuntu #Trusty)

$>vim /etc/postfix/main.cf
virtual_alias_domains = domain.com example.org
virtual_alias_maps = static:<email@example.org>
#virtual_alias_maps = hash:/etc/postfix/virtual
$>service postfix reload

Any email sent to *@domain.com, *@example.org will be redirected to email@example.org, assuming of course that you setup the MX record for domain.com / example.org to be the postfix server.

One risk is that any spam will also get forwarded; this is normally ok, but gmail etc will lower the sending MTA / IP score such that future emails that are not spam will still be treated as spam.

Advertisements