What is SPF Alignment?
An email message is made up of several headers. Each header carries information about the message, such as when it was sent, where it came from, and who it was sent to. For alignment purposes, SPF involves two identifiers:
- The From: header (the visible RFC5322.From domain)
- The Return-Path, also called the envelope sender or Mail From (the RFC5321.MailFrom domain)
When the domain in the From: header and the domain in the Return-Path align for an email, SPF alignment passes. When they do not, it fails. SPF alignment is an important factor in deciding whether a message is treated as legitimate under DMARC.
The example above shows a case where the From: domain aligns with the Return-Path (Mail From) domain, so SPF alignment passes.
Why does SPF alignment fail?
Case 1: Your SPF alignment mode is set to strict
The default SPF alignment mode is relaxed. Setting it to strict can cause alignment failures when the Return-Path domain is a subdomain of your organizational domain while the From: header uses the organizational domain itself (or vice versa). In strict mode, the two domains must match exactly. In relaxed mode, they only need to share the same organizational domain, so a subdomain still aligns.
The example above shows mail where the two domains share the same organizational domain but are not an exact match (the Mail From domain is a subdomain of company.com). In relaxed mode this passes SPF alignment; in strict mode it fails.
Case 2: Your domain has been spoofed
A common reason for SPF alignment failure is spoofing, where an attacker forges your domain in the From: address to deceive your recipients. The From: domain shows your identity, but the Return-Path reflects the attacker's own sending infrastructure. Because the attacker's envelope domain does not align with your From: domain, the message fails SPF alignment on the receiver's side, which is exactly the outcome DMARC enforcement relies on to stop the spoofed mail.
Case 3: Your third-party email vendors are not aligned
If you use third-party vendors that are not properly reflected in your SPF setup, misalignment can occur. This is one of the most common causes of SPF alignment failure. It happens when you use external services such as Microsoft 365 or Mailchimp to send mail but do not authorize them correctly, so receivers cannot tie that mail back to your domain. The fix is to ensure each authorized vendor is included in your SPF record (and, where possible, that DKIM is aligned too, since DKIM is more resilient to forwarding).
Standard Email Protocols: SMTP, POP3 & IMAP Free4 m
What is Email Security? Free4 m
Email Security Practices Free4 m
Building an Email Security Compliance Model Free5 m
Corporate Email Security Checklist Free3 m 30 s
What is the difference between Inbound email security and outbound email security? Free4 m
What is Information Security? Free4 m
Zero Trust Security Model Free3 m
What is a DNS Lookup? Free4 m
Understanding the 10 DNS Lookup Limit for SPF Records Free3 m
SPF Void Lookups Explained Free2 m
Creating and Optimizing SPF records for your own domain Free4 m
Video Free2 m
What is SPF Permerror and How to Fix It Free7 m
Video Free2 m
SPF Flattening Free5 m
SPF Macros Free9 m
Video Free2 m
What is SPF Alignment? Free3 m
How to Set Up Microsoft Office 365 SPF record? Free4 m
How to Set Up Google Workspace SPF Record? Free2 m
How to Set Up MailChimp SPF Record? Free3 m
How to Set Up SendGrid SPF Record? Free2 m
How to Set Up Salesforce SPF Record? Free3 m
How to Setup Zoho Mail SPF Record? Free2 m
What is DKIM Alignment? Free3 m
DKIM Domain Alignment Failures Free6 m
How to Set Up DKIM for Microsoft Office 365? Free4 m
How to Set Up DKIM for Google Workspace? Free3 m
How to Set Up DKIM for MailChimp? Free4 m
How to Set Up DKIM for SendGrid? Free3 m
How to Set Up DKIM for Salesforce? Free3 m
How to Set Up DKIM for Zoho Mail? Free3 m
DMARC RFC 9989, 9990 and 9991 Free5 m
What is DMARC Compliance? Free2 m
DMARC Compliance Requirements Free2 m
The Benefits of DMARC Free2 m
DMARC Configuring Free3 m
Achieving DMARC Enforcement Free2 m
DMARC Vs Antispam Solutions Free2 m
DMARC Identifier Alignment Free2 m
DMARC sp Tag Exceptions & Uses Free1 m
Configuring DMARC without DKIM Free3 m
Configuring DMARC without SPF Free2 m
DMARC Aggregate Report Views Free3 m
Video - PowerDMARC Aggregate Reports Free2 m 13 s
DMARC Forensic Report Views Free2 m
Video - PowerDMARC Forensic Reports Free0 s
DMARC Forensic PGP Encryption and Decryption Free2 m
TLS Report Views Free3 m
Video - PowerDMARC TLS Reports Free0 s
PDF/CSV Reports Free2 m
Video - PowerDMARC PDF/CSV Reports Free1 m 1 s