postfix: deliver mail to specific emai addresses locally and send the rest to relayhost
I finally figured out the correct syntax in the transport configuration file:
Add the following to /etc/posfix/transport:
[email protected] :
* relay:[my.mailserver]
and run
postmap transport
postfix reload
The correct way to do this is add the following to /etc/posfix/transport
[email protected] local:
* relay:[my.mailserver]
Then add the following to /etc/postfix/main.cf
:
transport_maps = hash:/etc/postfix/transport
Then run:
sudo postmap hash:/etc/postfix/transport
sudo /etc/init.d/postfix restart