Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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 :

address@domain.com smtp.relay.com

So when I send an email with sender email "address@domain.com", 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...


share|improve this question

1 Answer 1

up vote 1 down vote accepted

Okay, I found the solution... :)

So in the main.cf I add, before "sender_dependent_relayhost_maps" :

transport_maps = hash:/etc/postfix/transport

And, in "transport" file, I just add :

domain.com smtp:

(nothing else after "smtp:" which significate that the smtp server will send directly the email)

Thanks anyway. ;)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.