Exchange is modifying emails before forwarding them out to an external Google Apps account. I'm hoping to find a way to fix this.
Here's some more detail:
Using Exchange 2010 SP3 Version 14.3.123.4
The exchange server is forwarding email of some users out to Google Apps accounts (using an External Contact in AD). Exchange is set to put the emails in the user's mailbox and also forward a copy to their Google Apps account. The issue is that outside emails (from @google.com for example) are failing the DKIM check on the Google Apps side after being forwarded from Exchange and they are marked as spam. I got this info from looking at the email source and seeing this message:
Authentication-Results: mx.google.com;
dkim=neutral (body hash did not verify) header.i=@example.com;
spf=pass (google.com: domain of user@mydomain.com designates 1.1.1.1 as permitted sender) smtp.mailfrom=user@mydomain.com;
dmarc=fail (p=REJECT dis=NONE) header.from=example.com
- user@mydomain.com - a user with an exchange mailbox and Google apps
account - 1.1.1.1 - outside IP of Exchange server, included in SPF record
- example.com - outside public domain that has dmarc configured
Testing and results of direct vs forwarded emails:
Below is a sample of two emails. One email was sent to the Exchange server user's email address, the other email was sent directly to the Google Apps email address using the temporary Google Apps assigned domain alias (user@mydomain.com.test-google-a.com).
The subject and body were exactly the same in both emails sent out. The only difference between the two received is that the Exchange forwarded email had modified the body boundaries and the charset value now has quotes around the UTF-8.
Direct to Gmail (user@mydomain.com.test-google-a.com):
Content-Type: multipart/alternative; boundary=001a1149a47ee5ea57053414b981
--001a1149a47ee5ea57053414b981
Content-Type: text/plain; charset=UTF-8
Test body
--001a1149a47ee5ea57053414b981
Content-Type: text/html; charset=UTF-8
<div dir="ltr">Test body
</div>
--001a1149a47ee5ea57053414b981--
Forwarded from Exchange (user@mydomain.com):
Content-Type: multipart/alternative; boundary="001a1149a47ee5ea57053414b981"
--001a1149a47ee5ea57053414b981
Content-Type: text/plain; charset="UTF-8"
Test body
--001a1149a47ee5ea57053414b981
Content-Type: text/html; charset="UTF-8"
<div dir="ltr">Test body
</div>
--001a1149a47ee5ea57053414b981--
I have a feeling that the DKIM fails because Exchange has added the quotes to the charset and boundary parameter values. Hopefully there is a way to disable this and then emails will pass the dkim without issue.