In postfix, when you need your e-mails for some specific domains to relay through another server ( your ip is blocked or for some other reason ) you can specify custom transport maps in the postfix config.

You have to setup postfix to use custom transport maps :

inĀ  main.cf enable the transport_maps directive :

transport_maps = hash:/etc/postfix/transport

then edit the file /etc/postfix/transport and add to it :

example.com smtp:your.second.mailserver.com

close it and then rebuild the transport database file by entering the following command :

postmap /etc/postfix/transport

restart postfix and now every e-mail sent to example.com will relay through your specified e-mail server.