dkim=fail (body hash did not verify) header.d=example.com
dkim=neutral (body hash did not verify)
A DKIM signature includes a hash of the message body. The receiver computed the hash again and got a different result: the body was changed after the message was signed. Even one added space or line break is enough.
What changes the body
- Mailing lists that add a footer ("You received this because…") or rewrite the subject. See mailing lists and forwarding.
- Email security gateways and antivirus that rewrite links, add a banner like "External sender", or strip attachments.
- Signature and disclaimer tools that add a company signature on the way out, after your mail provider already signed the message.
- Your own server signing too early. If DKIM signing happens before another step that edits the message (a content filter, a relay that converts encodings), the signature breaks every time.
- Line-ending or encoding changes by a relay: converting 8-bit to quoted-printable, or long lines being wrapped.
How to fix it
- Compare where the message was signed with the hops listed in its
Received:headers. The culprit sits between the signer and the receiver. - Make DKIM signing the last step before mail leaves your organisation. Signature and disclaimer tools should run before signing, or sign themselves.
- Use
relaxed/relaxedcanonicalization (c=relaxed/relaxedin the signature). It tolerates whitespace changes. Most providers use it by default. - If the change happens at the recipient's side (their gateway or a mailing list), you can't fix it at your end. Receivers that support ARC may still accept the message.