Blog · Spf

Why SPF Passing Does Not Mean an Email Is Safe (And What Actually Secures Your Inbox)

The scenario that confuses people

A suspicious email lands in someone's inbox. The recipient flags it. You check the authentication headers. SPF passes. So you conclude the email must be fine.

Except that is not what SPF passing means. And the confusion is more common than it should be.

This post explains exactly what SPF checks, what it cannot detect, why SPF passing is necessary but not sufficient for email trust, and what the full email authentication stack actually looks like.

What SPF actually validates

SPF is Sender Policy Framework. When a mail server receives an email, it looks up the SPF record for the sending domain. That record lists which IP addresses are authorized to send email for that domain. The receiving server then checks whether the email actually came from one of those authorized IPs.

If it did, SPF passes. If it did not, SPF fails.

That is all SPF does. It answers one specific question: is this sending server in the authorized list for this domain?

It says nothing about:


  • whether the From: address on the email matches the domain that actually sent it

  • whether the email content is malicious or clean

  • whether the sending server has been compromised

  • whether the email is phishing

SPF is a server-level allowlist check. It validates the envelope sender, which is the address used in the SMTP transaction, not the From: header address that users actually see in their email client.

Why SPF passing does not mean the email is from who it claims to be

Here is the gap that trips people up most often.

The From: header in an email is the address displayed to the recipient. It is what matters for trust. But SPF validates the envelope sender, which can be entirely different from the From: header.

A phishing email can be sent from a server that is legitimately authorized to send for mail.example.com, while the visible From: address claims to be from paypal.com. The paypal.com SPF record is not involved in this transaction at all. SPF checks mail.example.com because that is where the email actually originated.

This is called address spoofing. SPF alone cannot prevent it because SPF was never designed to tie the visible From: address to the sending infrastructure.

There is also the forwarding problem. When an email is forwarded through a third-party relay, the forwarding server becomes the new sending server. That server may be authorized under its own SPF record, even if the original domain is not. SPF passes because the relay is authorized. The original domain is not validated again.

How DKIM adds what SPF cannot provide

DKIM is DomainKeys Identified Mail. Where SPF checks IP addresses, DKIM uses cryptographic signatures.

When an email is sent, the sending mail server attaches a DKIM signature to the message headers. This signature is generated using a private key held by the sending domain. Receivers can look up the corresponding public key in the domain's DNS records and verify that the signature is valid.

If the signature verifies, it means the email was not altered during transit and that it was signed by someone who holds the private key for that domain.

DKIM signs specific header fields including the From: address, which means a DKIM-passing email has cryptographic proof that the From: domain had control over the sending infrastructure at the time of signing.

However, forwarding can sometimes strip or break DKIM signatures. And a domain can publish DKIM records but use them incorrectly, resulting in failures that look like attacks but are actually misconfiguration.

DKIM also operates independently of SPF. An email can pass SPF but fail DKIM, or pass DKIM but fail SPF. Both can pass and still fail DMARC alignment.

How DMARC ties SPF and DKIM together

DMARC is Domain-based Message Authentication, Reporting, and Conformance. It is the layer that connects SPF and DKIM and enforces alignment.

DMARC requires that at least one of SPF or DKIM passes for the visible From: domain. It does not require both to pass. But it does require alignment: the domain used in SPF or DKIM must match the From: header domain that users see.

The alignment modes are relaxed (subdomains of the From: domain count as aligned) and strict (only an exact match counts).

When DMARC alignment fails, the email fails DMARC even if SPF or DKIM individually passed. This is why a phishing email claiming to be from paypal.com but sent from mail.example.com fails DMARC: the envelope domain and the From: domain are not aligned.

DMARC also generates aggregate reports that show domain owners exactly which sending sources are passing or failing authentication for their domain, broken down by receiving domain. Without reading these reports, you cannot see whether third parties are sending as your domain, whether your own mail streams are correctly aligned, or whether spoofing attempts are reaching your recipients.

This is where aggregate report tooling becomes practical rather than theoretical. DMARCFlow reads and summarizes those reports, surfacing which source IPs are failing DMARC alignment and which receiving systems are seeing your mail. When you can see the full picture across SPF, DKIM, and DMARC simultaneously, you can identify the gap between "SPF passed" and "this email is actually from us."

What spam filters evaluate beyond authentication

Authentication passing and an email being clean are separate concerns. Spam filters evaluate dozens of signals that have nothing to do with SPF, DKIM, or DMARC.

These include:

  • Sender reputation: Has this IP or domain sent spam before? Is it on blocklists?
  • Content analysis: Are there phishing keywords, suspicious URLs, mismatched fonts, or hidden text?
  • User engagement signals: Have previous emails from this sender been marked as spam, deleted without reading, or moved to inbox?
  • Header anomalies: Does the email structure look unusual? Are there missing headers?
  • Attachment analysis: Are attachments executable, compressed, or obfuscated?

An email can pass all three authentication checks (SPF, DKIM, DMARC) and still be spam or phishing. A phishing email sent from a compromised legitimate server, using a correctly configured From: address, with clean content and no malicious attachments, may pass every authentication check. This is not a flaw in email authentication. It is a reminder that authentication and content filtering are separate layers doing different jobs.

How to investigate when SPF passes but the email looks wrong

When you encounter an email that passed SPF but still looks suspicious, here is a practical checklist:

1. Check the From: address against the envelope sender. If the domains do not match, treat it as a potential spoofing attempt. This is the most common red flag that authentication alone does not catch.

2. Check DKIM status. Look for the Authentication-Results header in the email. It will show DKIM pass or fail. If DKIM failed, the email may have been altered in transit or sent from an unauthorized source claiming to be your domain.

3. Check DMARC result. The Authentication-Results header also shows DMARC pass or fail. If SPF or DKIM passed individually but DMARC failed, that is a clear signal of alignment failure, which is the primary indicator of address spoofing.

4. Examine the email headers fully. Look at Reply-To, Return-Path, and any discrepancies between what the email claims and where it actually came from.

5. Use DMARC aggregate reports. These reports tell you which receiving domains are seeing your emails, which sources are sending as your domain, and what percentage are passing or failing DMARC alignment. Without aggregate reports, you are guessing about whether your authentication is actually working.

How DMARC aggregate reports give visibility into the full authentication picture

Most organizations get DMARC reports and ignore them because the XML format is dense and difficult to read. But those reports contain the complete picture of how your domain is being used in email.

DMARC aggregate reports show:


  • which receiving mail systems are receiving email from your domain

  • which source IPs are sending as your domain

  • SPF, DKIM, and DMARC pass/fail rates per receiving domain

  • whether alignment is passing or failing

  • whether suspicious sources are sending as your domain without authorization

This visibility is the practical payoff for deploying SPF and DKIM. DMARC reports turn authentication into something you can act on, not just something you have configured.

DMARCFlow collects and summarizes these aggregate reports, converting the raw XML into a readable format that surfaces which sending sources are failing DMARC and why. For teams managing email security, this is the difference between knowing your authentication is configured and knowing whether it is actually working.

FAQ

Does SPF passing mean an email is safe?
No. SPF passing only confirms the sending server is authorized under the envelope sender's domain. It does not verify the From: header address, does not check email content, and does not prevent spoofing of the visible address.

Can a phishing email pass SPF?
Yes. If the phishing email is sent from a server that is legitimately authorized to send email for its own domain, SPF will pass for that domain. SPF cannot prevent one domain from sending email that claims to be from a different domain.

Can a phishing email pass DKIM?
If the phishing email was signed with a valid DKIM key from the attacker's domain, it will pass DKIM for that domain. DKIM only proves the email was not altered after signing and that the signing domain authorized it. It does not prove the From: address is legitimate.

Can a phishing email pass all three authentication checks?
Yes. A phishing email sent from a compromised server belonging to a legitimate brand, with correctly configured DKIM and DMARC for that server's domain, could pass SPF, DKIM, and DMARC simultaneously. This is why authentication and content filtering must work together. Authentication verifies sending authority. Content filtering evaluates the message itself.

Why do I need DMARC if I already have SPF and DKIM?
SPF and DKIM operate independently and do not require each other. Without DMARC, there is no enforcement of alignment between the envelope sender and the From: header. DMARC is what ties SPF and DKIM to the visible From: address and generates the reports that give you visibility into how your domain is being used in email.

How do I check if my domain's emails are passing authentication?
The most direct way is to examine the Authentication-Results headers in emails you send and receive. For aggregate visibility across all recipients, you need DMARC reports. Most domains that publish a DMARC record can request aggregate reports from receiving mail systems.