Skip to main content
cd ../config-traps
risk/register/fourth-spf-include-record-silently-breaks-dmarc-alignment.html
DNS Email Authenticationhigh severityDNS

A Fourth SPF Include Record Silently Breaks DMARC Alignment for All Senders

Severity
high
Reviewed
8 Aug 2026
Remediation
~20 minutes
Overview

A routine SPF include addition silently breaks DMARC alignment once total DNS mechanism lookups exceed the evaluator ceiling, with no DNS-side error to flag it.

Operational summary

At a glance

Symptom
Outbound mail from one authorised sending path starts landing in spam or bouncing softly within hours of a routine DNS change, even though the…
Likely cause
The corrected sending path failed because the total number of DNS mechanism lookups required to fully evaluate the SPF record, including every mechanism nested…
Impact
The organisation lost visibility into whether its own authorised mail was authenticating correctly, and lost that visibility silently, with no bounce, no DNS error and no alert from…
Verification signal
Validation must confirm both that the new vendor authenticates and that no previously-authorised sender regressed as a side effect of the fix.dig TXT example.com +shortRe-resolve the full mechanism…
Safe correction
Reduce the resolved lookup count for the record back under the enforced ceiling before adding any further vendors, rather than treating the new vendor's include as the problem…
Rollback or recovery
Rollback means restoring the previous SPF TXT record value and re-confirming the prior authentication baseline, not simply removing the new vendor's include line.Restore the saved pre-change TXT record…

Symptom

Outbound mail from one authorised sending path starts landing in spam or bouncing softly within hours of a routine DNS change, even though the SPF TXT record still resolves correctly and looks syntactically valid in every zone editor and lint tool used to check it.

The change that triggered it was small: a fourth include: mechanism was added to the domain’s SPF record so a new outbound mail vendor could be authorised. No DNS error was returned, the record propagated normally, and the change passed a basic SPF syntax check. Days later, deliverability reports from that vendor, and in some environments from other already-authorised vendors, begin showing SPF and DMARC alignment failures with no corresponding change to those other vendors’ own configuration.

False assumption

The team treated adding another include: line as a bounded, additive change: one more trusted sender added to an existing, working record, with risk limited to whatever that one vendor sends.

That assumption ignores how SPF evaluation actually works. Each include:, a, mx, ptr, exists and redirect mechanism forces the evaluating resolver to perform an additional DNS lookup, and those lookups are not confined to the top-level record: every nested include: inside a vendor’s own SPF record counts against the same shared budget. A record that looks like it has three or four mechanisms at the top level can already be consuming most of an evaluator’s lookup allowance once vendor includes are expanded.

Root cause

The corrected sending path failed because the total number of DNS mechanism lookups required to fully evaluate the SPF record, including every mechanism nested inside included vendor records, exceeded the ceiling that SPF evaluators are specified to enforce.

The current SPF specification documents this lookup ceiling and the requirement that evaluators return a permerror result once it is exceeded, rather than continuing to evaluate mechanisms beyond the limit; the exact numeric ceiling and current wording should be confirmed against the live specification before this is treated as settled fact, since it was not directly verifiable against a supplied primary source for this assignment. What is observable and reproducible is that adding the fourth include: pushed the resolved lookup count for this record past whatever ceiling the receiving mail systems were enforcing, and every one of those systems then applied its own local policy for handling a permerror result, which in most deployments is functionally equivalent to a fail.

Because the SPF TXT record itself is syntactically valid, DNS resolution succeeds, propagation succeeds, and the record renders correctly in a zone editor. Nothing in the DNS layer signals the problem; the failure only appears in the mail evaluation layer, on the receiving side, which is why it was misread as a delivery or vendor-configuration issue rather than a DNS authentication issue.

Impact

The organisation lost visibility into whether its own authorised mail was authenticating correctly, and lost that visibility silently, with no bounce, no DNS error and no alert from the DNS provider.

Because the lookup ceiling applies to the record as a whole rather than to the newly added vendor alone, the practical blast radius extends beyond the change: any sending path whose evaluation now falls past the shared lookup budget can fail, including vendors that were working correctly before the change and made no configuration change of their own. In an environment where DMARC is enforced with a reject or quarantine policy, this can mean legitimate transactional or marketing mail from unrelated, previously reliable senders starts failing at the same time as the new vendor, which misdirects troubleshooting toward the new vendor’s configuration rather than the shared SPF record.

Diagnosis

Confirm the failure is a lookup-ceiling problem, not a vendor-specific fault, by resolving the full mechanism chain rather than only the visible top-level record.

dig TXT example.com +short
dig TXT _dmarc.example.com +short

Take the resolved SPF string and manually expand every include: target, repeating the query against each included domain’s own SPF record, to build the true mechanism count rather than relying on the top-level record’s apparent simplicity. A record checker that specifically reports total resolved DNS mechanism lookups, rather than only syntax validity, will surface a count at or beyond the enforced ceiling; a syntax-only linter will not, because the record is syntactically valid regardless of how many lookups it eventually resolves to.

Cross-check against DMARC aggregate (rua) reports for the affected sending path: a permerror-driven failure typically shows as an SPF result other than pass for messages sent from an IP address genuinely authorised somewhere in the include chain, which is the signature that distinguishes this trap from a genuinely unauthorised sender.

Correction

Reduce the resolved lookup count for the record back under the enforced ceiling before adding any further vendors, rather than treating the new vendor’s include as the problem to remove outright.

Where the new vendor is required, replace one or more existing broad mechanisms, particularly nested vendor includes that themselves expand to several further lookups, with flattened, static equivalents where the vendor supports it, or consolidate multiple legacy includes that are no longer required into a single record before the new vendor is added. Retain a copy of the exact pre-change TXT record value first, since this correction is a state-changing DNS edit and must be reversible.

Validation

Validation must confirm both that the new vendor authenticates and that no previously-authorised sender regressed as a side effect of the fix.

dig TXT example.com +short

Re-resolve the full mechanism chain as in the diagnosis step and confirm the total lookup count is now clearly under the enforced ceiling with headroom for at least one future vendor addition. Send a live test message through the newly authorised vendor and through at least one previously-working sending path, then confirm both appear with an SPF and DKIM/SPF-aligned pass result in the next DMARC aggregate report cycle, not only in a one-off header check, since aggregate reports reflect real receiving-side evaluation rather than a local simulation.

Rollback

Rollback means restoring the previous SPF TXT record value and re-confirming the prior authentication baseline, not simply removing the new vendor’s include line.

  • Restore the saved pre-change TXT record value exactly as it was recorded before editing.
  • Allow the record’s previous TTL to fully expire on the resolvers used for testing before re-checking, since cached negative or partial results can otherwise mask whether the rollback took effect.
  • Re-run the DMARC aggregate report check used in validation and confirm results for previously-working senders return to the pre-incident baseline before attempting a second, more carefully scoped fix.

Prevention

Treat every SPF change as a change to a shared, finite resource rather than an additive, per-vendor change, and require a resolved lookup count check as part of the change process itself rather than a syntax check alone.

Maintain a running record of the current resolved mechanism count and headroom for the domain’s SPF record so that adding a vendor becomes a deliberate budget decision, and route any DNS authentication change for a production-sending domain through the same change governance discipline used for other identity- and logging-relevant DNS controls, consistent with general security governance practice.

03

Apply the safer control

Before you change production

Confirm the affected scope, export the current configuration, and test the replacement control in a non-production environment first.

Fix commands and configuration

include:
ptr
exists
04

Verify, roll back or escalate

Verify

Validation must confirm both that the new vendor authenticates and that no previously-authorised sender regressed as a side effect of the fix.dig TXT example.com +shortRe-resolve the full mechanism chain as in the diagnosis step and confirm the total lookup count…

Rollback

Rollback means restoring the previous SPF TXT record value and re-confirming the prior authentication baseline, not simply removing the new vendor's include line.Restore the saved pre-change TXT record value exactly as it was recorded before editing.Allow the record's previous TTL…

Escalate

Escalate when the blast radius is uncertain, the control cannot be tested safely, or remediation requires an outage or security exception.

After remediation

Further reading stays below the corrective workflow and is selected by platform, category and shared technical keywords.

Discover more

Connected KBY resources