Skip to content

Two SPF records after adding a mail service: how to fix them

Read this article in ไทย 中文

Two SPF records after adding a mail service: how to fix them

Staff mail works, but the new service reports permerror

After adding an invoicing sender, an administrator may follow its instructions by creating another TXT entry starting with v=spf1 even though that name already has SPF. This does not provide two alternative policies for the receiver: more than one selected SPF record for the same name is invalid. Inspect the actual DNS response before deleting or merging anything, because providers display records differently.

Count records at the same name, not every TXT entry

RFC 7208 distinguishes multiple SPF records from multiple strings inside one TXT record. One record may appear as several quoted strings, which are concatenated without adding spaces. Do not delete a string merely because two sets of quotation marks appear. Unrelated service-verification TXT records can coexist; do not delete every TXT entry to leave one row.

Check the MAIL FROM or envelope-sender domain, not only the visible From address. A root domain and a subdomain are different names for SPF lookup, so editing the root does not necessarily fix a service using a subdomain. If the provider uses its own domain, inspect its supported custom return-path setup before deciding where your organisation needs an SPF change.

Combine senders, not two entire policies

List active sending systems and their owners, and obtain each provider’s required values for this domain. Save the existing DNS values and observation time before changing them. The goal is one policy with a single v=spf1 opening and a coherent sequence of authorisation mechanisms and ending. Concatenating two complete v=spf1 ... ~all policies is not a valid merge; mechanisms placed after all will not authorise senders as intended.

One record still needs a DNS lookup check

RFC 7208 limits DNS-querying mechanisms or modifiers encountered during evaluation to 10, including include, a, mx, ptr, exists and redirect; exceeding the limit produces permerror. Counting only the include terms visible in the top-level record is insufficient because included policies may trigger further lookups. This is not a limit of ten providers or ten TXT records in the DNS account.

Near the limit, review retired senders and provider-supported alternatives first. Replacing include with manually copied IP addresses can become stale when the provider changes infrastructure. Moving traffic to a subdomain requires checking the sending path and authentication together, not merely hiding the error behind a new name. Assign an ongoing configuration owner rather than treating one green diagnostic result as completion.

A change example that includes existing mail

Suppose staff mail and a new billing service use the same envelope domain. Prepare a reviewed combined policy, remove only the duplicate SPF record according to the change plan, and inspect DNS answers after saving. Then send from both systems to controlled external mailboxes, reviewing Authentication-Results, the relevant domain and IP, and complete document delivery. Testing only the new service can miss the loss of authorisation for staff mail.

Separate configuration errors from delivery results

Permerror indicates that the policy cannot be interpreted correctly, for example because of multiple records or exceeded limits. Temperror indicates a temporary problem, such as a DNS lookup failure. Diagnose the cause rather than broadly authorising everything. Keep the old values, rollback plan and change time. Caching can leave some receivers seeing old data, and SPF pass guarantees neither inbox placement nor DMARC pass, which also involves alignment and receiver policy.

Close with evidence from every sending system

The handover should contain the changed domain name, before-and-after TXT values, sender list, real test results and the owner responsible when services are added or retired. Chawinnix provides IT and security services as described on its website; this evidence can frame an email-system change discussion. Keep this SPF configuration repair distinct from a wider DMARC policy rollout.

Three envelope symbols connected to one record card beside a magnifying glass

Sources

Back to all articles

Start the conversation

Tell us briefly what concerns you and our team will get back to you. What you send stays confidential.