Background:
I use the SMTP server at my domain to send email using Outlook on my laptop. Gmail is reporting SPF failure because gmail is checking the IP from the earliest Received header, that is, from the header that shows my home office IP. Of course that home office IP should not be part of my domain's SPF. Note: If you do a search, you will see numerous mentions of this issue of Gmail doing an SPF check against the user's IP rather than against the SMTP server's IP and thus SPF failing.
Partial solution:
Based on what I read in another cPanel forums post, I was able to configure exim to remove the earliest Received header during SMTP, that is, the header that shows my home office IP. Gmail now shows SPF passed since it now checks my SMTP server's IP. See the following post Remove Received Header using exim acl - hide local ip during smtp which says to add the following setting for acl_smtp_data:custom_begin_outgoing_smtp_checkall:
Problem:
The problem with the above partial solution is that it removes the Received header and its information. I want to keep the information from that Received header but in a different header name. That way, the information is still available in case I need it for debugging.
Q1:
Is there a way to configure exim to rename a header? For example, "Received" to "X-Received".
Q2:
Alternatively, is there a way to configure exim to add a new header that copies the value from another header? For example, adding "X-Received", copying from "Received".
Thanks.
I use the SMTP server at my domain to send email using Outlook on my laptop. Gmail is reporting SPF failure because gmail is checking the IP from the earliest Received header, that is, from the header that shows my home office IP. Of course that home office IP should not be part of my domain's SPF. Note: If you do a search, you will see numerous mentions of this issue of Gmail doing an SPF check against the user's IP rather than against the SMTP server's IP and thus SPF failing.
Partial solution:
Based on what I read in another cPanel forums post, I was able to configure exim to remove the earliest Received header during SMTP, that is, the header that shows my home office IP. Gmail now shows SPF passed since it now checks my SMTP server's IP. See the following post Remove Received Header using exim acl - hide local ip during smtp which says to add the following setting for acl_smtp_data:custom_begin_outgoing_smtp_checkall:
Code:
warn message = Remove internal headers
remove_header = Received
The problem with the above partial solution is that it removes the Received header and its information. I want to keep the information from that Received header but in a different header name. That way, the information is still available in case I need it for debugging.
Q1:
Is there a way to configure exim to rename a header? For example, "Received" to "X-Received".
Q2:
Alternatively, is there a way to configure exim to add a new header that copies the value from another header? For example, adding "X-Received", copying from "Received".
Thanks.
Last edited: