What is an SPF void lookup under RFC 7208, and how can a retired vendor's leftover entry push a record into permerror?
answer
- added after RFC 4408
- empty answer or name error
- a SHOULD, with a default
- dead include: none, then error
- timeouts are a different result
basics
~20 sA void lookup is an SPF term's DNS query answered with NXDOMAIN or zero records; verifiers SHOULD allow two and return permerror beyond that. A leftover include is worse: a target with no SPF record gives permerror on its own.
solid answer
~40 sRFC 7208 section 4.6.4 defines a **void lookup** as a counted term whose query returns either `NOERROR` with no answers or `NXDOMAIN`, and says implementations SHOULD limit them to two, with two as the RECOMMENDED default where the limit is configurable; exceeding it gives `permerror`. The limit was new in RFC 7208, aimed at records that point many terms at names that do not exist. A retired vendor leaves two kinds of debris. An `a:` or `mx:` naming a decommissioned host simply fails to match, but it spends a void lookup, and a third one tips the check into `permerror`. An `include:` whose target no longer publishes an SPF record is worse: the included check returns `none`, and RFC 7208 maps that to `permerror` for the include itself the moment evaluation reaches it.
go deeper
Recall the definition: an SPF term's query that comes back NXDOMAIN or empty is a void lookup, and verifiers should allow only two.
Explain which DNS outcomes are void and which give temperror instead, and that the void limit is separate from the count of ten.
Show you can trace a permerror to a retired vendor's leftover include, explain why a dead include fails harder than a dead a: name, and make SPF cleanup part of offboarding.
Treat the SPF record as owned inventory with an offboarding step, so departed services cannot leave names that break mail months later.
## What counts as a void lookup SPF (RFC 7208, April 2014) evaluates a domain's `v=spf1` record by running its terms, several of which query DNS: `include`, `a`, `mx`, `ptr`, `exists` and the `redirect` modifier. Section 4.6.4 calls a query by one of those terms **void** when the answer is either: - a positive response (`RCODE 0`, `NOERROR`) whose answer section is **empty**, or - a **Name Error** (`RCODE 3`, `NXDOMAIN`): the name does not exist. The RFC says SPF implementations **SHOULD** limit void lookups to **two**. An implementation MAY make the limit configurable, in which case a default of two is RECOMMENDED. Exceeding the limit produces `permerror`. Note the strength: this is a SHOULD, not a MUST, so a verifier that allows more is not out of spec, but a domain owner has to assume receivers apply two. The limit did not exist in RFC 4408, the experimental SPF specification; RFC 7208's list of changes names it as a new DNS processing limit. Section 11.1 gives the reason: a record can aim many terms at names in another party's zone, and those names do not even need to exist to generate load, so verifiers abort after a small number of empty answers. ## What is not a void lookup | DNS outcome for a term's query | Void? | What the check does | |---|---|---| | `NXDOMAIN` | yes | counts toward the void limit; the term continues as if empty | | `NOERROR`, zero answers | yes | counts toward the void limit | | `SERVFAIL` or another error code | no | the check returns `temperror` (`ptr` is the noted exception) | | query times out | no | the check returns `temperror` | | answers present | no | normal evaluation | A separate guidance line in the same section covers time: a verifier SHOULD cap the elapsed time of the whole check, the cap SHOULD allow at least 20 seconds, and exceeding it SHOULD give `temperror`. A slow or broken name server therefore produces a temporary result, while names that cleanly do not exist produce a permanent one once there are too many. ## The debris a retired vendor leaves The usual source of void lookups is not malice but housekeeping. A company stops using a hosted sending service and nobody edits the SPF record. What happens next depends on which term is left behind: 1. **A host name in `a:` or `mx:`.** If the vendor deletes the host, the query returns `NXDOMAIN` or nothing. The mechanism does not match, evaluation moves on, and one void lookup is spent. Nothing visible happens until the third one. 2. **An `include:` whose target is gone.** The included check starts by looking up the target's record. If the name returns `NXDOMAIN` (section 4.3) or holds no record beginning `v=spf1` (section 4.5), the included check returns `none`. The table in section 5.2 maps a recursive `none` to `permerror` for the `include` itself. So a dead include does not just spend a void lookup; it ends the check with `permerror` as soon as evaluation reaches it. 3. **A dead `redirect=` target.** Section 6.1 makes a redirect to a domain with no SPF record a `permerror` too. Because evaluation stops at the first matching term, a dead include near the end of the record only hurts mail that did not match anything before it, which is why the fault can go unnoticed for a long time. ## Finding and preventing it - **Resolve every name the record touches** on a schedule, including names inside included records, and flag any that return `NXDOMAIN` or no answers. - **Remove a vendor's include in the same change** that ends the contract or migrates the sender; treat the SPF record as part of offboarding. - **Prefer `ip4:` and `ip6:`** for hosts you own, so a renamed host cannot become a void lookup. - **Keep the void count at zero** in a record you publish; two is the most a verifier is advised to tolerate, not a target. - **Read the result receivers record** on your own test messages; `permerror` there is the earliest signal. What a `permerror` then does to the message's delivery, and to DMARC, is covered with SPF results; the point here is how leftover names produce it.
- Does an exists mechanism that fails to match count as a void lookup?By the definition in RFC 7208 4.6.4, yes: exists queries an A record and does not match when there is none, and an NXDOMAIN or empty answer is exactly what makes a lookup void. A record that relies on exists for a per-sender check should therefore keep its other terms clear of empty answers.
- Why does a dead include give permerror while a dead a: name only fails to match?They fail at different steps. An `a:` term asks for addresses; none found means no match, plus one void lookup. An `include:` runs a whole SPF check on the target, and a target with no record yields `none`, which RFC 7208's include table converts to `permerror` for the include.
- Is a void lookup also one of the ten counted lookups?Yes. The void limit is in addition to the limit of ten: the term that produced the empty answer still spent one of the ten. A record can be within ten and still reach permerror on its third void lookup.
- A SERVFAIL from the vendor's name server counts as a void lookup.
- A dead include just fails to match, so evaluation carries on harmlessly.
- RFC 7208 says verifiers MUST reject after exactly two void lookups.
- Void lookups are free because they return no data.
- The void limit has existed since the original SPF specification.