I've set up a postfix server that relays email to another server, this is working fine. I managed this using the relayhost variable.
relayhost = 220.127.116.11
This means all incoming emails are sent to that server, which is good. However, local email sent from the server where postfix is installed, for example using:
$ mail -s "subject example" email@example.com
are also being sent to the relay host, however, I only want this server to use relayhost for incoming email, for outgoing emails it should use itself as smtp. How can I achieve this?