What is an Account-Control Surface?
Understand the account-control surface and why account protection has to cover more than the login form.
An SPF record is a DNS TXT record that lists which mail servers are allowed to send email for a domain. SPF stands for Sender Policy Framework. It helps receiving mail systems evaluate whether an email claiming to come from a domain was sent from an expected IP address or mail service.
SPF is published in DNS at the domain used in the envelope sender, also called the return-path or MAIL FROM domain. A basic record might look like this:
example.com. 3600 IN TXT "v=spf1 ip4:192.0.2.10 include:mailservice.example -all"
This says that one IPv4 address and the hosts authorized by mailservice.example may send for the domain, and other senders should fail SPF. The exact decision made by a receiver depends on its policy, the result, and other email authentication signals.
SPF works alongside DKIM, which signs messages, and DMARC, which checks whether a passing SPF or DKIM result aligns with the visible From domain.
SPF checks the sending IP address against the domain in the SMTP envelope, not necessarily the visible From header that a person reads. That distinction is why SPF can pass while a visible sender still looks suspicious, and why DMARC alignment is needed to connect authentication results to the visible organizational domain.
When a receiving server gets a message, it looks up the SPF record for the relevant domain and evaluates mechanisms in order. Common mechanisms include ip4, ip6, a, mx, include, and exists. Qualifiers such as +, ~, -, and ? indicate pass, softfail, fail, and neutral behavior. Many records end with ~all or -all.
An SPF pass means the sending IP matched the published policy. A fail means the policy says the sender is not authorized. A softfail usually means the sender is probably not authorized, but the domain owner is not asking receivers to treat it as a hard failure. Receivers still make their own final filtering decisions.
Start by inventorying every system that sends mail using the domain. That may include corporate mailboxes, transactional email, marketing platforms, support desks, billing systems, monitoring tools, password reset flows, scanners, and regional mail relays. Do not rely only on the main email provider.
For each sender, identify whether it sends using the organizational domain, a subdomain, or a separate return-path domain. Some platforms use a custom bounce domain such as mail.example.com or bounce.example.com; the SPF record must exist at the domain actually used during SMTP.
Prefer precise mechanisms when practical. Direct ip4 and ip6 entries are clear for stable dedicated senders. Provider include mechanisms are appropriate when a service publishes its own maintained SPF policy. Broad mechanisms such as a and mx can be valid, but they make the policy depend on web or mail routing records that may change for unrelated reasons.
SPF evaluation has a limit of 10 DNS lookups for mechanisms and modifiers that require DNS queries. This includes include, a, mx, ptr, and exists. Exceeding the limit can produce a permerror, which may cause mail to fail authentication.
The lookup limit is a common problem for organizations that add many email vendors over time. Each vendor may ask for an include, and each include may expand to more includes. The record can look short while still exceeding the limit at evaluation time.
Flattening an SPF record into explicit IP ranges can reduce lookups, but it creates maintenance risk because provider IP ranges change. A better first step is usually to remove unused senders, move vendor traffic to dedicated subdomains, and keep ownership of each sender documented.
Publishing more than one SPF record at the same DNS name is a major mistake. SPF expects one TXT record beginning with v=spf1 for a given name. Multiple SPF records can make evaluation fail even if each record looks valid on its own.
Another mistake is authorizing too much. A record ending in +all authorizes every sender and defeats the purpose of SPF. Overly broad includes or IP ranges can also make abuse harder to contain. If a vendor sends only for news.example.com, it is often better to authorize that vendor on the subdomain rather than the apex domain.
SPF also breaks easily during mail migrations. A team may move mailbox hosting but forget scanners, ticketing systems, or old transactional services. The reverse can happen too: old vendors remain authorized long after contracts end. That leaves a domain exposed if the old vendor account is compromised or reclaimed.
Forwarding is another limitation. When a message is forwarded, the forwarding server may become the apparent sending IP. SPF can fail even though the original sender was legitimate. DKIM and DMARC handling help address this, but SPF alone cannot fully solve forwarding behavior.
SPF reduces casual spoofing and gives receivers a published signal, but it should not be treated as proof that a message is safe. A compromised authorized sender will pass SPF. A lookalike domain can publish its own perfect SPF record. Phishing defense still requires DKIM, DMARC, user-visible domain awareness, filtering, monitoring, and abuse response.
Operationally, SPF records should be owned like production configuration. Changes can affect password resets, invoices, alerts, and customer support messages. A broken record may not cause immediate visible outage, but it can quietly reduce deliverability or damage domain reputation.
Monitor DMARC aggregate reports or equivalent mail authentication telemetry to see which sources are sending for the domain and whether they pass SPF and DKIM. Reports often reveal forgotten systems before a strict policy rollout exposes them.
Before tightening SPF, gather sending sources for at least a representative mail period. Publish precise records for the apex and any sending subdomains. Check that there is only one SPF record per name and that evaluation stays within the DNS lookup limit.
Move gradually from observation to enforcement. A record ending in ~all may be useful while inventory is still being confirmed. A stricter -all can make sense once legitimate senders are known and DMARC alignment is working. The right pace depends on mail criticality and the organization's ability to review failures quickly.
After changes, send test messages from every known platform, inspect authentication results in received headers, and watch reporting for unexpected failures. Keep the sender inventory current, because SPF quality decays as vendors and infrastructure change.
© PEAKHOUR.IO PTY LTD 2026 ABN 76 619 930 826 All rights reserved.