Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible for Postfix to transport mail differently by specific domain?

I.e. - uses the default settings to mail from postfix - needs to use a relay server @ 123xyzcom - needs to use relay server @

I've modified transport as i.e.:

domain.tld process33:

Then in I've added:

process33        unix    -  -   n   -   1   smtp

then in I've added:

process33_relayhost =
process33_sasl_auth_enable = yes
process33_sasl_security_options = noanonymous
process33_sasl_password_maps = hash:/etc/postfix/sas2_passwd
process33_use_tls = yes
process33_tls_security_level = encrypt
process33_tls_note_starttls_offer = yes
process33_tls_CAfile = /etc/ssl/certs/ca-bundle.crt

However none of this is working.. I've set mydestination to the local URL; yet it does not work. This needs to catch outgoing email from a specific hosted site and route it through Amazon's SES.

share|improve this question
up vote 0 down vote accepted

I was able to solve this by:

  1. Utilizing: sender_dependent_relayhost_maps - by catching the email sender and forwarding into a unix socket called "server33"
  2. Utilizing: transport_maps to push into
  3. Adding the sasl / password map for this transport by appending "server33" before the parameters.
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.