Find every legitimate sender first

An SPF change starts with a sender inventory, not with copying a provider's example into DNS. A Hong Kong business may send staff mail through a workspace provider, receipts through an ecommerce platform and booking reminders through a separate service. Each may use a different envelope sender domain. Ask the owner of each workflow for a recent message and its full headers, the product account that sent it, the domain it uses for the SMTP envelope and whether the provider actually asks the business to publish an SPF authorization. A visible From address alone is insufficient evidence of what SPF evaluates. RFC 7208 describes SPF as authorization for a mail domain in the SMTP transaction; it does not mean every message that visually names the business will use the same SPF domain. List inactive vendors separately so they are not carried into a new policy by habit.

Make the inventory a decision table with the business purpose, sender owner, envelope domain, evidence message, provider's current documented DNS instruction and proposed keep or remove decision. Include less obvious sources such as a contact-form notification, a helpdesk, a point-of-sale system or an invoicing tool if they actually send mail. Confirm who is allowed to change the authoritative DNS zone; a screenshot of a registrar panel may be stale when nameservers point elsewhere. Check the existing TXT records for the precise domain being evaluated, including any sending subdomain. Do not confuse an SPF record at the apex with one at a separate subdomain. Keeping this inventory current matters more than collecting a long list of hypothetical integrations. A vendor that only receives mail does not need to be included as an outgoing sender simply because its name appears in a contract.

Build one policy that can be evaluated

RFC 7208 says a domain must not publish multiple SPF records that cause a check to select more than one. Two separate TXT strings each beginning with the SPF version marker are therefore not a safe way to authorize two vendors. Consolidate the legitimately required mechanisms into one record for that domain, following each provider's current instructions and the business inventory. RFC 7208 also allows a single DNS record to contain multiple character strings, which DNS joins for evaluation; that is different from publishing separate SPF records. A migration should preserve existing legitimate senders until their replacement path has been tested. Do not quietly replace a working workspace record with a marketing vendor's sample. Review the final policy as a whole, including its terminal all mechanism and any redirects, with the domain owner before changing authoritative DNS.

DNS evaluation has a budget. RFC 7208 limits mechanisms and modifiers that trigger DNS lookups during a check to ten, including nested include and redirect evaluation. A short-looking record can therefore be expensive if a provider's include expands into further lookups. Count the evaluated path, not just the number of words visible in the top-level TXT value. IP mechanisms and the all mechanism do not consume that lookup budget in the same way, but hardcoding provider addresses without authorization or an update plan can create a different maintenance failure. If the proposed policy is near the limit, ask whether every sender is still required and whether a service can use its own sending subdomain. Do not claim that a generic SPF flattening service automatically keeps cloud senders current; any such design needs an owner and change process.

Consider a hypothetical shop using an office mail provider, a receipt platform and a retired campaign tool. The first two genuinely send from a domain the shop controls; the third was disconnected months ago. A sensible change is to document the two active sources, confirm their current authorization instructions, remove the retired authorization and construct one record for the correct domain. Test the receipt route separately from staff mail because a passing staff message says nothing about the checkout platform. If the receipt platform instead signs and sends using its own envelope domain, adding it to the shop's apex SPF may not test the route the team thinks it does. This worked example describes a decision sequence, not a known customer's DNS or a promised delivery rate.

Verify DNS and actual messages

After the DNS change, query the authoritative result for the exact domain and confirm that the intended single SPF policy is visible. Allow for normal DNS cache behaviour rather than treating one machine's immediate answer as universal. Send fresh test messages through each active service to a mailbox where complete headers can be inspected. Check the SPF result together with the identity of the domain that was evaluated; a bare pass without the domain can mislead. Record the sender service, time, test recipient and relevant result. If the service has several routes, such as regular staff mail and automated notifications, test representative routes. Do not declare success from a DNS syntax checker alone: it cannot prove that the real receipt platform used the expected envelope domain or that every operational flow was exercised.

SPF is one layer of authentication, not a general inbox guarantee. A message can pass SPF and still be unwanted, or fail another policy that matters to the recipient. A visible From identity may need separate alignment considerations under DMARC; do not describe SPF authorization as proof that the customer-visible name or offer is trustworthy. Keep the test within its scope, then hand any DKIM, DMARC or content issues to the right owner. If a previously legitimate route fails after the change, restore its known working authorization or pause that route while investigating rather than leaving customers without order messages. The business should retain a rollback copy of the old DNS value and the evidence that justified each added or removed source.

Treat the policy as a maintained register. When procurement adds a new mail-sending vendor, require a sample message, envelope-domain evidence and a DNS-budget review before activation. When a service closes, schedule removal of its authorization and test the remaining routes. Give DNS ownership to a named team, but keep business owners accountable for identifying which customer messages must still send. An annual reminder alone may miss a rapid platform change; link the review to onboarding and offboarding. The final acceptance note should state which services and domains were tested, which were not, and whether the record stays below the lookup limit on the tested evaluation paths. That is more useful than a screenshot of a green score without context.

If a test fails, diagnose the exact identity before changing the record again. A recipient may report an SPF failure for a bounce domain controlled by a vendor, while the business's own apex record is healthy. Ask the provider which envelope domain it uses for that route and whether a custom return-path setting is needed; do not authorize a guessed IP address. Likewise, a DNS response with two SPF policies is a different defect from a policy that authorizes the wrong source, and both differ from hitting the lookup limit. Record the failure category, the source message and the DNS answer. Correct one cause, publish the revised record, and repeat the affected send test along with a previously passing route. This protects against fixing receipts while accidentally disabling staff mail. The customer-facing symptom may be a missed confirmation, but the technical conclusion should name the actual evaluated domain and result.

Before you proceed

  • Every active sender and its envelope domain has a recent evidence message.
  • The exact domain has one evaluable SPF policy and a reviewed lookup path.
  • Fresh messages from each active route are inspected after the change.

Sources & further reading