On 5/25/2021 11:56 AM, 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.)
- Bounced messages must NOT be sent to rackspace (eg: rackspace can't be my
relayhost)
Thanks for any direction you may have!
Phil
Documentation for the general use case is here:
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall
So basically the domains you accept mail for should be listed in
relay_domains, the valid recipients should be listed in
relay_recipient_maps, and the routing to the final destination is
defined in transport_maps.
-- Noel Jones