- Developer Hub
- SparkPost API
- Free Tools for Email Teams and Developers
- Slack Channel
- User Guides & Migrations
- Submit a Ticket
- SparkPost Academy
- Email Deliverability Resources
- Email Explained
- White Papers & Guides
- Webinars & Videos
- SparkPost vs. SendGrid
- Customers Stories
- Contact Us
What Is SPF?
Sender Policy Framework, or SPF, is a technical standard that helps protect email senders and recipients from spam, spoofing, and phishing. It is a form of email authentication.
Specifically, it defines a way to validate that an email message was sent from an authorized mail server, in order to detect forgery and to prevent spam. It was designed to supplement SMTP, the basic protocol used to send email, because SMTP does not itself include any authentication mechanisms.
How does SPF work?
SPF establishes a method for receiving mail servers to verify that incoming email from a domain was sent from a host authorized by that domain’s administrators. It piggybacks on the well-established Domain Name System (DNS). In general terms, the process works like this:
- A domain administrator publishes the policy defining mail servers that are authorized to send email from that domain. This policy is called an SPF record, and it is listed as part of the domain’s overall DNS records.
- When an inbound mail server receives an incoming email, it looks up the rules for the bounce (Return-Path) domain in DNS. The inbound server then compares the IP address of the mail sender with the authorized IP addresses defined in the SPF record.
- The receiving mail server then uses the rules specified in the sending domain’s SPF record to decide whether to accept, reject, or otherwise flag the email message.
What is an SPF record?
An SPF record is included in an organization’s DNS database. An SPF record is a specially-formatted version of a standard DNS TXT record. An SPF record looks something like this:1mydomain.com TXT "v=spf1 include:myauthorizeddomain.com include:sparkpostmail.com ~all”
Reading left-to-right in plain English, this record is saying that any email that claims to be from “mydomain.com” should be validated with SPF (that’s the “v=spf1” prefix to the record). It then specifies that the SPF records for “myauthorizeddomain.com” and “sparkpostmail.com” also should be included when validating email from mydomain.com (those are the parts labeled “include:”). In practical terms, that usually is done to indicate that the other domains authorized to send email on its behalf. Finally, the record concludes by stating that any other servers claiming to send mail should be flagged as questionable, and possibly failing, the SPF test (“~all”).
SPF records can be more complicated than this example, but the basic mechanism remains the same.
How is SPF related to DKIM, DMARC, or other standards?
SPF, DKIM, and DMARC are all standards that enable different aspects of email authentication. They address complementary issues.
- SPF allows senders to define which IP addresses are allowed to send mail for a particular domain.
- DKIM provides an encryption key and digital signature that verifies that an email message was not faked or altered.
- DMARC unifies the SPF and DKIM authentication mechanisms into a common framework and allows domain owners to declare how they would like email from that domain to be handled if it fails an authorization test.
Do I need SPF?
If you are a business sending commercial or transactional email, you definitely need to implement one or more forms of email authentication to verify that an email is actually from you or your business. Properly configuring email authentication standards like SPF is one of the most important steps you can take to improve your deliverability. However, SPF by itself only goes so far; SparkPost and other email experts recommend also implementing DKIM and DMARC to define a more complete email authentication policy.
Does SparkPost support SPF?
Yes. SparkPost implements and adheres to email authentication standards including SPF. In fact, SparkPost handles the SPF part of that automatically, so all email from your account is already SPF-compliant.
How can I verify my SPF settings?
SparkPost’s free email tools for developers make working with email authentication standards like SPF easy. Our SPF Inspector lets you quickly check who’s authorized to send email for your domain. And our SPF Builder is an easy way to create a working SPF record for your domain.
Learn More about SPF
Read more about SPF best practices
Learn more about SPF with these resources from SparkPost’s email experts and elsewhere on the web.
- Sender Policy Framework (SPF) Project Overview. The group that developed the SPF standard has published detailed explanations, how-to’s, and news about SPF.
- RFC 7208. This document published by the Internet Engineering Taskforce (IETF) formally defines the SPF technical standard.
- SPF Authentication: An Overview and Best Practices. Practical, hands-on advice for implementing SPF from our email deliverability experts.
- Understanding SPF and DKIM In Sixth Grade English. An easy-to-understand explanation of how SPF and DKIM work together to ensure email is authenticated.
Get help with SPF in the SparkPost Support Center
Learn more about how to configure and use SPF with the SparkPost service in the SparkPost Support Center.
- Setting up SPF and DKIM with Domain Providers. How-to’s for configuring records that support email authentication at various DNS hosting providers.
- Why do we need to configure SPF and DKIM to send anything? A great explanation of why SparkPost requires that all the email we deliver be authenticated with standards like SPF or DKIM.
More Essential Email Resources
Develop your email industry expertise and master best practices with SparkPost’s email resources.
The Big Rewards of Email Deliverability
Learn how third-party data shows the deliverability difference between SparkPost and also-ran cloud service providers yields hard, bottom-line benefits.read more
Get started and start sending
Try SparkPost and see how easy it is to deliver your app’s email on time and to the inbox.SparkPost © 2018 All Rights Reserved
Send this to a friend