Email and Cyber Security · #19

Online SPF Record Checker

Expands an SPF record with its include and redirect chain, counts the DNS lookup budget and shows structural errors.

  • Live DNS query (Cloudflare DNS over HTTPS)

Tool

Domain whose SPF is checked (envelope sender / Return-Path domain).

The query goes directly from your browser to a fixed public resolver (Cloudflare 1.1.1.1, DNS over HTTPS); only the domain name and record type are sent. Eretek servers do not relay or log the query.

What does this tool do?

An SPF record can look fine while its includes call further includes. RFC 7208 allows at most 10 DNS-querying mechanisms during evaluation; beyond that the result is permerror and receivers may reject mail. The tool expands the tree, counts lookups and finds structural risks such as two SPF records, loops or +all.

How to use it

  1. Enter the domain and press Run.
  2. In the tree table, check where each include is called from and which record it returns.

Fields

Domain
Domain whose SPF is checked (envelope sender / Return-Path domain).

Worked example

InputValue
Domaincontoso.com

Expected result: 5 DNS lookups (mx, two includes and the provider's two nested includes), within the limit; b._spf.saglayici.example does not exist (void lookup) and the provider record ends with ?all.

Even with an acceptable count, a nested include that does not resolve points to a problem in the provider's record. More than 2 void lookups can cause permerror under RFC 7208.

Method and assumptions

The root domain's TXT records are queried; more than one record starting with v=spf1 is a permerror. The record is split into terms at spaces.

Terms that require DNS queries are counted: include, a, mx, ptr, exists and redirect. include and redirect targets are expanded the same way (up to 10 levels, loops detected). NXDOMAIN or SPF-less targets count as void lookups; the limit is 2.

The mx mechanism also queries an address per MX target; those queries do not count toward the 10 but have their own limit of 10 per MX. Includes with macros (%{i}) cannot be resolved without sender context and are skipped.

Using the result and troubleshooting

Above 10, remove unused includes, replace a/mx with fixed ip4/ip6, or give a subdomain its own SPF. Use the SPF Record Generator for a draft.

The root record should end with -all or ~all; +all lets anyone send as you.

Limits and common mistakes

  • It does not produce an SPF result (pass/fail) for a specific IP; that needs the sending IP, HELO and envelope sender.
  • Mechanisms with macros are not evaluated.

Frequently asked questions

I have fewer than 10 includes but still get permerror — why?

The count includes nested includes. Microsoft 365 or marketing platform includes may themselves perform several lookups; the tree table shows the total.

Related tools and service

  • SPF Record GeneratorBuilds an SPF TXT record draft from your sending servers in the right order and shows the DNS lookup cost.
  • DMARC Record CheckerReads the _dmarc record and interprets its policy, reporting and alignment settings.
  • DKIM Selector LookupReads a DKIM selector's DNS record and shows key type, length and revocation state.

Related service: Email Security and Phishing Protection

Cybersecurity online tools · See all online tools