We want to rewrite or modify the headers of all incoming emails which are automatically forwarded to third party domains.
For example:
We have [email protected] which forwards all incoming emails to [email protected]
In this case, what we want to achieve is to rewrite the headers like the following:
FROM THIS:
From: [email protected] (or this could also come form the same domain)
To: [email protected] (we hope to apply also the same rule on cc and bcc mails)
Cc: user2@ourdomain, [email protected]
Subject: original subject
TO THIS:
From: "[email protected]" <[email protected]>
(or the string can be the name of the original sender if available instead of the email address)
To: [email protected]
Cc: user2@ourdomain, [email protected] (one question here is - will these send another email to these Cc email addresses or not?)
Reply-to: [email protected]
Subject: original subject
QUESTIONS:
1. Can we achieve this through Exim Configuration Manager in WHM?
2. Can we achieve this through Global Email Filters in CPANEL?
3. I've already read some threads about rewriting headers with exim filters from:
While Mail Forwarding with exim, how do I rewrite the To header with true destination address
Exim Specification - 33 Address rewriting
1. Forwarding and filtering in Exim
https://confluence2.cpanel.net/display/CKB/How+to+Customize+the+Exim+System+Filter+File
...but where should I really start? Which file should I create or modify. Which line should I insert my code? Should I use the exim file, .forward or .filter?
The main reason behind this is we are actually having issues forwarding incoming emails to third party addresses like gmail or yahoo. One of the common problems we are getting is the:
"Unauthenticated email from thirdpartydomian.com is not accepted due to domain's DMARC policy."
Even though we have a successful SPF and DKIM authentication in place.
And lastly, is this the a recommend approach to resolve the issue or there are other ways to resolve this?
For example:
We have [email protected] which forwards all incoming emails to [email protected]
In this case, what we want to achieve is to rewrite the headers like the following:
FROM THIS:
From: [email protected] (or this could also come form the same domain)
To: [email protected] (we hope to apply also the same rule on cc and bcc mails)
Cc: user2@ourdomain, [email protected]
Subject: original subject
TO THIS:
From: "[email protected]" <[email protected]>
(or the string can be the name of the original sender if available instead of the email address)
To: [email protected]
Cc: user2@ourdomain, [email protected] (one question here is - will these send another email to these Cc email addresses or not?)
Reply-to: [email protected]
Subject: original subject
QUESTIONS:
1. Can we achieve this through Exim Configuration Manager in WHM?
2. Can we achieve this through Global Email Filters in CPANEL?
3. I've already read some threads about rewriting headers with exim filters from:
While Mail Forwarding with exim, how do I rewrite the To header with true destination address
Exim Specification - 33 Address rewriting
1. Forwarding and filtering in Exim
https://confluence2.cpanel.net/display/CKB/How+to+Customize+the+Exim+System+Filter+File
...but where should I really start? Which file should I create or modify. Which line should I insert my code? Should I use the exim file, .forward or .filter?
The main reason behind this is we are actually having issues forwarding incoming emails to third party addresses like gmail or yahoo. One of the common problems we are getting is the:
"Unauthenticated email from thirdpartydomian.com is not accepted due to domain's DMARC policy."
Even though we have a successful SPF and DKIM authentication in place.
And lastly, is this the a recommend approach to resolve the issue or there are other ways to resolve this?