What is SPF?
SPF (Sender Policy Framework) is an email authentication method that helps prevent spammers from sending emails on behalf of your domain.
How SPF Works
SPF works by allowing domain owners to publish a list of IP addresses and servers that are authorized to send email for their domain. When an email server receives a message, it checks the SPF record to verify if the sending server is authorized.
The SPF Check Process
- 1Email is sent from a mail server
- 2Receiving server extracts the domain from the envelope sender
- 3Server looks up the SPF record in DNS for that domain
- 4Server checks if the sending IP matches the authorized list
SPF Results
The sending IP is authorized. The email is legitimate.
The sending IP is explicitly not authorized. The email may be rejected.
The IP is probably not authorized, but the domain owner is not certain. Usually accepted but marked.
No SPF record exists or the record doesn't make a statement about the IP.
Example SPF Record
This record authorizes Google Workspace, Amazon SES, and a specific IP range to send email for the domain. The -all means all other sources should fail.
Common SPF Mechanisms
include:- Include another domain's SPF recordip4:- Authorize a specific IPv4 address or rangeip6:- Authorize a specific IPv6 address or rangea- Authorize the domain's A record IPmx- Authorize the domain's mail servers-all- Fail all other sources (hard fail)~all- Softfail all other sources
Why SPF Matters
- Prevents email spoofing and phishing attacks
- Improves email deliverability
- Required for DMARC compliance
- Builds sender reputation
Check Your SPF Configuration
Use our free spam checker to verify your SPF, DKIM, and DMARC settings.
Check Your EmailNeed SPF verification in your app?
Mailhooks automatically verifies SPF, DKIM, and DMARC for every inbound email and delivers the results via webhook.
Try Mailhooks free