Hi all,

I have check_recipient_mx_access setup to route mail for certain providers
through a relay. This has been working well, until I discovered it is
breaking delivery to local users that get CC'd in an email that is being
routed through this relay.

Here is how I have it setup:

smtpd_recipient_restrictions = check_recipient_mx_access
hash:/etc/postfix/mxrelay permit_mynetworks permit_sasl_authenticated
check_client_access hash:/etc/postfix/rbl_override reject_rbl_client
b.barracudacentral.org reject_rbl_client zen.spamhaus.org
check_policy_service unix:/var/spool/postfix/postgrey/socket

[root@main log]# cat /etc/postfix/mxrelay
outlook.com FILTER relay:[in-v3.mailjet.com]:587
prodigy.net FILTER relay:[in-v3.mailjet.com]:587
yahoodns.net FILTER relay:[in-v3.mailjet.com]:587
google.com FILTER relay:[in-v3.mailjet.com]:587


If an email gets sent where the "To" address triggers the relay, and a
local user is CC'd in the email, the CC for the local user *also* gets sent
through the relay, and the address is mangled. Here's what I mean by this,
here's an example log line for a local user that should have been delivered
directly, getting sent through the relay. Note that the "to" address has
been mangled to a local user delivery address. This of course ends up being
blocked/bounced on the relay side:

Jun  9 18:12:27 main postfix/smtp[24065]: B31CEC37: to=<
russell-example....@main.example.com>, orig_to=<russ...@example.com>, relay=
in-v3.mailjet.com[104.199.96.85]:587, delay=1.9, delays=0.15/0.01/1.5/0.28,
dsn=2.0.0, status=sent (250 OK queued as
49cd4c02-9c27-4d9d-958f-1a5ef2a64c24)

How can I do MX filtering and relaying, while telling Postfix to never send
a local domain through the relay?

Thank you for the help!

Reply via email to