Skip to main content
Enter TitanOS

Email authentication error

DKIM body hash did not verify: what changed the message

A DKIM signature includes a hash of the message body, written in the bh= tag. The receiver recalculates that hash on what arrived, and if the two differ it reports body hash did not verify. The plain meaning is that the body was altered after it was signed, even by a single character.

By Kyle Deligny, Titanos, Brisbane. Last reviewed 1 December 2026. General information, not legal advice.

In a small business the cause is almost always a system that adds something to outgoing mail: a legal disclaimer, a marketing footer, a link scanner or a mail archive. This page shows how to find the step that edits the message and how to put signing in the right place. The rules are in RFC 6376.

What the hash covers

The signer takes the body, applies a canonicalisation, and hashes it. Canonicalisation smooths over trivial changes. The relaxed setting ignores differences in white space and folds trailing spaces, while the simple setting treats almost any change as a difference. Many services sign with relaxed for the body, but you cannot assume it.

A signature can also carry an l= tag, which limits the hash to the first number of bytes of the body. This allows text to be added at the end without breaking the check, but RFC 6376 section 8.2 warns that it opens a way for others to add content to a signed message, so most senders leave it out.

Common places the body changes

Footers and disclaimers are the usual cause. If your mailbox platform signs the message and then a separate gateway appends a disclaimer on the way out, the body no longer matches. The same happens with tracking pixels added by a marketing tool, and with link rewriting by a security filter that replaces each URL with its own.

Mailing lists and forwarding services edit subject lines and bodies. A list that adds a footer breaks the signature of every message it relays, which is the subject of our page on DKIM after forwarding.

Line endings and encoding also matter. A system that converts the body between character sets, re-wraps long lines or changes line endings can alter bytes while the text looks identical to a reader. A device that sends by email through a relay can do this too.

How to find the culprit

Send a message from the affected system to a mailbox you control and look at the full headers. Count the Received lines to see every hop the message took. If a hop sits between your signer and the outside world, that hop is a suspect. Many mailbox platforms also show the failing reason in a header such as Authentication-Results, with body hash did not verify spelled out.

Then test with the footer or filter switched off. If the result changes to pass, you have found the editor of the message.

Putting the steps in the right order

The fix is to make every change before the signature is applied. Configure the disclaimer or link rewriting to run first, and let the signing step be the last one before the message leaves your control. If the gateway that edits mail cannot go first, have it do the signing itself with a key published for your domain.

If the system that changes the body is outside your control, such as a recipient's own filter, nothing you do can prevent it. Make sure SPF passes and aligns so DMARC still has one good route, and use the DMARC alignment guide to confirm.

Trace and fix a DKIM body hash failure

  1. Send a test message to an outside mailbox and open its full headers.
  2. Confirm the failure reads body hash did not verify and not a missing key.
  3. Note the c= canonicalisation setting in the DKIM-Signature header.
  4. List every system that touches outgoing mail after the mailbox platform.
  5. Switch off footers, link rewriting and tracking one at a time and re-test.
  6. Move the editing step ahead of the signing step.
  7. If an edit cannot move, make that system sign with your domain's key.
  8. Check printers and apps that send through a relay are routed through signing.
  9. Confirm dkim=pass on a fresh test and that the domain aligns with From.
  10. Re-test after any change to disclaimers or security filters.

Questions people ask

Is a body hash failure a security attack?

Usually not. In small businesses it is nearly always a footer, filter or relay that edits the message. A message changed on purpose by an attacker would fail the same way, which is why the check exists.

Does relaxed canonicalisation solve it?

It tolerates small changes in spacing and line folding, but not added text or rewritten links. Check what your signer uses, and still fix the order of steps.

Should I use the l= tag so footers are allowed?

RFC 6376 warns against relying on it because it lets others add content to a signed message. Fixing the order of steps is safer.

Will SPF still pass if DKIM fails?

It can. SPF checks the sending address, not the body, so a message may pass SPF and fail DKIM. DMARC needs one aligned pass.

Where to from here

The free privacy policy audit reads your published privacy policy against the Australian Privacy Principles and tells you what is missing. Privacy Care keeps your policy and your shopper data practices current for AU$149 a month, with a 3-month minimum. Would it be okay if we showed you what the audit finds? A no is welcome.

Get the free auditSee Privacy CareBook a call

Sources

  1. RFC 6376, DomainKeys Identified Mail (DKIM) Signatures, sections 3.4, 3.5 and 8.2
  2. ASD, how to combat fake emails
  3. RFC 7489, DMARC
Book a free call