Email errors
DKIM body hash did not verify: causes and how to fix it
DKIM body hash did not verify means the message no longer matches the bh= value in its signature. Find what changed it and confirm dkim=pass.
What this means
DKIM body hash did not verify means the receiving server hashed the message body again and got a different value from the bh= tag in your DKIM signature, which stores a fingerprint of the content. The signature fails as a result.
RFC 6376 calls this PERMFAIL (body hash did not verify). Microsoft 365 writes:
dkim=fail (body hash did not verify) header.d=example.com
The closest error, signature did not verify, comes from checking the signed headers with your public key. See DKIM fail. The body comparison uses no key, so a new key or DNS record will not clear this error.
DKIM-Signature body hash not verified
MxToolbox shows DKIM-Signature Body Hash Not Verified for the same mismatch. Broadcom warns that such tools recalculate the hash from what you paste and can create a false alarm. Trust the receiving server's Authentication-Results header.
Why it happens
Something changed the body after signing, or the signer hashed a different form of the message than it sent. Check these:
- Gateways and transport rules that add a footer, disclaimer or scan notice.
- Mailing lists, which add lines, reformat MIME parts or replace large attachments with links.
- Forwarders that edit content. Plain relaying generally keeps signatures valid, per RFC 9989, but Google warns that forwarded mail can still fail DKIM.
- A non-Microsoft filter in front of a Microsoft 365 mailbox, which can change the message before delivery.
- Encoding and line endings. Converting 8-bit text to 7-bit in transit breaks signatures. Bare CR or LF must become CRLF before signing.
The c= tag sets the tolerance, called canonicalization. The name after the slash is the body rule. simple ignores only trailing empty lines. relaxed also ignores line-end whitespace and reduces runs of spaces or tabs to one space. A lone c=relaxed or a missing c= means simple for the body. Neither rule tolerates added text.
How to fix it
-
Copy the full headers of a failing message. In Gmail, choose More next to Reply, then Show original. Paste them into the email header analyzer. A message can carry several signatures, so match
header.dorheader.ion the failed result to itsDKIM-Signature. -
Check the scope. Google advises checking whether other allowed sources in your domain also fail DKIM. Several failing sources point to something shared, such as a gateway.
-
Trace the path. Each SMTP server adds a
Receivedline at the top, so read from the bottom up and list every system after the signer. If those systems addedAuthentication-Resultslines, the change sits between the lastdkim=passand the firstdkim=failfor that signature. Otherwise start with the causes above. -
Make signing the last step. Ask the operator of the system you found to stop changing the message, move the footer to the system that signs, or have the gateway sign after its change.
Caution: if a new system will sign, publish its key under a new selector (the label that names a key in DNS) and confirm it resolves with the DKIM checker before you switch. A missing key also fails. Under
p=quarantineorp=reject, mail with no other aligned pass can go to spam or be refused. Test on a small stream and keep the old selector published until mail signed with it is delivered. -
For whitespace changes, set
c=relaxed/relaxedif your signer allows it. For encoding changes, convert 8-bit content to quoted-printable or base64 before signing. -
If you receive this mail in Microsoft 365, cannot change the service and it adds
ARC-Sealheaders, add theird=domain (the vendor's, not yours) as a trusted ARC sealer. ARC (Authenticated Received Chain) preserves the original authentication results. Add only services you use, because Microsoft warns that unnecessary sealers increase your attack surface.
Confirm the fix
Send a new message along the same path. Look for dkim=pass with your domain in header.d or header.i, at the receiver that reported the failure. If you used step 6, dkim=fail stays in the header: look for compauth=pass reason=130 instead, in a message sent at least 30 minutes after the change.
Then watch your DMARC aggregate reports for that source. They list DKIM results with the domain and selector.