Count visible SPF terms without a live DNS lookup
Admin ·
Treat an SPF term count from a TXT value as evidence about that one policy. The actual evaluation can stop after a match or continue through additional policies and lookups.
Read the address and DNS-dependent terms
Load example and check the record for dispatch.example.test. The two quoted strings make one TXT record. v=spf1 identifies the version.
ip4:192.0.2.0/24 and ip6:2001:db8:5::/48 are literal networks. Each defaults to a Pass qualifier when it matches.
The include and mx mechanisms depend on DNS. The -all gives Fail to a sender reaching that term. The listed count is three because redirect is present, while the potentially reached count is two because all causes redirect to be ignored.
RFC 7208 SPF record selection, mechanisms and processing limitsRFC 1035 DNS TXT character-strings
Compare the redirect after removing all
Delete -all from the example and check again. The possibly reached count becomes three. If no mechanism matches, a receiver can evaluate the redirected policy.
The ten-term ceiling applies during evaluation, including nested terms that are reached. A listed include can add more dependencies. A record with fewer than ten visible terms can still exceed the evaluation limit.
RFC 7208 SPF record selection, mechanisms and processing limits
Check the record count against saved DNS evidence
Paste a saved TXT response for the envelope-sender domain to compare its direct SPF answer with the pasted policy. A second v=spf1 record at that owner is a competing policy. Unrelated TXT records do not make two SPF records.
Use the exported report to retain which fields were supplied and why the full evaluation remains unresolved. A timeout, a truncated response or an unchecked alias cannot confirm a missing SPF record.
RFC 7208 SPF record selection, mechanisms and processing limits
Common questions
Does exp count in the visible DNS-dependent term limit?
RFC 7208 counts exp separately. It can trigger an explanation lookup after the evaluation yields Fail.
Why is +all flagged?
It yields Pass for every sender that reaches it. Confirm that this matches the authorization intended for the domain.