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.

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

I.e. domainxyz.com - uses the default settings to mail from postfix domain55zy.com - needs to use a relay server @ 123xyzcom thisdomain.com - needs to use relay server @ 555zyx.com

I've modified transport as i.e.:

domain.tld process33:

Then in master.cf I've added:

process33        unix    -  -   n   -   1   smtp

then in main.cf I've added:

process33_relayhost = email-smtp.us-east-1.amazonaws.com:25
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

1 Answer 1

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 DOMAINXYZ.com:25
  3. Adding the sasl / password map for this transport by appending "server33" before the parameters.
share|improve this answer

Your Answer

 
discard

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.