Conditionnal relay in postfix
- by Florent
I use postfix to send direct email. But, I use a relay to send email for specific senders. So I use "sender_dependent_relayhost_maps" :
/etc/postfix/main.cf :
relayhost =
transport_maps = hash:/etc/postfix/transport
smtp_sender_dependent_authentication = yes
sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
/etc/postfix/sender_relay :
[email protected] smtp.relay.com
So when I send an email with sender email "[email protected]", postfix will use the relay.
But... I don't want to use the relay host for some recipient. ;)
I think I must use "transport_map" to catch the email before it pass through "sender_dependent_relayhost_maps" but I don't know how to do it...
Thanks