Your business starts using a new invoicing service. It can create the invoice, but its messages are being questioned by recipients’ mail systems. The provider asks your administrator to update something called SPF. Why should sending an invoice involve changing a domain setting?
Start with the ordinary address the customer sees: [email protected]. The name after @, example.com, is the domain. Your company may control that name while another company runs the computers that send its mail. A mail server is a computer running mail-handling software; a sending service may use many such computers. Giving the invoicing application your company’s email address does not, by itself, tell receiving services which of those computers your domain permits. 3
When the invoice notice arrives, the customer’s mail service has a connection from a sending server. It can examine that server’s network address, called an IP address. That is an address used for communication between computers, not the email address written beside a person’s name. SPF connects a published permission to this observed sending address. The receiver does the check; the customer does not have to compare addresses by hand. 3
An email has delivery information as well as the message you read. The delivery information includes a return address for failed deliveries. The visible From address is inside the message. These addresses can differ, particularly when a business uses an external sending service. SPF normally checks the domain in that delivery return address, technically called MAIL FROM. It can also check the name the sending server uses to introduce itself. It does not directly verify the visible From field. 3
This is the gap SPF fills: a domain owner can publish permission that a receiving service can check. Writing a domain in the delivery information is a claim; comparing the delivering computer with that permission adds a check of the claim. 3
A permission list for the delivery service
Think of a business telling reception which couriers may collect parcels on its behalf. Reception can compare the arriving courier with that list. SPF works on a similar principle: the receiving mail service compares the connecting server’s Internet address with the domain’s published instructions. The name means Sender Policy Framework. 3
A published list is needed because the receiver cannot see your contract with the invoicing provider. It needs instructions it can retrieve while handling the message. DNS is a directory for information associated with domain names. A domain’s administrator publishes an entry there; a receiving service can ask the directory for that entry. The permission is therefore associated with the domain being checked, rather than attached as an unverifiable assurance in the email’s prose. 3
Those instructions are stored in DNS, the Internet directory that holds information about domain names. SPF uses a text entry, usually called an SPF record, beginning with v=spf1. It can name server addresses directly or refer to a service’s own sending policy. A reference can be useful when a provider operates many servers whose addresses it maintains. 3
In our invoicing example, the provider wants the relevant domain’s instructions to recognize its sending systems. The administrator should combine that permission with the business’s existing arrangements. Adding a second, competing SPF record at the same name is not the way to add another service: if the check finds multiple SPF policies there, it produces an error. Other types of text records can coexist without that problem. 3
Which address is actually being checked?
Suppose an invoice displays [email protected], while the service uses a return address at mailer.example.net. An SPF pass for mailer.example.net means that the delivering server was permitted by that domain’s SPF policy. It does not establish permission to put example.com in the visible From address. A separate mechanism, DMARC, makes the required connection between a successful authentication check and the visible domain. 3 6
Walk through that example in order. The provider opens a connection to the customer’s service and supplies a delivery return address using mailer.example.net. The receiver takes that domain, retrieves its SPF instructions and evaluates the connecting server’s address against them. If the rules permit it, the result is pass for mailer.example.net. Only afterwards should we ask whether that checked domain supports the visible business address. The successful comparison has not silently changed into a check of example.com. 3 6
This is why “SPF passed” needs a little context. Passed for which domain? A success can be perfectly genuine while answering a narrower question than the reader assumes. It does not inspect whether the invoice amount is correct, and it cannot decide whether a bank-account change was approved. 3
Reading the result without learning the whole syntax
Rules are read in order until a matching instruction determines the result. A reference to a provider’s policy is not a decorative mention of its name: it can make the receiver retrieve and evaluate that provider’s instructions as part of deciding permission. This explains both why the reference is convenient and why adding services requires care. A record that looks short on the screen can involve a longer chain of directory lookups behind it. 3
An SPF policy commonly finishes by describing what to do with servers not matched earlier. -all gives a fail result for those servers. ~all gives a weaker negative result called softfail. +all passes every server, so it cannot meaningfully restrict who sends. These are SPF results, not promises about exactly where every receiving service will place the message. 3
There are also error results. A temporary problem looking up the policy is different from a permanent problem in the policy itself. Neither should be casually translated as “a criminal sent this”. Even a published policy that looks plausible needs to be evaluated correctly for the server and domain involved. 3
A provider’s instructions can refer the receiver to further instructions, which can themselves contain more references. The receiver then has to look up information in DNS as it works through the rules. SPF limits the evaluated rule terms that cause these lookups to ten, counting the relevant nested terms too.
This is not a limit of ten email services or ten written Internet addresses. It concerns the rule terms actually evaluated, including those reached through references. An administrator therefore needs to check that chain rather than count words in the published record. Exceeding the limit causes a permanent SPF error. 3
Why genuine mail can fail
A customer might forward mail from one mailbox to another. The final receiving service then sees the forwarding server making the connection, rather than the original sender. If the original return-address domain does not authorize that forwarding server, SPF can fail even though the original email was genuine. The route matters because SPF checks the server currently connecting. 3
A different check, DKIM, attaches a verifiable domain signature to message content. If that signature remains valid and its domain matches in the way DMARC requires, it can provide a DMARC pass even when SPF does not. This is one reason email protection uses more than one mechanism instead of treating SPF as a universal verdict. 6
For our new invoicing service, the useful outcome is not merely a record containing its name. It is a legitimate invoice notification sent through the normal service and correctly checked at the receiving end. A trial with fictitious invoice details can establish that without exposing a customer’s real document.
When the business later stops using the service, review its permission instead of leaving it there indefinitely. SPF is most understandable as a sending permission: a particular service is allowed to send using a particular domain identity. That is valuable, but it is not an approval of everything the service might deliver.