Fail

A DKIM signature doesn't match the headers

The short version

Check that signed headers aren't rewritten after signing and the key in DNS is the signing key.

What it means

The body hash matches, but the signature itself doesn't verify against the key in DNS. Either one of the signed headers (listed in the signature's h= tag) changed after signing, or the key published in DNS isn't the one that signed the message.

Why it matters

Receivers treat a broken signature like no signature, so DKIM can't help DMARC pass. Typical causes are a gateway or list rewriting the Subject (adding a tag such as [team]), changing the From address or reformatting headers, or a key rotation where DNS was updated but the server still signs with the old private key.

How to fix it

  1. Look at the signed header list in the result and compare it with the message: a tagged Subject or a rewritten From is a strong hint.
  2. If a system of yours changes headers, move that change before the signing step.
  3. If nothing changed, compare the public key in DNS with the private key the sender uses. Most services show the expected record; publish it exactly as given, without line breaks or extra quotes.
  4. After a key rotation, keep the old selector published until every server signs with the new key.

Check it worked

Send a new message, save it and upload it to the DKIM verifier. The signature should verify.