I configured my postfix server to relay all received mails to smtp.example.com with
relayhost. This server doesn't accept mails from an external source. So only scripts are sending mails.
Is it possible to configure postfix that all mails with a specific mail address in FROM field, like email@example.com (or also the whole domain: domain.net) are send directly by the server to the corresponding mx server for the TO-address, instead of using the specified relay host?
I found one possibility to specify a specific host if a specific mail address is in the TO field, but not the FROM field: How can I configure Postfix to ignore relayhost for some domains? and http://www.postfix.org/transport.5.html