Technical Defense

ESP Authentication Proves No Spoofing

How SPF, DKIM, and DMARC records demolish "forged header" allegations in email anti-spam cases

3
Authentication Protocols
SPF+DKIM+DMARC
Industry Standard
Key
Technical Defense

How Email Actually Works

Before evaluating whether email headers were "forged" or "spoofed," courts and attorneys must understand how modern email delivery infrastructure actually operates. This section provides a non-technical explanation of the email ecosystem that forms the foundation for every authentication defense.

The Email Delivery Ecosystem

Modern commercial email is not sent directly from a sender's personal computer to a recipient's inbox. Instead, it flows through a multi-step infrastructure that involves specialized email service providers (ESPs). Here is the actual delivery path:

This is exactly how every major business sends email. The ESP acts as an authorized sending agent — just like a courier service shows their own tracking and routing information rather than the original sender's home address.

Email Header Anatomy

Every email contains metadata called "headers" that document the email's journey from sender to recipient. Understanding these headers is critical because plaintiffs in anti-spam cases often misinterpret standard header fields as evidence of "forgery."

From: Display address — The sender identity shown to the recipient. Set by the sender in their ESP campaign settings. Example: marketing@example.com
Reply-To: Response routing — Where replies are directed. Often the same as From, but can differ for operational reasons (e.g., replies go to a support team).
Return-Path: Bounce address — Set by the ESP to handle delivery failures (bounces). This will typically show the ESP's domain (e.g., bounces.sendgrid.net). This is not forgery — it is standard bounce-processing infrastructure.
Received: Server routing chain — Each server that handles the email adds a Received: header. These show the ESP's servers because the ESP physically transmits the email. Multiple Received: headers are normal.
Message-ID: Unique identifier — Generated by the ESP's sending infrastructure. Contains the ESP's domain (e.g., <abc123@mail.sendgrid.net>). This is standard and expected.
DKIM-Signature: Cryptographic signature — Added by the ESP proving the email is authentic and unaltered. This is the strongest technical evidence against forgery claims.
Authentication-Results: Verification summary — Added by the receiving mail server showing the results of SPF, DKIM, and DMARC checks. This is the single most important header for defense.

Why Headers Show the ESP's Servers

When a sender uses an ESP to send email, the ESP's servers physically transmit the message. This means headers like Received:, Return-Path:, and Message-ID: will naturally contain the ESP's domain names and IP addresses.

Seeing "sendgrid.net" or "mcsv.net" in routing headers does not mean the email was "spoofed." It means the email was sent through a legitimate, authenticated email platform. This is how every business email works — from a 10-person startup to a Fortune 500 company.

The analogy is straightforward: when you send a package via FedEx, the tracking label shows FedEx's routing information, not your home address. No one would claim the package was "forged" because the courier's name appears on the shipping label. Email works the same way.

What This Means for Anti-Spam Litigation

Under California B&P § 17529.5, the statute targets emails with headers that are "falsified, misrepresented, or forged." When email passes SPF, DKIM, and DMARC authentication, the headers are by definition not falsified, misrepresented, or forged — they are verified as authentic by the domain owner's own published DNS records and cryptographic signatures.

The three authentication protocols described in the following tabs provide the technical framework for proving that email headers are genuine, authorized, and unaltered.

SPF (Sender Policy Framework)

SPF — The first layer of email authentication. SPF is a DNS-based protocol that explicitly declares which mail servers are authorized to send email for a domain.

What SPF Is

SPF is a DNS TXT record published by the domain owner that lists every mail server and IP address authorized to send email on behalf of that domain. When a receiving server gets an email claiming to be from example.com, it looks up the SPF record for example.com and checks whether the sending server's IP address is listed.

How SPF Works

  1. Domain owner publishes SPF record: The domain owner adds a DNS TXT record listing all authorized sending servers, including their ESP's servers.
  2. Sender transmits email via ESP: The email is sent through the ESP's infrastructure (e.g., SendGrid, Mailchimp, Postmark).
  3. Receiving server performs SPF check: The recipient's mail server looks up the sender's domain SPF record and compares the sending IP against the authorized list.
  4. Result is recorded: The result (pass, fail, softfail, neutral) is written into the Authentication-Results header.

Example SPF Record

DNS TXT Record ; SPF record for example.com
; This record EXPLICITLY authorizes the following to send email:

v=spf1 include:servers.mcsv.net include:sendgrid.net include:_spf.google.com ~all

; Breakdown:
; v=spf1 → SPF version 1
; include:servers.mcsv.net → Authorizes Mailchimp servers
; include:sendgrid.net → Authorizes SendGrid servers
; include:_spf.google.com → Authorizes Google Workspace
; ~all → Soft-fail all other servers

What SPF Passing Means

An SPF pass result means one thing unequivocally: the domain owner explicitly authorized the ESP to send email on their behalf. The domain owner went into their DNS management panel, typed out the ESP's include directive, and published it for the entire internet to verify.

✅ SPF Pass Result — What the Receiving Server Records
Authentication Header Authentication-Results: mx.google.com;
    spf=pass (google.com: domain of
    bounce-mc.us21_abc123@mail456.suw21.mcsv.net
    designates 198.2.xxx.xxx as permitted sender)
    smtp.mailfrom=bounce-mc.us21_abc123@mail456.suw21.mcsv.net

Translation: Google's mail server checked the SPF record and confirmed that the Mailchimp server (198.2.xxx.xxx) is an authorized sender for this domain. The email is legitimate.

❌ SPF Fail Result — What Actual Spoofing Looks Like
Authentication Header Authentication-Results: mx.google.com;
    spf=fail (google.com: domain of
    sender@example.com does not designate
    203.0.113.42 as permitted sender)
    smtp.mailfrom=sender@example.com

Translation: The sending server was NOT authorized. This is what genuine spoofing looks like — and it fails SPF verification.

How to Retrieve Your SPF Record

Terminal Command # macOS / Linux
dig TXT example.com +short

# Windows
nslookup -type=TXT example.com

# Expected output for a domain using Mailchimp + SendGrid:
"v=spf1 include:servers.mcsv.net include:sendgrid.net ~all"

DKIM (DomainKeys Identified Mail)

DKIM — The second and most powerful layer of email authentication. DKIM provides cryptographic proof that an email's headers and body have not been altered and that the email was sent by an authorized entity.

What DKIM Is

DKIM is a cryptographic signature system. The ESP signs every outgoing email with a private key, and the corresponding public key is published in the sender's DNS records. Any receiving server can verify the signature against the public key to confirm authenticity.

This is the same class of cryptography used in HTTPS certificates, digital signatures, and secure banking — it is mathematically unforgeable.

How DKIM Works

  1. Domain owner configures DKIM: The domain owner adds a CNAME or TXT record in DNS pointing to the ESP's DKIM public key.
  2. ESP signs the email: When the email is sent, the ESP uses its private key to generate a cryptographic hash of specific headers (From, Subject, Date, etc.) and the email body.
  3. Signature is attached: The signature is added as a DKIM-Signature header on the email.
  4. Receiving server verifies: The recipient's mail server retrieves the public key from DNS and mathematically verifies the signature.
  5. Any alteration causes failure: If even a single character in the signed headers or body was changed after signing, the verification fails.

Example DKIM Signature Header

Email Header DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
    d=example.com; /* Signing domain */
    s=k1; /* Selector (points to DNS key) */
    h=from:to:subject:date:mime-version:content-type;
    bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=;
    b=AuUoFEfDxTDkHlLXSZEpZj79LICEps6eda7W3deTVFOk2yFUP...
DNS DKIM Record ; Retrieving the DKIM public key from DNS:
dig TXT k1._domainkey.example.com +short

; Output:
"v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ
KBgQC3QEKyU1fSma0axspqYK5iAj+54lsAg3BIYieDmo..."

What DKIM Passing Means

🔒 Headers Are Authentic

The From:, Subject:, and other signed headers have not been altered since the ESP sent the email. They are exactly what the sender intended.

🔒 Body Is Unmodified

The email body (content) has not been changed in transit. The body hash (bh=) proves the content is identical to what was sent.

🔒 Sender Is Authorized

The signature was created with a private key, and the matching public key is in the sender's DNS. Only an authorized sender has access to the private key.

The Cryptographic Proof

DKIM is mathematically unforgeable. The cryptographic signature cannot be generated without the private key, which is held exclusively by the ESP. If DKIM passes verification, it proves beyond technical doubt that:

  • The email was sent by the entity holding the private key (the ESP, authorized by the domain owner)
  • The header information is genuine and unaltered
  • The email content has not been modified in transit
  • The domain owner authorized this signing by publishing the public key in their DNS
✅ DKIM Pass Result
Authentication Header Authentication-Results: mx.google.com;
    dkim=pass header.i=@example.com header.s=k1
    header.b=AuUoFEfD

Translation: The cryptographic signature on this email is valid. The headers and body are authentic, unmodified, and authorized by the domain owner. This is mathematical proof — not an opinion.

"Forged" headers would fail DKIM verification. If someone actually spoofed or altered the email headers, the cryptographic hash would not match the public key, and DKIM would report dkim=fail. A DKIM pass is definitive proof that the headers are genuine.

DMARC (Domain-based Message Authentication)

DMARC — The third layer that ties SPF and DKIM together into a unified authentication policy. DMARC ensures that both SPF and DKIM align with the visible From: domain and tells receiving servers what to do with unauthenticated email.

What DMARC Is

DMARC (Domain-based Message Authentication, Reporting and Conformance) is a DNS-published policy that:

  • Requires alignment: Both SPF and DKIM must authenticate against the same domain shown in the From: header
  • Sets enforcement policy: Tells receiving servers whether to deliver, quarantine, or reject emails that fail authentication
  • Enables reporting: Provides aggregate data about all emails sent using the domain, including authentication pass/fail rates

How DMARC Works

  1. Domain owner publishes DMARC record: A DNS TXT record at _dmarc.example.com defines the authentication policy.
  2. Receiving server checks alignment: After SPF and DKIM checks, the receiving server verifies that the authenticated domain aligns with the From: header domain.
  3. Policy is applied: Based on the DMARC policy (none, quarantine, or reject), the receiving server handles unauthenticated email accordingly.
  4. Reports are sent: Aggregate reports are sent to the domain owner showing authentication results across all receiving servers.

Example DMARC Record

DNS TXT Record ; DMARC record for example.com
; Published at: _dmarc.example.com

v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com; pct=100; adkim=r; aspf=r

; Breakdown:
; v=DMARC1 → DMARC version 1
; p=quarantine → Quarantine emails that fail authentication
; rua=mailto:... → Send aggregate reports to this address
; pct=100 → Apply policy to 100% of emails
; adkim=r → Relaxed DKIM alignment
; aspf=r → Relaxed SPF alignment

DMARC Alignment Explained

DMARC's unique contribution is alignment — it verifies that the domain authenticated by SPF or DKIM matches the domain in the visible From: header. This prevents a scenario where SPF passes for one domain but the From: header shows a completely different domain.

Check What It Verifies Alignment Requirement
SPF Alignment Return-Path domain matches From: domain Relaxed: organizational domain match (e.g., subdomain OK)
Strict: exact domain match
DKIM Alignment DKIM signing domain (d=) matches From: domain Relaxed: organizational domain match
Strict: exact domain match

DMARC passes if either SPF or DKIM passes and aligns with the From: domain. Most properly configured ESP setups achieve alignment through DKIM (custom DKIM signing with the sender's domain).

DMARC Pass — Full Authentication

✅ Complete Authentication Result
Authentication Header Authentication-Results: mx.google.com;
    dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE)
    header.from=example.com;
    spf=pass (google.com: domain of
    bounce@mail.example.com designates
    198.2.xxx.xxx as permitted sender)
    smtp.mailfrom=bounce@mail.example.com;
    dkim=pass header.i=@example.com header.s=k1
    header.b=AuUoFEfD

Translation: This email passed all three authentication checks. The domain owner configured authentication (DMARC), authorized the sending server (SPF), and cryptographically signed the email (DKIM). The headers are genuine, verified, and aligned with the From: domain.

DMARC Reporting as Evidence

DMARC aggregate reports provide a powerful source of evidence for litigation. These XML reports, sent by major mailbox providers (Google, Microsoft, Yahoo), document:

  • Volume of authenticated email: Shows the number of emails that passed SPF, DKIM, and DMARC over reporting periods
  • Consistent compliance: Demonstrates ongoing authentication, not a one-time event
  • Sending IP addresses: Confirms emails originated from the ESP's authorized infrastructure
  • Failure reports: Would show if any unauthorized senders attempted to spoof the domain (and were blocked or quarantined)

Preservation note: DMARC reports are typically sent daily and may only be retained for a limited period. Issue a litigation hold on these reports early to preserve this evidence of ongoing authentication compliance.

How to Retrieve Your DMARC Record

Terminal Command # macOS / Linux
dig TXT _dmarc.example.com +short

# Windows
nslookup -type=TXT _dmarc.example.com

# Expected output:
"v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@example.com; pct=100"

Gathering Authentication Evidence for Litigation

This step-by-step guide covers how to collect, preserve, and present email authentication evidence to defend against "forged header" allegations. Each step builds on the previous one to create a comprehensive technical defense.

1

ESP Account Campaign Export

Log in to your ESP account (Mailchimp, SendGrid, Klaviyo, Postmark, Hive.co, etc.) and export the specific email campaign at issue. Critical items to capture:

  • Campaign configuration: From name, From email, Reply-To address, Subject line
  • Sending domain: The authenticated domain used for the campaign
  • Authentication settings: Screenshots of DKIM configuration, custom domain authentication setup
  • Recipient list: The list or segment the email was sent to (with evidence of opt-in)
  • Full email headers: Most ESPs allow you to view the raw email as sent, including all headers
  • Delivery logs: ESP delivery reports showing successful delivery, opens, and bounces
2

DNS Record Snapshot

Capture the current SPF, DKIM, and DMARC DNS records. These records prove the domain owner's authentication configuration. Take both a screenshot and save the command output.

Commands # Capture SPF record
dig TXT example.com +short | grep spf

# Capture DKIM record (replace 'k1' with your selector)
dig TXT k1._domainkey.example.com +short

# Capture DMARC record
dig TXT _dmarc.example.com +short

# For historical records, use archive.org Wayback Machine
# or SecurityTrails for historical DNS data

Important: DNS records can be changed at any time. Capture them as early as possible and consider using a notarized screenshot or a third-party DNS monitoring service (e.g., SecurityTrails, DNSHistory) for timestamped records.

3

Email Header Analysis

Obtain the raw email headers from the received email and analyze them using professional tools. The most authoritative tool is Google Admin Toolbox Message Header Analyzer.

  • Google Admin Toolbox: toolbox.googleapps.com/apps/messageheader/ — paste raw headers to get a parsed, visual breakdown
  • MXToolbox Header Analyzer: mxtoolbox.com/EmailHeaders.aspx — another respected tool
  • How to get raw headers: In Gmail, open the email, click the three-dot menu, select "Show original." In Outlook, open the email properties to view the internet headers.

Save both the raw header text and the parsed analysis output as evidence.

4

Authentication Results Extraction

The single most important piece of evidence is the Authentication-Results: header in the received email. This header is added by the receiving mail server (not the sender) and shows the results of SPF, DKIM, and DMARC verification.

What to Look For Authentication-Results: mx.google.com;
    dmarc=pass (p=QUARANTINE) header.from=example.com;
    spf=pass smtp.mailfrom=bounce@esp-domain.com;
    dkim=pass header.i=@example.com header.s=k1

The key results to document: spf=pass, dkim=pass, dmarc=pass. These three results, recorded by the receiving server, conclusively demonstrate authenticated, authorized email delivery.

5

ESP Documentation and Verification Letter

Contact your ESP's legal or compliance department and request formal documentation confirming:

  • Account holder identity and verification
  • Sending domain ownership verification performed by the ESP
  • Authentication configuration (SPF, DKIM, DMARC) for the account
  • Confirmation that the specific email campaign was sent through their authenticated infrastructure
  • The ESP's standard sending practices regarding header configuration

Many ESPs will provide a compliance letter or can have their records custodian provide a declaration suitable for litigation.

6

Litigation Hold and Preservation

Issue a litigation hold to your ESP to preserve all relevant data. Critical items to preserve:

  • Campaign data: email content, subject line, From address configuration
  • Sending logs: timestamps, recipient addresses, delivery status
  • Authentication records: DKIM signing configuration, domain verification records
  • Account audit logs: who configured the campaign, when changes were made
  • DMARC aggregate reports received from mailbox providers
  • Bounce and complaint data (may show compliance with best practices)

Act quickly. ESPs have different data retention policies. Some retain detailed sending logs for only 30-90 days. Issue the preservation request as soon as litigation is anticipated.

7

Expert Witness Consideration

For cases where the technical evidence is complex or the opposing party contests the meaning of authentication results, consider retaining an email infrastructure expert who can testify about:

  • How ESP sending infrastructure operates as an industry standard
  • The meaning of SPF, DKIM, and DMARC authentication results
  • Why standard ESP routing headers do not constitute "forged" or "misrepresented" headers
  • The difference between legitimate ESP-mediated email and actual spoofing
  • Industry standards for email authentication as documented in RFC 7208 (SPF), RFC 6376 (DKIM), and RFC 7489 (DMARC)

An expert in email deliverability, email security, or DNS infrastructure can provide authoritative testimony that standard ESP operations are not spoofing.

Evidence Checklist Summary

Evidence Item Source What It Proves
SPF record snapshot DNS query output Domain owner authorized the ESP
DKIM public key record DNS query output Domain owner enabled cryptographic signing
DMARC policy record DNS query output Domain owner configured authentication policy
Authentication-Results header Received email headers Receiving server verified SPF/DKIM/DMARC pass
ESP campaign export ESP account dashboard Campaign configuration and From address setup
ESP compliance letter ESP legal/compliance team Account ownership and authentication configuration
DMARC aggregate reports Email to rua= address Ongoing authentication compliance over time

Common Plaintiff Arguments (And Rebuttals)

Plaintiffs in email anti-spam cases frequently mischaracterize standard ESP infrastructure as "spoofing" or "forged headers." Below are the most common arguments and the technical rebuttals that defeat them.

❌ Plaintiff Argument #1: "The email came from a different domain than the sender"

✅ Technical Rebuttal

This is exactly how ESP routing works. When a sender uses Mailchimp, SendGrid, Klaviyo, Postmark, or any other ESP, the email is physically transmitted from the ESP's servers. Certain technical headers (like Return-Path and Received) will show the ESP's domain because the ESP is the authorized delivery agent.

The visible From: header still shows the sender's identity. The technical routing headers show the delivery infrastructure — just as a FedEx tracking label shows FedEx, not the person who shipped the package.

SPF explicitly authorizes this. The domain owner published an SPF record (e.g., include:sendgrid.net) that tells every receiving server in the world: "SendGrid is authorized to send email for my domain." This is authorization, not forgery.

❌ Plaintiff Argument #2: "The headers show third-party servers, not the sender's"

✅ Technical Rebuttal

Because the ESP's servers handle email delivery. That is their entire purpose. The sender contracts with the ESP specifically to send email on their behalf. The Received: chain showing the ESP's servers is proof that the email traveled through legitimate, authorized infrastructure.

DKIM proves the email is authentic. The cryptographic signature was generated by the ESP (using the domain owner's authorized key) and verified by the receiving server. If the headers were "forged," the DKIM verification would fail.

Every major company uses third-party ESPs. The presence of third-party servers in email headers is universal across commercial email. It would be impossible to find a major brand that sends email directly from its own mail servers without any third-party infrastructure.

❌ Plaintiff Argument #3: "The Return-Path doesn't match the From: address"

✅ Technical Rebuttal

The Return-Path (also known as the envelope sender or bounce address) is always set by the ESP to handle bounce processing. This is an industry-standard practice documented in RFC 5321 and used by every major email platform worldwide.

The Return-Path serves a specific technical function: it tells receiving servers where to send delivery failure notifications (bounces). The ESP sets this to their own bounce-processing domain so they can track deliverability and maintain list hygiene.

This is not forgery — it is infrastructure. The Return-Path is a technical routing address that recipients never see. It is not the "sender" address. Confusing these two distinct header fields reflects a fundamental misunderstanding of email architecture. RFC 5321 Section 4.4 explicitly provides for the Return-Path to differ from the From address.

❌ Plaintiff Argument #4: "The sender used a 'via' domain"

✅ Technical Rebuttal

Gmail shows a "via" indicator when SPF or DKIM authentication does not fully align with the From: domain. Importantly, if SPF and DKIM both pass and align with the From: domain, Gmail removes the "via" indicator entirely.

The "via" indicator is Gmail's way of showing authentication status to users. Its presence actually demonstrates that Gmail's authentication verification system is working correctly. And for emails where proper DKIM alignment is configured, the "via" indicator does not appear at all.

The "via" indicator proves authentication is being checked, not that spoofing occurred. Many legitimate senders show "via" when they use ESP shared infrastructure. When a sender configures custom DKIM signing with their own domain, the "via" indicator disappears — proving the authentication system works as designed.

❌ Plaintiff Argument #5: "The Received: headers show the email was relayed"

✅ Technical Rebuttal

All email is relayed through servers. That is how email works. The SMTP protocol (RFC 5321) is fundamentally a store-and-forward relay system. Every email — whether sent from Gmail, Outlook, a corporate server, or an ESP — passes through multiple servers (relays) before reaching the recipient's inbox.

The Received: headers document this relay chain, and their presence is expected, normal, and required by RFC 5321 Section 3.7.2. The question is not whether the email was relayed (it always is), but whether the relay was authorized.

SPF answers the authorization question definitively. SPF pass = the relay was authorized by the domain owner. The domain owner published a DNS record explicitly listing the ESP's servers as authorized senders. The relay was not unauthorized interception — it was the intended delivery path.

Summary: Authentication Results Defeat "Forged Header" Claims

When an email passes SPF, DKIM, and DMARC verification, the receiving mail server has independently confirmed that: (1) the sending server was authorized by the domain owner, (2) the email content and headers were not altered in transit, (3) the visible From: domain aligns with the authenticated sending domain, and (4) the domain owner configured an authentication policy. These are machine-verified, cryptographically provable facts — not allegations or opinions. They constitute the strongest possible technical evidence against "forged header" claims.

The burden of proof shifts. When the defendant produces SPF, DKIM, and DMARC pass results, the plaintiff must explain how headers can simultaneously be "forged" AND pass cryptographic verification by the receiving server. This is a technical impossibility — forged headers fail authentication checks by definition.

Need Help Building Your Technical Defense?

If you are facing "forged header" allegations in an email anti-spam case, our team can help gather and present authentication evidence. We work with email infrastructure experts to build comprehensive technical defenses.

Contact: owner@terms.law

California State Bar #279869