Rewrite forwarded email headers in EXIM to avoid strict DMARC/SPF block ?

Mike S

Registered
Feb 28, 2018
1
0
1
Toronto
cPanel Access Level
Root Administrator
We have employees that are setting up email forwarding addresses that don't always work. The reason is, for example, a financial institution will use strict DMARC rules that will cause the emails to be rejected at the final destination gmail account. So we have concluded what we need to do is rewrite the header of the email as it passes through our intermediate EXIM mail server. The question is, how do we go about doing this?

So currently. a forwarded email's from headers would typically look like this if it were to be received:
From: "FirstName LastName" [email protected]
Reply-To: [email protected]

In our example, on our EXIM server our user made a forwarding rule to forward [email protected] to [email protected]

And we are looking for a way to set something up on EXIM to automatically change the from header header to the following if an email is being forwarded:
From: "FirstName sLastName - reception at removed.tld" [email protected]
Reply-To: [email protected]

*If there was no 'Reply-To' specified in the original email, set the 'Reply-To' to the original 'From' address.


How would we do this in our EXIM config?

Thank you in advance.
Sincerely,
Mike
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello Mike,

Have you checked to see if enabling Enable Sender Rewriting Scheme (SRS) Support under the Mail tab in WHM >> Exim Configuration Manager >> Basic Editor addresses this issue? Per it's description:

This option rewrites sender addresses so that the email appears to come from the forwarding mail server. This allows forwarded email to pass an SPF check on the receiving server.
I've seen reports from others that enabling this option allows emails forwarded to Gmail to deliver successfully.

Thank you.