At Tue, 25 May 2021 12:56:15 -0400 (EDT), pnew...@toosan.com wrote:-

>Good afternoon!
>
>I have set up a postfix/spamassassin (PF/SA) system that is handling mail for 
>three of my domains enroute to the system that end-users ultimately retrieve 
>mail from (rackspace).  It is working but I had to do it in a convoluted way 
>that I am not happy about.
>
>My scenario:
>
>MX records for (3) domains point to PF/SA system
>Mail is processed by PF/SA then destination address is rewritten to a single 
>4th domain
>MX of 4th domain is rackspace, so PF appropriately forwards email to that IP
>End-users pick up mail as normal from rackspace
>
>I would like for my PF/SA system to actually do this without having to do 
>address rewrite to 4th domain to get it sent on.  
>
>- ONLY accept mail for domains I own (via domain MX record)
>- Run accepted email for those domains through SA (I have this working now, 
>think it is fine)
>- Send SA filtered mail on to the rackspace email system. this is where I get 
>in trouble. I can't set the MX record to both my PF/SA system and rackspace so 
>I got a 4th domain and set the MX to rackspace and rewrite all outgoing 
>messages to that domain.)

This can be achieved by relaying the email and using:-

transport_maps = hash:/etc/postfix/transport-domains

where transport-domains contains:-

domain1.zzz :[hostnameofrackspaceserver]
domain2.zzz :[hostnameofrackspaceserver]
domain3.zzz :[hostnameofrackspaceserver]

The square brackets are important to prevent Postfix trying to lookup the
MX records for the Rackspace server; you just want the email relayed to it.

>- Bounced messages must NOT be sent to rackspace (eg: rackspace can't be my 
>relayhost)

Your Postfix instance will use normal MX delivery for all messages EXEPT
for the 3 domain?.zzz listed above.

>
>Thanks for any direction you may have!
>
>Phil

Best wishes,
Matthew

Reply via email to