4Feb/070
postfix: forward root mails to non-local email
In order to make postfix forward all mails from "root", to a non-local email, the Postfix virtual alias table format must be used.
Start by making a file called /etc/postfix/virtual, with this content
root receiver_email@non_local_host
Then run the below, to make a virtual lookup table.
sudo postmap /etc/postfix/virtual
To enable the virtual alias, insert the below into /etc/postfix/main.cf
virtual_alias_maps = hash:/etc/postfix/virtual
Now restart postfix, and send a mail to root
sudo /etc/init.d/postfix restart
echo "hmm" | sendmail root
This worked for me at Ubuntu Dapper and Ubuntu Edgy.
