0

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.

Michael Mikhjian
  • 185
  • 1
  • 1
  • 12

1 Answers1

0

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.
Michael Mikhjian
  • 185
  • 1
  • 1
  • 12