On a DKIM key record, what does publishing an empty p= value do, and how does it differ from deleting the selector's record?
answer
- a record that says no
- same verdict either way
- the reason code differs
- a gravestone for the name
basics
~20 sAn empty p= marks the selector's key as revoked: verifiers must fail its signatures with PERMFAIL (key revoked). Deleting the record fails them too; the empty record only states the revocation explicitly and discourages reusing the selector.
solid answer
~40 sRFC 6376 section 3.6.1 defines `p=` as REQUIRED and says an empty value means the key has been revoked. Section 6.1.2 then has the verifier treat any signature naming that selector as a failed check and return `PERMFAIL (key revoked)`; if the record has been deleted instead, it returns `PERMFAIL (no key for signature)`. The RFC states there is no defined semantic difference between the two. RFC 5863 section 3.5.2 gives the reason to prefer the empty record: the signer explicitly says the key is revoked, and the record is a gravestone that makes accidental reuse of the selector with a different key less likely. Either way the receiver ignores the failed signature and judges the message on what else passes.
code
dns · 4 lines; retired selector, revoked: a gravestone
s2025a._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p="
; current selector
s2026a._domainkey.example.com. 3600 IN TXT "v=DKIM1; k=rsa; p=MIIBIjANBgkqh...IDAQAB"go deeper
Recall that an empty p= on a DKIM key record means the key is revoked and every signature using that selector now fails.
Explain the verifier's steps: missing record and empty p= are both immediate permanent failures, and the failed signature is then ignored as if absent.
Choose revoke over delete for the explicit statement and the gravestone, and remember cached copies keep the old key usable until their TTL expires.
Make the empty-p= gravestone the standard end state for retired selectors, so selector names are never recycled and old evidence stays unambiguous.
## What the empty p= says A **DKIM key record** is a TXT record at `<selector>._domainkey.<domain>`. Its `p=` tag holds the public key in base64 and is the one REQUIRED tag (RFC 6376 section 3.6.1). The same section gives the empty value a meaning of its own: **"An empty value means that this public key has been revoked."** RFC 6376 also says that a tag with an empty value is not the same as an omitted tag: the empty string *is* the value. So `v=DKIM1; p=` is a well-formed record whose message is "this selector exists, and nothing signed with it is valid". The RFC's rationale names the cases: a private key that "has been compromised or otherwise disabled (e.g., an outsourcing contract has been terminated)", where the signer wants to say it knows about the selector but that every message using it should fail. ## What a verifier does with it RFC 6376 section 6.1.2 runs these steps when it fetches the key: 1. Query `s=` under `d=` for the key record. 2. If the query fails to respond, it MAY return `TEMPFAIL (key unavailable)` and try later. 3. If the record does not exist, it MUST immediately return `PERMFAIL (no key for signature)`. 4. If `p=` is empty, it MUST treat the signature as a failed check and return `PERMFAIL (key revoked)`. What happens next is the same in both permanent cases. RFC 6376 section 4 says identity assessors SHOULD ignore signatures that produced PERMFAIL, **"acting as though they were not present in the message"**. Under that rule a revoked key does not make a message worse than unsigned; it removes that signature from the evidence, though a receiver's local policy may still weigh failures. Whether the message is then accepted depends on its other signatures, its SPF result and the From domain's DMARC policy. ## Revoke or delete | | Empty `p=` | Record deleted | |---|---|---| | Verifier result | `PERMFAIL (key revoked)` | `PERMFAIL (no key for signature)` | | Retried later? | no | no | | Semantic difference (RFC 6376) | none defined | none defined | | Says the key was revoked on purpose | yes | no | | Guards the selector name | yes, a gravestone | no | RFC 6376 section 3.1 notes that a domain phasing out a key "would probably simply remove the key record" after the transition period, but could revoke it and keep the record for a further period. RFC 5863 section 3.5.2 lists both options and explains the empty record's value: the explicit statement, and the gravestone that makes the selector less likely to be reused by accident with a different key. ## When to publish it - **At the end of a planned rollover**, once mail signed with the old key has had time to be verified. - **At once after a key is exposed**, accepting that legitimate mail still in flight fails DKIM. - **When an outside sender's contract ends**, for a selector whose record you publish yourself. - **When a person who held the private key leaves**: RFC 5863 section 3.1 says keys held by a departing key holder need to be withdrawn from service. ## Seeing it in the evidence - On a received message, the `Authentication-Results` header field written by the receiver shows a `dkim` result other than `pass`, with `header.s` naming the revoked selector. - In DMARC aggregate reports, rows for that selector stop showing `pass`. If a host you run still appears there, it was missed in the rollover; if an address you do not run appears, someone else holds the key. - Neither tells a receiver *why* the key was revoked; the record says only that it was, which is all a verifier needs. ## Mistakes worth catching - Reading an empty `p=` as "no key restriction". It is a revocation, not a wildcard. - Expecting a deleted record to produce a temporary error that buys time: a nonexistent record is an immediate permanent failure. - Believing a revoked selector affects the domain's other selectors. Each selector is fetched and judged on its own. - Reusing a retired selector name for a new key. Old signatures then meet a key that does not match them, and logs that cite the selector become ambiguous. - Forgetting the cache: verifiers that already hold the old record can keep using it until its TTL runs out, so revocation takes effect gradually.
- Does a revoked DKIM key make a message look worse to the receiver than an unsigned one?Not by the standard. RFC 6376 section 4 says identity assessors SHOULD ignore signatures that produced PERMFAIL, acting as though they were not present. The message is judged on its other signatures, SPF and the From domain's DMARC policy, not penalised for the revocation itself, though a receiver's local policy may weigh failures.
- How long should an empty-p= DKIM gravestone stay published?No RFC sets a period; RFC 5863 leaves the deletion date to site policy. The record is a single small TXT record, so there is little reason to remove it while the selector name could still be reused or cited in old logs and reports.
- An empty p= means no key restriction, so signatures still pass.
- Deleting the key record buys time because verifiers retry later.
- Revoking one selector makes every DKIM signature for the domain fail.
- A message whose only signature is revoked is rejected by DKIM itself.
- A revoked selector name can be reused safely for the next key.