Postfix : relay based on sender address AND recipient address
- by Pierre Mourlanne
I have configured postfix to relay mails based on the recipient address. In transport I put something like this:
recipientdomain.com relay:[my.relay.com]
This works fine, when I send an e-mail to [email protected], it does get relayed through my.relay.com. I want to be able to use this relay only when the message comes from a specific address, say [email protected].
Two quick examples:
Mail 1: from [email protected] to [email protected] - does not get relayed
Mail 2: from [email protected] to [email protected] - gets relayed
How can I configure Postfix to achieve this?