[ DKIM ]

Inspect which headers a DKIM signature protects

Read the h tag, repeated fields and canonicalization before claiming a message header was protected.

By the EmailAuth research team

[ Key points ]

  • From must be signed, while the h tag identifies other selected headers.
  • Repeated names select physical occurrences from the bottom upward.
  • Relaxed canonicalization changes specified formatting, not the meaning of field values.
On this page

A DKIM pass does not mean every displayed header was signed. Each signature selects header fields through its h tag and applies a specified canonicalization algorithm. To decide whether a subject, recipient field or other value was protected, inspect the actual coverage of the passing signature.

Start with the right signature

Record d, s, h and c for each DKIM-Signature header. Associate the receiver's trusted result with the corresponding signature rather than treating a message-level pass as evidence about all of them. A signature must include From, but not every other header is mandatory. RFC 6376 §5.4 explains the selection rules and recommends useful coverage.

If Subject is not selected, a change to Subject does not by itself alter the data protected by that signature. That statement is about cryptographic coverage, not whether the modified message is acceptable. A receiving service can still apply independent policy. Similarly, signing To does not bind the SMTP envelope recipient: the visible To header and RCPT TO address are different data; RFC 5321 §2.3.1 separates the SMTP envelope from message content.

Account for repeated fields

The h tag is not simply a set of unique names. Under RFC 6376 §5.4.2, repeated names select repeated physical occurrences, working from the bottom of the header block upward. For example, if a message has three Received fields and h lists Received twice, the bottom two occurrences are selected. Adding more occurrences of a name to h than exist at signing can detect later insertion of that field. This technique is often called oversigning.

Do not conclude that a topmost field is signed merely because its name appears once in h. Reconstruct the selection against the actual header block. Duplicate fields that should ordinarily be singular also raise parsing and message-validity questions; a DKIM calculation is not permission to ignore those concerns.

Distinguish value changes from normalized formatting

Under simple header canonicalization, the selected field must be presented exactly as signed. Relaxed header canonicalization lowercases field names, unfolds continuation lines and normalizes specified whitespace. It does not lowercase field values or make different subject text equivalent. Read the selected algorithm before attributing a failure to capitalization or rewrapping.

Illustrative test specification: one controlled signature selects From and Subject. Changing the Subject words is expected to invalidate that signature. A second signature selects From but omits Subject; the same subject change need not invalidate the second signature. The contrast explains expected coverage, not an endorsement of omitting Subject.

Improve coverage at the signer

Choose fields that affect the recipient's interpretation and can remain stable through the supported route. Inspect the recommendations in RFC 6376 §5.4.1 and your signer's capabilities. Avoid casually signing trace fields that legitimate transport will add or alter. Test the complete route with duplicate-field and formatting cases in a controlled environment.

Document the intended coverage profile alongside the signing configuration. A useful review states exactly which headers and occurrences are protected, which normalizations are allowed and which fields remain outside the signature. That is more defensible than describing DKIM as a seal over the entire message.

Trace a synthetic header selection

Imagine three X-Example fields in physical top-to-bottom order: newest, middle, oldest. A signature listing h=From:X-Example:X-Example selects oldest and then middle, not newest. With only one X-Example present at signing, listing X-Example twice also includes an absent occurrence; later insertion of another X-Example changes the selected input and can invalidate the signature. This is a selection exercise, not an executed signature test or a recommendation to permit duplicate normally singular fields.

[ Takeaway ]

From must be signed, while the h tag identifies other selected headers. Repeated names select physical occurrences from the bottom upward. Relaxed canonicalization changes specified formatting, not the meaning of field values.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Reconstruct field selection

Repeated names require physical header ordering.

Next steps

  1. Inspect each signature separately.
  2. Test duplicate-header handling.

CISO / SecOps

Review interpretation risks

Uncovered fields and parser differences can affect what users trust.

Next steps

  1. Record coverage exceptions.
  2. Keep receiver validation in scope.

Founder / Non-technical

Use precise assurance language

Ask which customer-visible fields are protected rather than accepting a blanket integrity claim.

Next steps

  1. Include Subject in coverage reviews.
  2. Separate delivery from integrity.

[ FAQs ]

Frequently asked questions

Does DKIM sign every header?

No. The h tag identifies selected header fields, with special handling for repeated occurrences.

RFC 6376 §3.5

Must From be signed?

Yes. RFC 6376 requires the From field to be included in the signature’s header coverage.

RFC 6376 §5.4

Is visible To the same as envelope recipient?

No. Signing To does not cryptographically bind the SMTP RCPT TO address.

RFC 5321 §2.3.1 RFC 6376 §3.7

Which repeated header is chosen first?

Selection begins with the physically last occurrence and works upward for repeated names in h.

RFC 6376 §5.4.2

What is oversigning?

Listing more occurrences of a field name than currently exist can cause later insertion of that field to invalidate the signature.

RFC 6376 §5.4.2

Does relaxed mode lowercase Subject text?

No. It lowercases field names, not field values, and applies specific whitespace normalization.

RFC 6376 §3.4.2

Can an unsigned Subject change while DKIM passes?

Yes, if the change does not affect other covered data. Receiver policy and message safety remain separate.

RFC 6376 §3.7

Should we sign every trace header?

Not automatically. Legitimate transit changes can make such coverage fragile. Follow the specification and test the actual route.

RFC 6376 §5.4

[ Sources ]

Sources

  1. RFC 6376

    Sections §1 · §3.4 · §3.4.1 · §3.4.2 · §3.5 · §3.7 · §5.4 · §5.4.1 · §5.4.2

  2. RFC 8601

    Sections §1.2

  3. RFC 5321

    Sections §2.3.1

[ Glossary ]

Glossary

DKIM
DomainKeys Identified Mail verifies selected message content against a signing domain’s public key.

RFC 6376 §1

Canonicalization
The specified transformations applied to headers or body before DKIM hashing and verification.

RFC 6376 §3.4

Signed header list (h)
The ordered DKIM signature tag listing selected header names, including repetitions when multiple occurrences are covered.

RFC 6376 §3.5

Oversigning
Including more occurrences of a header name in h than currently exist so later insertion can invalidate the signature.

RFC 6376 §5.4.2

SMTP envelope
Transport information including the sender and recipients, separate from the message headers and body.

RFC 5321 §2.3.1

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base