Conditionnal relay in postfix

Posted by Florent on Server Fault See other posts from Server Fault or by Florent
Published on 2012-06-20T13:57:25Z Indexed on 2012/06/21 15:18 UTC
Read the original article Hit count: 250

Filed under:
|
|
|

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

© Server Fault or respective owner

Related posts about linux

Related posts about email