[ SPF ]

When flattened SPF records become stale

A flattened record can remain syntactically valid while its authorisations drift. Diagnose stale additions and removals separately, then restore a controlled refresh process.

By the EmailAuth research team · 4 min read

[ Key points ]

  • Compare provider source, generated output and published policy.
  • Review withdrawn ranges as well as missing new addresses.
  • DNS cache timing does not repair stale authorization content.
On this page

A stale flattened SPF record is an authorisation copy that no longer represents its intended source. It may omit a newly used sending range, retain one that should have been removed, or combine both errors. The visible symptom may be failed mail, but the absence of complaints does not prove the copy is current.

Identify which copy is being maintained

Record the envelope domain, current SPF value and the system that generated it. Locate the original provider dependencies and the last successful generation and publication timestamps. If nobody can identify the upstream input, treat that missing provenance as a maintenance defect rather than guessing from the current addresses.

Keep three states distinct: the provider's current documented authorisation, the generator's latest output and the record receivers can resolve. A successful generation with a failed DNS update produces a different repair task from a generator that never noticed the provider change.

Compare additions and removals independently

Build a controlled comparison using the supported semantics of the original policy. RFC 7208 defines includes as evaluations, so an address scrape is not a sufficient baseline for policies with conditions or macros. Record any unsupported construct and stop automated replacement until its effect is understood.

An addition missing from the published copy is a potential delivery problem for a legitimate sender using that range. A removed range still present is an excess-authorisation problem. Give each difference an owner and reason. Do not call the record repaired merely because the most visible failing sender now passes.

In an illustrative incident, a provider starts using 192.0.2.40 while an old flattened copy contains only 192.0.2.10. Those documentation addresses are synthetic, not deployment values. Adding the observed address may hide the immediate failure while missing the rest of the provider's supported pool. Confirm the provider's intended scope before preparing a complete correction.

Find the failed stage

Check the refresh schedule, job status, upstream query results, parser warnings, generated diff, approval queue and publication receipt. Then query the published record and compare it with the intended output. Retain query times and resolver identities so a cached answer is not confused with a failed write.

DNS caching is a separate layer from generator freshness. Reducing a TTL does not make an old copied address list correct. It also does not force every resolver to discard data it already cached. Use observed answers, prior configuration and possible serve-stale behavior under RFC 8767 §4 when assessing convergence, rather than promising a universal propagation time.

Repair without widening trust

Save the current record and the proposed replacement. Resolve every unexpected added range before publication. Do not authorise an entire cloud provider because a single new sender appeared there. The origin of a network is not proof that the network should send using your envelope identity.

Validate the candidate's syntax, evaluated lookup paths, address families and terminal result. Confirm that only one applicable SPF record will exist at the owner name. After approval, publish through the established change process and test the affected application through its ordinary route.

Add a freshness signal that can fail visibly

Recommended monitoring should distinguish “last job ran,” “last source read succeeded,” “last output changed,” and “last publication verified.” A source that has not changed for a month can still be healthy; a job that reports success while repeatedly reusing failed input is not. Choose alert thresholds around business risk and the provider's operating model, not an invented protocol refresh interval.

Close the incident with a before-and-after comparison, received-message evidence and an explanation of the failed stage. Keep a follow-up owner for withdrawn ranges and recurring failures. If the copy cannot be maintained reliably, reconsider the model using flattening tradeoffs rather than repeatedly applying emergency address patches.

DNS background: RFC 1035 section 3.2.1 defines resource-record TTL; RFC 2308 §5 covers negative caching; RFC 8767 §4 updates TTL semantics and permits stale use when authoritative refresh fails. These describe DNS behaviour, not a universal completion time for a change.

Record the next decision

Use one row per range difference: added or withdrawn; provider evidence; generator version/time; approved output; authoritative answer/time; recursive answer/time; and affected route. Current generation plus old authoritative data points toward publication; current authoritative data plus an old recursive answer calls for resolver-state investigation. These are diagnostic branches, not measured incidents, and stale use can complicate timing.

[ Takeaway ]

Compare provider source, generated output and published policy. Review withdrawn ranges as well as missing new addresses. DNS cache timing does not repair stale authorization content.

[ By role ]

What this means for you

Choose your role for practical next steps.

IT / Mail Admin

Trace the whole update chain.

Separate input collection, conversion, publishing and DNS observation.

Next steps

  1. Capture timestamps at every stage.
  2. Compare added and removed ranges.
  3. Test the repaired application route.

CISO / SecOps

Treat removals as security work.

An old allowlist can be permissive rather than merely unreliable.

Next steps

  1. Review retained withdrawn ranges.
  2. Reject unexplained network expansion.
  3. Audit who can approve generated changes.

Founder / Non-technical

Resolve the recurring dependency.

A succession of emergency DNS edits is a signal to fix ownership and monitoring.

Next steps

  1. Identify affected customer workflows.
  2. Assign a refresh-process owner.
  3. Review whether the operating model remains appropriate.

[ FAQs ]

Frequently asked questions

Can a stale record still pass a syntax check?

Yes. Syntax checks do not establish that the listed authorisations remain appropriate for the upstream service.

Does a lower TTL repair stale flattened content?

No. It concerns caching of DNS data, not whether the generated content is current.

RFC 8767 §4

Should I add the IP from the bounce immediately?

First verify the actual sending service and its supported authorisation scope. A single observed address can be an incomplete or misleading repair.

Why check removed addresses if mail is working?

A retained address can represent unnecessary sending authority even when legitimate traffic passes.

What if the provider policy uses macros?

Verify that the generator supports the relevant inputs and semantics. Do not replace a conditional policy with an unqualified list without analysis.

RFC 7208 §7

How often must a flattened policy refresh?

SPF does not prescribe a universal flattening refresh schedule. Set and validate a service-specific freshness objective and alert policy.

What if output is current but DNS is not?

Investigate publication, permissions, the target owner name and cached responses. Preserve evidence of both the generated value and what resolvers returned.

When is the incident closed?

When the intended scope is restored, affected flows are verified, excess authorisation is addressed and the failed maintenance stage has a documented owner and fix.

[ Sources ]

Sources

  1. RFC 7208

    Sections §2.4 · §4.5 · §4.6.4 · §5.2 · §5.6 · §7

  2. RFC 1035

    Sections §3.2.1

  3. RFC 2308

    Sections §5

  4. RFC 8767

    Sections §4

[ Glossary ]

Glossary

SPF
Authorization evaluation for a connecting IP and the relevant SMTP identity.

RFC 7208 §2.4

SPF include
Recursive evaluation whose pass makes the include match; its qualifier determines the outer result.

RFC 7208 §5.2

DNS TTL
The interval before the source of a cached record must be consulted again; stale use can be permitted when authoritative refresh fails.

RFC 8767 §4

Enterprise provenance

Why top financial institutions and governments retired their email security dashboards.

Traditional email authentication platforms sell you a dashboard and ask your engineers to do the labour. In high-stakes environments, manual oversight means delayed enforcement, configuration drift and unmonitored shadow domains.

EmailAuth is the agentic email provenance platform. Our agents enforce p=reject, keep third-party senders aligned and move your domains to full RFC 9989 compliance, the new DMARC standard,, with human-in-the-loop auditability.

Governments Large enterprises Tier-1 financial institutions

SaaS · Dedicated tenancy · Air-gapped on-prem · BYOK encryption

Knowledge Base