Email was designed in an era when the people on the network trusted each other. The original protocol, SMTP, lets a sending server write any sender address it likes. There is no built-in check that a message claiming to be from your bank was actually sent by your bank. Three standards were added over the years to patch this: SPF, DKIM and DMARC. They are often listed together as if they do the same thing. They do not, and understanding the difference explains a lot about how spoofed email gets through.
First, the two “from” addresses
Every email has at least two sender identities. The envelope sender (also called the MAIL FROM or Return-Path) is used by mail servers during delivery, and bounces go back to it. The header From is what the recipient sees in their mail client. They can be completely different. A newsletter sent through a marketing platform might have an envelope sender on the platform’s domain and a header From on the brand’s domain. This split is legitimate and very common, and it is also the gap attackers have historically exploited.
SPF: is this server allowed to send for this domain?
Sender Policy Framework, defined in RFC 7208, lets a domain owner publish a DNS record listing the servers permitted to send mail for it. When a message arrives, the receiving server takes the domain from the envelope sender, looks up its SPF record, and checks whether the connecting IP address is on the list.
SPF has three well-known limitations:
- It checks the envelope sender, not the header From the user sees. An attacker can pass SPF for their own domain while displaying your company’s name and address in the visible From line.
- It breaks on forwarding. If a message is auto-forwarded from one mailbox to another, the forwarding server’s IP is not in the original domain’s list.
- Evaluation is capped at 10 DNS lookups. Organisations that include many cloud services in their record can exceed this and cause SPF to return an error.
DKIM: was this message signed by the domain, and is it intact?
DomainKeys Identified Mail, RFC 6376, works differently. The sending server uses a private key to create a digital signature over selected headers and the body, and adds it as a header. The signature names a signing domain and a selector. The receiver fetches the matching public key from DNS and verifies the signature.
A valid DKIM signature proves two things: the signing domain’s key holder sent or approved the message, and the signed parts were not altered in transit. Because it does not depend on the IP address, DKIM usually survives simple forwarding. It can break when a mailing list adds a footer or modifies the subject line, because the signed content has changed.
The limitation mirrors SPF’s: the signing domain can be anything. A message can carry a perfectly valid DKIM signature from an attacker-owned domain while showing your brand in the From header.
DMARC: tying it to what the user sees
Domain-based Message Authentication, Reporting and Conformance, RFC 7489, closes that gap with one key concept: alignment. DMARC passes only if SPF or DKIM passes and the domain they authenticated matches the domain in the header From. Under the default relaxed mode, a subdomain counts as a match for its parent organisational domain; strict mode requires an exact match.
The domain owner publishes a DMARC record stating a policy for messages that fail:
none: take no action, just report. Used for monitoring.quarantine: treat as suspicious, typically deliver to spam.reject: refuse the message outright.
DMARC also asks receivers to send aggregate reports back to the domain owner. These XML reports show which IP addresses sent mail claiming to be from the domain and whether each passed. For many organisations, reading these reports is the first time they discover all the services sending email in their name: the payroll vendor, the CRM, the ticketing tool, and occasionally someone impersonating them.
A rollout, step by step
Consider a Chennai-based insurance broker whose customers keep receiving fake premium-due emails using its exact domain. A sensible path looks like this:
- Publish a DMARC record with policy
noneand a reporting address. Collect reports for a few weeks. - From the reports, list every legitimate sender: the main mail platform, a bulk SMS-and-email vendor, the policy administration system. Configure SPF and DKIM for each so they align with the brand domain.
- Move to
quarantine, optionally applying it to a percentage of failing mail first, and watch for legitimate mail landing in spam. - Move to
reject. Exact-domain spoofing of the brand now fails at receivers that enforce DMARC.
The commonest mistake is staying at none for years. That gives visibility but no protection. The second is jumping straight to reject without inventorying senders, which silently blocks invoices or OTP emails from a forgotten vendor.
Large mailbox providers have also made this less optional. From 2024, Google and Yahoo required bulk senders to their users to authenticate with SPF and DKIM and to publish a DMARC record, among other rules.
What all three still cannot stop
Even a perfect reject policy only protects the exact domain. Attackers adapt by:
- registering lookalike domains with a swapped or extra letter, which can have their own fully valid SPF, DKIM and DMARC;
- using a free webmail account with the target’s name as the display name;
- sending from a genuinely compromised mailbox at a real supplier, where every check passes because the mail really is from that domain.
So “DMARC pass” in an email header means the domain is authentic, not that the message is safe. Analysts reading a suspicious email treat authentication results as one input alongside the sender’s history, the links, the request being made and whether it makes business sense.
Written by the RP Strativa Team. The company in the example is illustrative.
Leave a Reply