Payments are experiencing issues due to temporary restrictions in Russia. If your payment does not go through, please submit a support request.Our support team is available 24/7 — we are always here to help with hosting and server issues.We are now accepting requests for dedicated server rental and colocation services in our data center.Reminder: we recommend enabling backups for additional data protection.A new VPS/VDS lineup with NVMe storage and improved performance is now available.Maintenance work on some servers has been completed. All services are operating normally.
Article6 min readViews1

SPF Returned PermError Due to DNS Limit: How to Count 10 Checks Before Changing the Record

PermError does not always indicate the eleventh DNS-dependent term. First, separate the limit from syntax and multiple SPF records, then expand includes and count the reachable path.

Comments 0

A woman compares an envelope at a blue-orange mail sorting machine before sending
In this article

PermError does not prove that SPF reached the eleventh DNS-dependent term. By "DNS checks" in the title, we mean SPF terms that trigger DNS queries, not the number of DNS packets. First, identify the domain the receiver checked via MAIL FROM or HELO, save its TXT records and the exact diagnostic response. If a single syntactically correct SPF record is selected, expand includes and redirects and count the reachable path: the global limit for DNS-dependent terms is ten.

Section 4.5 RFC 7208 states: either of the two conditions already yields PermError — more than one suitable record v=spf1 or a syntax error. Therefore, the count of ten is neither the first nor the only diagnosis.

Why String Length Proves Nothing

SPF checks whether the sending node is authorized for the technical sender's domain in MAIL FROM or HELO. The visible From address may belong to a different domain. Therefore, a successful SPF does not guarantee passing DMARC, and an SPF error cannot be fixed by cosmetically changing the visible address.

The include mechanism triggers a recursive evaluation of SPF for another zone. A provider can change their nested record while the TXT record in your zone remains unchanged. Here is the interesting part: the string looks identical, but the number of DNS-dependent terms on the reachable path has already changed.

What counts toward the limit of ten

Section 4.6.4 RFC 7208 classifies include, a, mx, ptr, exists, and redirect as DNS-dependent terms. Their combined limit during evaluation is ten. If this limit is exceeded, the implementation must return permerror.

  • The total count includes nested includes: recursion does not reset the counter.
  • The all, ip4, and ip6 mechanisms, along with the exp modifier, do not consume this limit during the primary evaluation.
  • Additional restrictions apply to address queries for mx and ptr. The RFC explicitly marks ptr as undesirable for use.
  • Empty responses and NXDOMAIN form separate void lookups: the RFC recommends limiting these to two, and exceeding this also results in a permerror.

Training calculation: how to silently reach eleven

Assume a store domain uses two external services and its own MX records. All names below refer to the reserved .example zone and do not describe a real operator.

v=spf1 include:_spf.mail-a.example include:_spf.crm.example mx -all

On the path under consideration, the first mechanism include reveals three additional nested mechanisms include, while the second reveals four nested mechanisms include and one mechanism a. If no early branch yields a match, evaluation proceeds to mx in the root record. In this educational model, each preceding include concludes with a result where evaluation of the outer record continues; PermError and TempError within include are not modeled.

Stage

DNS-dependent terms

Total number of terms

Root include mail-a

1 include + 3 nested includes

4

Root include crm

1 include + 4 nested includes + 1 a

10

Root mx

1 mx

11 → PermError

This is a conservative path analysis where previous mechanisms yielded no match. SPF is evaluated left to right and may stop early upon a match, so checking a single email from one IP does not prove the safety of all routes. To make changes, you must know which services actually send on behalf of the domain and which branches can be traversed.

Safe order before changing DNS

  • Compile a list of active senders: website, corporate email, CRM, mailing lists, POS system, support, and external forms. For each, record the MAIL FROM domain and the configuration owner.
  • Save the current SPF record and the snapshot timestamp. A domain must have exactly one selected SPF record; creating a second one does not offload the first and instead creates a policy selection error.
  • Expand each include and redirect based on current authoritative DNS responses. Build a tree, not just a word count of the root string.
  • Separately mark include, a, mx, ptr, exists, and redirect. Count all possible paths to a match or the terminating 'all'; for an ambiguous route, take the worst-case reachable path.
  • Remove a source only after confirming it no longer sends. Automatically flattening 'include' into a set of IPs shifts the responsibility for tracking provider address changes to the domain owner and is not a universal fix.
  • Agree on a single minimal change, preserve the previous value, and define a rollback condition. Do not change '-all' to '~all' to hide a PermError: the qualifier at the end resolves a different issue.
  • After DNS propagation, send test emails through each real service. In the Authentication-Results header, verify the SPF result, the check domain, and the domain alignment for DMARC separately.

The TXT response for each name can be saved via the DIG tool, but it does not build a recursive SPF graph and does not count the limit automatically.

SPF Pass and DMARC Pass are not the same thing

According to RFC 9989, DMARC considers the SPF result for the domain MAIL FROM, but not the SPF result obtained when checking the identifier HELO. The domain MAIL FROM must align with the author domain in the email header field From: exact match for strict alignment or a shared organizational domain for relaxed alignment. Therefore, after fixing the DNS limit exceeded error, you must check not only spf=pass but also the domain for which it was obtained.

The general email routing and the differences between SPF, DKIM, and DMARC are covered in the article «The path of an order email from the store to the inbox». After making changes, send a test email using the same service and check it with the «Email Spam Test» tool: the result applies to the actually received message, not to all future routing paths.

What counts as a completed result

  • There is one current SPF TXT record, and the previous value has been saved for rollback.
  • The include and redirect tree is built based on current responses with the verification date.
  • No reachable path contains more than ten DNS-dependent terms; empty responses are accounted for separately.
  • Each actual service sent a test email that contains no SPF PermError.
  • For the visible domain, DMARC alignment has been separately confirmed, or it is clear which DKIM path provides it.

Rules and links were verified on November 14, 2026. The limit itself describes DNS load during SPF evaluation, not domain reputation or a guarantee of delivery to the inbox.

Discussion 0

Share your experience and ask questions. Comments without links appear after editorial review.

No comments yet. Start the discussion.