Diagnostic

DKIM signature did not verify

Error · sig.signature.invalid

The signature does not verify over the canonicalised headers with the published key.

What it means

The b= tag holds the signature itself. It covers the header fields listed in h=, in that order, and the DKIM-Signature header with b= left empty, all canonicalised as c= says. dkim.fyi rebuilds that text from the message you gave it, fetches the public key at the s= selector of the d= domain, and checks b= against it. The check failed.

A signed header was modified, the key does not match the signer, or the headers were incomplete or reformatted. The body plays no part in this check; it has its own, the body hash.

With a full message this is an error and the result is “fail”. With headers only it is a warning: the header signature is still checked, but the result is “not attempted” because the body hash could not be. The email check reads only headers, so it reports this case as the warning.

How to fix it

  1. Paste the complete original headers from the raw view of the received message. A client that refolds or drops headers produces this failure on its own.
  2. Validate the selector from s= for the domain in d=. If the record at that name was replaced after the message was sent, the published key is no longer the one that signed it; test with a fresh message.
  3. Send a fresh message to the email check, which reads the headers exactly as they arrive and checks the header signature against the current key.
  4. If fresh mail fails too, something between the signer and the receiver changes one of the headers listed in h=, or the signer uses a private key that does not match the published key.

Check again

Sources

  1. RFC 6376: DomainKeys Identified Mail (DKIM) Signatures
  2. RFC 8601: Message Header Field for Indicating Message Authentication Status