schedule 15-min read

SPF TempError: What It Means and How to Fix It

DMARC AI editorial team · Last updated

SPF temperror means a DNS lookup failed during the SPF check. What RFC 7208 says, the usual causes, how to find them with dig, and how DMARC treats it.

01

What does SPF temperror mean?

An SPF temperror (temporary error) means the receiver hit a transient DNS failure while checking the sender's SPF record, so it got no answer at all. RFC 7208 Section 2.6.6 calls it "a transient (generally DNS) error" and says "a later retry may succeed without further DNS operator action."

That is the difference from a permerror. The record may be valid; what failed was fetching it, or something it references, when the message arrived. A temperror that keeps coming back still usually means a real DNS fault that someone must fix. If you are looking at a broken record rather than a failed lookup, read SPF permerror: what it means and how to fix it instead. For SPF basics, start with the SPF guide.

02

Key takeaways

  • Temperror means a DNS query in the SPF check returned a server failure, another error code, or timed out (RFC 7208 Sections 4.4 and 5). The record content is not the issue.
  • Typical causes are SERVFAIL from authoritative servers, broken DNSSEC, lame delegation of an included domain, timeouts, and large responses that cannot fall back to TCP.
  • Receivers may accept the message or defer it with a 451 reply (Section 8.6), so persistent temperror shows up as delayed mail.
  • In DMARC, a temperror gives no SPF pass. An aligned DKIM pass still carries the message; otherwise the outcome is left to the receiver.
  • For an MSP, a temperror on one client is a DNS hosting problem to chase; a temperror across many clients usually points at a shared vendor include.
03

Where does temperror come from in RFC 7208?

It comes from two rules about DNS errors. Section 4.4 covers fetching the SPF record itself: if the lookup "returns a server failure (RCODE 2) or some other error (RCODE other than 0 or 3)", or times out, the check "terminates immediately with the result "temperror"."

Section 5 applies the same rule to every DNS lookup a mechanism makes. If a query for an include:, a, mx or exists target returns an error or times out, "the mechanism stops and the topmost check_host() returns "temperror"." The include table in Section 5.2 passes a temperror in an included record straight up to the parent domain.

Note what is not a temperror. RCODE 0 (NOERROR) and RCODE 3 (NXDOMAIN, the name does not exist) are answers. A missing record gives none, and empty answers inside the check count as void lookups, which can lead to permerror. Temperror is reserved for lookups that produced no usable answer.

Is there a time limit on SPF checks?

Yes, a recommended one. Section 4.6.4 says receivers "SHOULD impose a limit on the maximum amount of elapsed time" for the whole check, that "such a limit SHOULD allow at least 20 seconds", and that if it is exceeded the result "SHOULD be "temperror"." A record with many nested includes on slow name servers can therefore time out as a whole, even if every single lookup eventually answers.

04

What causes an SPF temperror?

Every cause is something that stops a DNS query from completing. Some sit with the sending domain's DNS, some with a vendor whose record is included, and some with the receiver's own resolver. Section 8.6 itself notes that these errors can come from either side's DNS software.

Cause Where it sits What the resolver sees Typical clue
Authoritative servers return SERVFAIL Sending domain or included domain RCODE 2 dig shows status: SERVFAIL
Broken DNSSEC (expired signatures, wrong DS record) Zone signing at the DNS host or registrar Validating resolvers return RCODE 2 Query works with +cd, fails without
Lame delegation of an included domain Vendor or old DNS host No authoritative answer, often SERVFAIL One NS in the list does not answer for the zone
Name server timeouts Overloaded, firewalled or offline authoritative servers No reply connection timed out; no servers could be reached
Large response, TCP blocked Authoritative side or firewall Truncated UDP reply, TCP retry fails UDP reply has the tc flag, +tcp query times out
Overloaded or broken receiving resolver Receiver Errors or timeouts Temperror only at one receiving organisation
Check exceeds the elapsed time limit Long include chains on slow servers Overall timeout Intermittent, worse at peak hours

How does broken DNSSEC cause temperror?

A validating resolver that cannot validate a signed answer refuses to hand it over. RFC 4035 Section 5.5 says that for an answer that fails validation "the name server MUST return RCODE 2", which is a server failure. To the SPF verifier that looks exactly like a broken server, so the result is temperror.

The usual triggers are a DS record left at the registrar after moving DNS hosts, signatures that expired because re-signing stopped, or a key rollover done out of order. Resolvers that do not validate still get an answer, which is why the error appears at some receivers and not at others.

What is a lame delegation and why does it matter here?

RFC 8499 defines a lame delegation as a name server that is delegated a zone "(via NS records) but is not performing nameservice for that zone." It often follows a DNS migration where the parent zone still lists an old provider.

For SPF this bites hardest in an included domain. If a vendor's _spf zone is delegated to a server that no longer answers for it, resolvers that pick that server fail, and your client gets temperror through the include without having changed anything.

Why can a large SPF response cause temperror?

Because a large reply needs TCP, and TCP is sometimes blocked. RFC 7766 Section 4 describes how a server truncates a UDP response that would exceed 512 bytes, sets the TC flag, and the client "should retry over TCP instead." It also states that "all general-purpose DNS implementations MUST support both UDP and TCP transport."

If a firewall in front of the authoritative servers drops TCP port 53, the retry fails and the lookup times out. RFC 7208 Section 3.4 anticipates this: it says the SPF answer "SHOULD remain small enough" to fit within 512 octets, to avoid older implementations "failing over to TCP." A TXT name crowded with SPF, verification tokens and long DKIM-style strings can push past that size.

05

How do you diagnose an SPF temperror with dig?

Reproduce the lookup, then take the resolver out of the picture and ask each authoritative server directly. Run every step against the envelope (MAIL FROM) domain from the failing message and against each include: target, because the temperror may come from any of them.

  1. Query through a normal resolver. dig TXT example.com and read the status: line. NOERROR with the record means this name is fine right now; SERVFAIL or a timeout reproduces the problem.
  2. Test DNSSEC. Repeat with +cd (checking disabled). If dig +cd TXT example.com answers but the plain query gives SERVFAIL, validation is failing. Add +dnssec to see the RRSIG records and their expiry dates.
  3. Follow the delegation. dig +trace TXT example.com walks from the root to the authoritative servers and shows which NS records each level hands out. An NS name that does not resolve, or a step that stalls, points at the break.
  4. Ask every authoritative server. List them with dig +short NS example.com, then query each one with dig @ns1.dnshost.example TXT example.com +norecurse. A healthy server answers with the aa (authoritative answer) flag. A timeout, REFUSED or missing aa on one server is a lame or broken name server.
  5. Test TCP. dig +tcp @ns1.dnshost.example TXT example.com. If UDP works and TCP times out, large responses will fail.
  6. Walk the includes. Repeat steps 1 to 5 for every include: and redirect= target, and for any a: or mx: hosts the record names.

A failing validation check looks like this (illustrative output):

$ dig TXT example.com | grep status
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 50312

$ dig +cd TXT example.com | grep -A1 "ANSWER SECTION"
;; ANSWER SECTION:
example.com.  3600  IN  TXT  "v=spf1 include:spf.protection.outlook.com -all"

The record exists and is valid. The fix is at the DNS host or registrar, not in the SPF record. DNS lookup fundamentals for MSPs and how to check your SPF record cover the commands in more depth.

06

What do receivers do with an SPF temperror?

They choose between accepting and deferring. Section 8.6 says checking software "can choose to accept or temporarily reject the message." If it rejects during the SMTP session, it "SHOULD use an SMTP reply code of 451" and, where supported, the enhanced status code 4.4.3.

A 451 is a deferral, not a bounce. The sending server keeps the message queued and retries. Appendix G.4 adds that if temperrors "persist for multiple delivery attempts, it might be preferable to treat the error as permanent", and that long queue lifetimes can delay the sender noticing. So a lasting DNS fault turns into slow mail first and bounces later. Tempfail and 4xx deferrals: what senders should check covers the queue side.

What do Microsoft and Google document about temperror?

Both document how the result is shown, not a fixed handling rule. Microsoft's anti-spam message headers reference defines spf=temperror as "A temporary error occurred. For example, a DNS error. The same check later might succeed." It also lists composite authentication reason code 112, "A DNS timeout prevented the DMARC record from being retrieved", which is the DMARC equivalent.

Google's Troubleshoot SPF issues article groups temperror and permerror together and tells admins to read the text after spf= in Authentication-Results. Its suggested steps include verifying SPF syntax, addressing DNS lookup issues and checking "with your domain provider for current DNS issues." Neither page publishes whether inbound mail with SPF temperror is deferred or accepted.

07

How does temperror appear in headers and DMARC reports?

In headers it appears as spf=temperror. RFC 8601 Section 2.7.2 includes the SPF result values by reference, maps temperror to RFC 7208 Section 2.6.6, and reports the checked domain as smtp.mailfrom. An illustrative example, not copied from a real message:

Authentication-Results: mx.example.net;
       spf=temperror smtp.mailfrom=bounce.example.com;
       dkim=pass header.d=example.com header.s=sel1;
       dmarc=pass action=none header.from=example.com

SPF got no answer, but DMARC still passed on aligned DKIM. The email header guide shows how to find the receiving hop's header.

In aggregate reports, the schema in RFC 9990 Appendix A lists temperror among the SPF result values, alongside none, pass, fail, softfail, policy, neutral and permerror. The only valid SPF scope is mfrom, the MAIL FROM domain. A scattered temperror from one reporter is often that receiver's resolver. Temperror for the same source from many reporters over several days points at the domain's DNS. DMARC aggregate reports explained shows where the field sits.

08

How does DMARC treat an SPF temperror?

As no SPF pass. RFC 9989 Section 4.4.2 only makes the MAIL FROM domain an SPF-Authenticated Identifier when SPF validates it, and a temperror validates nothing. Section 5.3.5 then passes the message if any Authenticated Identifier aligns, so an aligned DKIM signature still gives a DMARC pass.

When no other identifier carries the message, RFC 9989 Section 5.3.6 applies. It says that if "one or more DNS queries required to perform DMARC validation" do not complete "due to temporary or permanent DNS errors," the message "cannot be considered to pass or fail". The Domain Owner Assessment Policy then cannot be applied, and other handling is left to the receiver. RFC 9989 does not name SPF temperror specifically, so expect receivers to differ.

Section 4.10.1 likewise leaves DNS errors on the _dmarc lookup "to the discretion of the Mail Receiver". The lesson matches permerror: do not let any important source depend on SPF alone. Why DMARC fails when SPF passes covers alignment, and RFC 9989 explained the wider DMARCbis changes.

09

How is temperror different from permerror?

Temperror is a failed lookup; permerror is a failed interpretation. Retrying can clear a temperror, while a permerror returns the same result until someone edits DNS. The table below sets them side by side.

temperror permerror
RFC 7208 definition Section 2.6.6, "a transient (generally DNS) error" Section 2.6.7, records "could not be correctly interpreted"
Typical cause SERVFAIL, timeout, broken DNSSEC, lame delegation Two records, syntax error, over 10 lookups, missing include target
Is the record content wrong? Usually not Yes, or a referenced record is
Does a retry help? It may No
Suggested SMTP reply if rejecting 451 with 4.4.3 (Section 8.6) 550 with 5.5.2 (Section 8.7)
Seen at every receiver? Often only at some, or only some of the time Consistently
Who fixes it DNS host, registrar, vendor, or the receiver's resolver The domain's DNS operator
10

How do you fix an SPF temperror?

Fix the DNS path, not the record text. Work from the result of the dig steps above:

  • SERVFAIL from your own name servers: raise it with the DNS host and check the zone loads without errors.
  • DNSSEC failure: re-sign the zone or correct the DS record at the registrar. If you moved DNS hosts, either set up signing at the new host and publish its DS, or remove the old DS record.
  • Lame or dead name server: update the NS records at the registrar so they list only servers that answer authoritatively.
  • TCP blocked: allow TCP port 53 to the authoritative servers, and trim the TXT records at the name so the SPF answer stays small.
  • Vendor include failing: report it to the vendor with your dig output. If it persists, a temporary flattening of that vendor's ranges is an option, with the trade-offs in SPF flattening explained for MSPs.
  • Slow, deep include chains: reduce nesting so the whole check finishes well inside the time limit. SPF too many DNS lookups covers trimming.

Then confirm with a test message to an external mailbox showing spf=pass, and watch the next few days of aggregate reports.

11

How should an MSP triage SPF temperror across clients?

Start by asking how wide the problem is, because the spread tells you where to look. One routine that works across a portfolio:

  1. Scope it. Is the temperror on one client, or on many clients at once? Many clients sharing a vendor include points at that vendor's DNS.
  2. Scope the reporters. One receiving organisation only suggests its resolver; many reporters suggest the sending side.
  3. Reproduce from outside. Run the dig steps from at least two networks, including a validating public resolver, so a local cache does not mislead you.
  4. Check recent change. DNS host migrations, registrar transfers and DNSSEC changes are the usual triggers. Put them through change control with a DNSSEC and NS check before and after.
  5. Check the queues. Ask the client whether mail is delayed. Persistent 451 deferrals mean the problem is already affecting delivery.
  6. Protect enforcement. Before moving a client from p=none to p=quarantine and then p=reject, make sure its main sources pass aligned DKIM, so a DNS outage cannot fail them on SPF alone.

DMARC AI collects aggregate reports for every client domain in one multi-tenant view and uses AI to classify sending sources, so a cluster of SPF temperror on one source or one shared include is easier to spot. Once SPF is stable, the DMARC guide covers what to check next.

12

Frequently asked questions

Is SPF temperror the sender's or the receiver's fault?

It can be either. RFC 7208 Section 8.6 notes these errors can come from the sender's or the receiver's DNS software. If many receivers report temperror for your domain, look at your DNS hosting, DNSSEC and included vendors. If only one receiver reports it, their resolver is the more likely cause.

Will SPF temperror cause my email to bounce?

Not immediately. Receivers may accept the message or defer it with a 451 reply, and the sending server retries. RFC 7208 Appendix G.4 says persistent temperrors may be treated as permanent after repeated attempts, so a lasting DNS fault can end in bounces once queues expire. Aligned DKIM keeps DMARC passing meanwhile.

Does fixing the SPF record clear a temperror?

Usually not, because the record text is rarely the problem. Temperror means a DNS query failed or timed out. Fix the DNS path instead: name server health, DNSSEC signatures and DS records, delegation and TCP access. The exception is a record so large or deeply nested that lookups time out.

How do I tell if DNSSEC is causing an SPF temperror?

Query the record twice with dig, once normally and once with the +cd flag, which disables validation. If the normal query returns SERVFAIL and the +cd query returns the record, DNSSEC validation is failing. Check signature expiry with +dnssec and compare the registrar's DS record with the zone's keys.

Do DMARC aggregate reports show SPF temperror?

Yes. The RFC 9990 aggregate report schema includes temperror as an SPF result value, reported for the MAIL FROM domain. Look at the pattern: temperror from one reporter on one day is usually noise, while repeated temperror for a source across many reporters points at a DNS fault on the sending side.

Related articles

Related tools

Ready to Implement?

Get authenticated mail moving in minutes: start free, book a guided demo, or talk to the team about your stack.