Understanding The SPF Record Syntax In Detail

A customer walks into his email service provider complaining he cannot receive emails from an address in his organization. To be precise, the customer cannot receive emails from an address (say info@adomain.com) but can receive emails from another user on the same domain. The customer is advised to check all folders, including junk, spam, and quarantine, but cannot find any emails from info@adomain.com. What happens later will help one understand precisely what SPF record syntax is and why an SPF record checker is essential.

A detailed evaluation ensues, and the email service provider looks up the sender’s email setup. The domain name (adomain.com) has the SPF record syntax as:

"v=spf1 include:spf.protection.outlook.com -all"

It is necessary to define SPF to understand the above SPF record syntax.

spf record checker

Sender Policy Framework (SPF)

As per the official SPF website, the Sender Policy Framework (SPF) is an open standard offering a technical method for preventing sender address forgery. More precisely, the current version of SPF, called SPFv1 or SPF Classic, protects the envelope sender address, which is used to deliver messages.

SPF is an email authentication record that organizations can create for their domain name. Organizations can create an SPF record to prevent spoofing and decide which servers can send an email on the domain’s behalf.

Back To The SPF Record Syntax

The domain name of the above customer (adomain.com) had the SPF record syntax as:

"v=spf1 include:spf.protection.outlook.com -all"

The following is a detailed explanation of it:

v=spf1: This part identifies the TXT as an SPF record and identifies the current version.

include:spf.protection.outlook.com: The ‘include’ tag of this SPF record syntax identifies the domain following it as authorized and designated as a trustworthy sender.

-all: The ‘-‘ sign is a qualifier. Its purpose is to reject, and so it ignores all hosts or unspecified mail servers trying to send an email on behalf of adomain.com. It is also known as a ‘hard fail.’

Thus, it is clear that the ‘-’ qualifier is why the customer was not receiving emails in the above SPF record example. It shows that appropriate syntax is essential for an SPF record. Any error or inaccuracy in the syntax will render the SPF record useless.

spf record example
create spf record

How To Implement An SPF Record?

  1. Collect IP addresses used to send emails.
  2. Create an SPF record.
  3. Publish SPF record into DNS.
  4. Test SPF record with an SPF record checker.

SPF Record Syntax And SPF Record Checker

An SPF record checker is a diagnostic tool that helps in ensuring that the syntax of the SPF record in use is error-free and accurate. Besides checking and validating the syntax, it verifies the following aspects to ensure the SPF record’s correct setup.

  • The existence of an SPF record
  • That SPF record doesn’t exceed ten lookups
  • That the IP addresses are real addresses
spf record tester
spf record check

Final Words

SPF records protect against email spoofing, and it is easy to create SPF records accurately if one understands the SPF record syntax adequately. Furthermore, one has many helpful tools such as an SPF record checker to verify and point out errors, if any, in the SPF record syntax so that one doesn’t have to find them out manually.

Join the thousands of organizations that use DuoCircle


Find out how affordable it is for your organization today and be pleasantly surprised.

Interested in our Partner Program for MSPs and VARs? Visit Our MSP Partner Program.

Pin It on Pinterest