How to Read Email Headers to Spot Phishing
To check an email for phishing, open its full headers, find the Authentication-Results line that your own mail provider added, and compare the domains its SPF, DKIM and DMARC results name with the domain in From. Then read the Received lines from the bottom up. A message that claims to come from example.com but shows dmarc=fail for header.from=example.com, a bounce address on an unrelated domain and a Reply-To that points somewhere else has nothing tying it to the domain it names. A pass proves less than it seems, because a lookalike domain or a hijacked mailbox can pass every check.
What each header field tells you
| Field | Defined in | What it records | What it cannot tell you |
|---|---|---|---|
Received | RFC 5321, section 4.4 | One line per server that handled the message, each added at the top | Whether the lines below your own provider’s are true |
Authentication-Results | RFC 8601 | SPF, DKIM and DMARC results reached by the receiving system | Whether the sender is honest, only whether the domain checks passed |
DKIM-Signature | RFC 6376, section 3.5 | The signing domain (d=), selector (s=), signed fields (h=) and the signature itself | Whether the signing domain is the one in From |
Return-Path | RFC 5321, section 4.4 | The envelope sender from the SMTP MAIL command, where bounces go | Who wrote the message |
From | RFC 5322, section 3.6.2 | The author mailbox the reader sees | Whether that author really sent it, unless DMARC passed for its domain |
Reply-To | RFC 5322, section 3.6.2 | Where the author suggests replies go | Whether that address belongs to the author |
Message-ID | RFC 5322, section 3.6.4 | A globally unique identifier, with a domain recommended on the right of the @ | Anything reliable on its own |
Your own provider wrote two of these, its Authentication-Results field and its Received line, and it filled in Return-Path at delivery from the address the sending server gave in MAIL FROM. Everything else came from the sender or from servers earlier in the path.
How to open the full headers
Microsoft’s Outlook help gives the reason to look: some senders use spoofing to disguise their email address, and checking the header shows whether the address is different from how it appears. Each provider documents its own path. As of December 2026:
- Gmail (browser): open the message, click More next to Reply, then Show original. A new window shows the full header, with a Copy to clipboard button (Gmail Help, “Trace an email with its full header”).
- Apple Mail: the same Google help page lists View > Message > All Headers; the headers appear in the window below the inbox.
- Classic Outlook for Windows: double-click the message to open it in its own window, then choose File > Properties. The header appears in the Internet headers box (Microsoft Support, “View internet message headers in Outlook”).
- New Outlook, Outlook on the web and Outlook.com: select More actions at the top of the message window, then View > View message details (same Microsoft page).
Copy the whole header into a text editor before reading it. For a formatted view, Gmail’s help page points to Google Admin Toolbox Messageheader, where you paste the header and analyze it, and Microsoft points to its Message Header Analyzer, which “helps parse headers into a more readable format” (Microsoft Learn, anti-spam message headers, last updated 2026-07-27). A header contains your address and your provider’s server names, so paste it only into a tool your organisation trusts.
An annotated sample header
Illustrative example built for this page. All names and addresses are reserved for documentation: example.com, example.net and example.org (RFC 2606), and the blocks 192.0.2.0/24 and 203.0.113.0/24 (RFC 5737). MIME-Version, Content-Type and other fields that don’t matter here are left out, and the DKIM signature (b=) is shortened. The recipient, [email protected], gets mail through mx-in.example.org; the message claims to be payroll mail from example.com and was sent through a service at example.net.
Return-Path: <[email protected]>
Authentication-Results: mx-in.example.org;
dkim=pass header.d=example.net header.s=s1;
spf=pass (sender IP is 203.0.113.40) smtp.mailfrom=mailer.example.net;
dmarc=fail (p=none) header.from=example.com
Received: from relay2.example.net (relay2.example.net [203.0.113.40])
by mx-in.example.org with ESMTPS id 2f9a
for <[email protected]>; Mon, 30 Nov 2026 14:02:40 +0000
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=example.net;
s=s1; t=1796047358; h=from:reply-to:to:subject:date:message-id;
bh=xR3PJRxtHEUd0cZgvX046OVQuz7Y8hVZj79uLbYaQAA=;
b=NTZ+BE0uAr6S7Zrb ... 5tyGREh9/7Fg==
Received: from webhost.example.net (webhost.example.net [203.0.113.77])
by relay2.example.net with ESMTP id 55a1;
Mon, 30 Nov 2026 14:02:37 +0000
Received: from [192.0.2.55] (unknown [192.0.2.55])
by webhost.example.net with ESMTPSA id 91c3;
Mon, 30 Nov 2026 14:02:35 +0000
Date: Mon, 30 Nov 2026 14:02:33 +0000
From: "Example Payroll" <[email protected]>
Reply-To: "Example Payroll" <[email protected]>
To: <[email protected]>
Subject: Action required: confirm your direct deposit details
Message-ID: <[email protected]>
| Line | Reading |
|---|---|
Return-Path | The envelope sender is on mailer.example.net. Mailing lists and sending services often use their own bounce address, so this alone proves nothing. |
Authentication-Results | Written by mx-in.example.org, the recipient’s own server: the identifier matches, and the field sits directly above that server’s Received line. |
spf=pass | mailer.example.net, the Return-Path domain, authorises the connecting IP, 203.0.113.40. That says nothing about example.com: RFC 9989 notes that “any Domain Owner, even a bad actor,” can publish an SPF record and obtain a pass. |
dkim=pass header.d=example.net header.s=s1 | A valid signature by example.net, again not the visible author’s domain. In RFC 9989’s words, “a message can bear a valid signature from any domain, even one used by a bad actor.” |
dmarc=fail (p=none) header.from=example.com | Neither passing domain shares an organizational domain with example.com, so DMARC fails. The comment carries the published policy, none, the way Gmail writes it in the advisory sample below; RFC 9989 also registers a policy.dmarc property for the policy a receiver evaluated. |
Top Received | mx-in.example.org recorded the connection from 203.0.113.40 at 14:02:40. The bracketed IP comes from the TCP connection, not from anything the sender typed, so this is the line to trust. |
DKIM-Signature | Added inside example.net before the hand-off. d=example.net and s=s1 match the dkim=pass result; h= lists the signed fields, with from among them as RFC 6376 requires; t=1796047358 is 14:02:38 UTC. |
Middle Received | relay2.example.net took the message from webhost.example.net at 14:02:37, two seconds after the first hop. |
Bottom Received | The first hop: a client at 192.0.2.55 logged in and submitted the message to webhost.example.net over TLS (ESMTPSA). Nothing in the line names example.com. |
From | Display name and address both present the message as payroll mail from example.com. |
Reply-To | A mailbox at example.net, not example.com. Replies would go to whoever holds that mailbox, not to the company named in From. |
Message-ID | Created on webhost.example.net; the left-hand side encodes the Date time, 14:02:33. Again, not example.com. |
The sample follows the pattern of the first header in the joint FBI, State Department and NSA advisory of May 2, 2024, a real excerpt. There, SPF and DKIM passed for a university’s email host domain and account, “implying the North Korean actor was successful in gaining access to a university’s legitimate email client”; DMARC failed because the From address used a think tank’s domain; and “p=NONE” meant no filtering action was taken, so the message reached the inbox. The actor also edited the Reply-To “to route replies back to another seemingly legitimate, but fraudulent, account controlled by the actor” (FBI, State Department and NSA advisory JCSA-20240502-001).
Reading the Received chain: bottom to top
RFC 5321 requires each SMTP server to insert its Received line at the beginning of the message and forbids changing or deleting lines already there. The newest hop is therefore at the top and the first hop is at the bottom, so you read from the bottom up to follow the message’s journey in time order (RFC 5321, section 4.4).
For each line, check four things:
- The
fromclause. RFC 5321 says it should hold both the name the sending host gave inEHLOand an address literal with the IP address “determined from the TCP connection”. The name is what the client claimed; the bracketed IP is what the receiving server observed. - The
byclause and the time. Each line’sbyhost should reappear as thefromhost in the line above it; a mismatch deserves a closer look. RFC 5321 asks servers to write explicit time-zone offsets such as-0800, so convert every line to one zone and check that the times rise from bottom to top. A long gap points to a slow relay or a queue; times that run backwards can point to a wrong server clock or an altered line. - The protocol keyword. RFC 3848 registers
ESMTPA(SMTP AUTH succeeded),ESMTPS(STARTTLS) andESMTPSA(both). In the sample,ESMTPSAon the bottom line shows a client that logged in towebhost.example.netover TLS. The same RFC’s security considerations warn that these keywords “are not normally protected in transport which means they can be modified by an active attacker”, so they are clues about how the message entered the system, not verdicts. - Who wrote the line. RFC 5322 calls trace fields “strictly informational”, and RFC 5321’s security considerations warn that SMTP lets “even fairly casual users” create messages that trick a recipient “into believing that they came from somewhere else” (section 7.1). Only the lines added by servers you trust, in practice your own provider’s, are known to have been written by them. A provider may add several lines as the message moves between its own servers, as RFC 8601’s examples show; the one that matters is where its server received the message from outside. Treat every line below it as a lead, not proof: RFC 3848 notes that more reliable information comes from comparing
Receivedlines with the servers’ own logs.
The practical use is to identify the server that connected to your provider, then ask whether its IP address and host name fit the organisation in From. Other fields can add clues: both sample headers in the FBI advisory carry an X-PHP-Originating-Script line, which PHP can add to record the user ID and file name of the script that sent the message (PHP manual, mail configuration); the file in both is mail.php. Registrar and host lookups, and what to send them, are covered in reporting phishing to ISPs for takedown.
Authentication-Results: trust only your own receiver’s
RFC 8601 defines the Authentication-Results field: an authentication service identifier (here mx-in.example.org) followed by statements of the form method=result, each with the message properties that were tested. Servers that run the checks add it at the top of the message, so it counts as a trace field too.
The RFC also states the limitation that matters for phishing. The field “often contains no integrity or validation mechanism of its own, so its presence must be trusted implicitly”, which is why a receiving domain must remove any copy that claims to be its own when the message enters (RFC 8601, section 1.6, and section 5). Two checks follow. The identifier should be your provider’s: both sample headers in the FBI advisory carry Google’s, mx.google.com. And RFC 8601 section 7.1 offers a position test: from a compliant provider, the field “should always appear above a Received header added by a trusted MTA”. Copies further down, or under another identifier, were written outside your provider, possibly by the sender, and prove nothing.
The three results to read, with the identity each one tested:
| Method | Identity tested | Property to read | Pass means |
|---|---|---|---|
| SPF (RFC 8601 section 2.7.2) | The MAIL FROM domain, shown as smtp.mailfrom, or the EHLO name, shown as smtp.helo; DMARC uses only the MAIL FROM result | smtp.mailfrom= | The connecting IP is authorised by that domain’s SPF record |
| DKIM (section 2.7.1) | The domain in the d= tag of the signature | header.d= | A signature acceptable to the receiver verified |
| DMARC (RFC 9989, May 2026) | The domain in the From header | header.from= | SPF or DKIM passed and that domain is aligned with the From domain |
RFC 9989 states that a DMARC pass “requires not only an SPF or DKIM pass verdict for the email message but also and more importantly that the domain associated with the SPF or DKIM pass be ‘aligned’ with the Author Domain” (by default, sharing the organizational domain is enough). That is why the sample fails DMARC with two passes. Publishing and tuning the records is covered in DMARC, SPF and DKIM email authentication.
RFC 9989 also sets out what DMARC cannot do. It “can only be used to combat specific forms of exact-domain spoofing directly”, and does not address “visually similar domain names or abuse of the RFC5322.From human-readable display name”. A message from a lookalike domain can therefore pass cleanly, which is why brand-protection checks in brand impersonation detection and defense sit alongside header work.
What the result combinations mean
| What your provider’s line shows | Reading |
|---|---|
dmarc=pass, and the From domain is the organisation you expect | An SPF or DKIM pass was aligned with that domain, so its owner authorised the use of the domain. RFC 9989 says a pass “by itself does not guarantee that delivery to the recipient’s inbox would be safe or desirable”, and a hijacked mailbox at that domain passes too, so judge the request. |
dmarc=pass, and the From domain is a lookalike | Whoever controls the lookalike domain set it up correctly. DMARC does not cover lookalike domains (RFC 9989 section 2.2), so check the spelling of the domain, not the verdict. |
SPF fail or softfail, but DKIM pass with header.d aligned, and dmarc=pass | One aligned pass is enough. Forwarding usually breaks SPF, while “DKIM signatures will generally remain valid in these relay situations” (RFC 9989 section 7.4). |
SPF or DKIM pass for another domain, dmarc=fail (the sample) | The passes belong to the sending service, not to the From domain: the exact-domain spoofing DMARC was built to catch. Genuine mail can fail the same way when an authorised third party sends without alignment or a forwarder relays it (RFC 9989 sections 1, 7.3 and 7.4), so read it with the rest of the header. |
dmarc=fail under p=none, p=quarantine or p=reject | Under p=none, RFC 9989 says the policy “MUST NOT modify existing mail handling processes”, so the receiver’s other filters decide; the sample was delivered. Under p=quarantine or p=reject, receivers that honour the policy keep the message out of the inbox (section 3.2.9). A p=reject failure is still not rejected on that basis alone: receivers “MUST NOT reject incoming messages solely on the basis of a ‘p=reject’ policy”, and without other analysis they treat the message as if the policy were quarantine (section 7.4); section 5.4 also lets them accept it. |
SPF fail, DKIM fail or none, dmarc=fail | No check passed for any domain. A strong sign of a forged From address, unless the message came through a forwarder or a mailing list. |
dmarc=none | No DMARC record exists for the From domain (RFC 9989 section 9.2; Microsoft’s page says the same). The owner has asked for nothing, so weigh the other fields more heavily. |
SPF softfail or neutral | Softfail is “a weak statement by the publishing ADMD that the host is probably not authorized”, and receivers “SHOULD NOT reject the message based solely on this result”; neutral “MUST be treated exactly like the ‘none’ result” (RFC 7208, sections 2.6.5, 8.5 and 8.2). |
No Authentication-Results from your provider | The provider did not record one. Fall back on the other fields and on the provider’s own filtering. |
Microsoft 365 adds its own fields
Microsoft 365 records its scan results in X-Forefront-Antispam-Report and in X-Microsoft-Antispam, which “contains additional information about bulk mail and phishing”. Microsoft Learn documents the fields worth reading (page last updated 2026-07-27):
CAT:is “the category of threat policy applied to the message”, among themPHSH(phishing),HPHSHorHPHISH(high confidence phishing),SPOOF(spoofing),DIMP(domain impersonation),UIMP(user impersonation) andBIMP(brand impersonation). The last three exist only in Defender for Office 365.SFV:SPMmeans spam filtering marked the message as spam andSFV:NSPMas nonspam;SFV:SFEandSFV:SKAmean filtering was skipped because the sender was on the user’s Safe Senders list or a policy’s allowed list.SFTYmarks a message identified as phishing:9.19is domain impersonation,9.20user impersonation and9.25the first contact safety tip, which Microsoft says “might be an indication of a suspicious or phishing message”.DIRshows direction (INBinbound,OUToutbound,INTinternal), andCIPthe connecting IP address.SCLis the spam confidence level. Microsoft says that in cloud organisations it does not determine whether a message is identified as spam or the action taken on it; useCATandDIRto see how the message was filtered.BCL, inX-Microsoft-Antispam, is the bulk complaint level: the higher it is, the more likely a bulk message is to generate complaints.compauthinAuthentication-Resultsis Microsoft’s composite result, which combines SPF, DKIM, DMARC and other parts of the message, using theFromdomain as the basis. Reason000is an explicit failure (DMARC failed underp=quarantineorp=reject),001an implicit one (no records, or weak policies such as DMARCp=none), and1xxcodes are passes. A failure does not always block delivery.dmarc=bestguesspassmeans the domain has no DMARC record, but the message would have passed if it had one.
Admin settings for these filters are covered in email filtering best practices.
Return-Path, From, Reply-To and Message-ID
Return-Path versus From. The envelope sender is the address bounces go to, and RFC 5321 notes that it can differ from the sender’s mailbox, for example when a mailing list directs errors to the list maintainer. A mismatch is common for mail sent through mailing lists and sending services; it matters more on a message that claims to be personal correspondence or a security alert. SPF evaluates this address, not the visible From, which is why SPF alone cannot stop a forged author line.
From, Sender and Reply-To. RFC 5322 defines From as the author, Sender as the agent responsible for transmitting the message, and Reply-To as the address the author suggests for replies; a message with more than one From mailbox must carry a Sender. Both sample headers in the FBI advisory used a changed Reply-To to route the victim’s answers to an account the actor controlled. Many legitimate senders also use a separate Reply-To (a help desk, a shared mailbox), so weigh it together with a failed DMARC result or an unexpected request.
Message-ID. RFC 5322 requires the identifier to be globally unique and recommends a domain on the right of the @, such as the name of the host that created it. That domain belongs to whatever system generated the message, so it need not match From. A malformed identifier, or one on a host unrelated to anything else in the header, is a weak signal. Its stronger use is practical: an identifier “pertains to exactly one version of a particular message”, so it is the handle to quote when you report a message or search a mailbox for copies.
A step-by-step method
- Open the full headers with the path for your mail client above, and copy them to a text editor.
- Find your provider’s
Authentication-Resultsline. Its identifier names your provider, and it sits above theReceivedline your provider added. Ignore copies from other servers. - Read DMARC first. Note the domain in
header.from, then the verdict and the policy. A fail means no SPF or DKIM pass was aligned with that domain. - Match the identities. Compare the
smtp.mailfromandheader.ddomains with theFromdomain. Passes on a different domain are the sample’s pattern. - Compare
Return-Path,FromandReply-To. Ask whether the combination fits the kind of message it claims to be. - Read the
Receivedlines bottom to top. Check that eachbyhost reappears as thefromhost of the line above and that the times rise once converted to one time zone. Note the IP your provider’s server recorded when it received the message from outside. - Judge the request. A message that passes every check can still be phishing: RFC 8601 says a pass “does not render the message trustworthy”. Check any links with URL inspection techniques without opening them.
- Report and remove. Send it where it belongs (reporting phishing to IC3, the FTC and authorities), then delete it.
Limits of header analysis
- Lookalike and newly registered domains pass. A domain the attacker registered and configured correctly passes SPF, DKIM and DMARC, because DMARC directly combats only exact-domain spoofing (RFC 9989 section 2.2).
- Compromised accounts pass. In the FBI advisory’s first sample, SPF and DKIM passed through a university’s email system, and DMARC failed because the
Fromaddress used a think tank’s domain. Mail sent from a hijacked mailbox at the claimed domain itself would pass all three. - A pass means authorised, not safe. RFC 8601 section 7.2 gives the example of spam signed with DKIM “by the originator of the spam, which might be a spammer or a compromised system”.
- Forwarding and mailing lists change results. A forwarder that keeps the original
MAIL FROMmakes SPF “fail unless mitigations such as those described in Appendix D are used” (RFC 7208 section 10.3), and “almost all mailing lists rewrite the ‘MAIL FROM’ identity” (section 2.2). RFC 9989 section 7.4 adds that list software now rewritesFromto keep it DMARC-aligned, so a list message usually shows an address on the list’s domain. - The reader’s provider matters. Receivers format the field differently (Gmail writes the DMARC policy in a comment; Microsoft records the action taken as
action=) and apply their own local policies, so compare results within one provider’s headers.
Treat headers as one layer. The broader sequence for a suspected message, including links, attachments and the sender’s request, is in how to recognize a phishing email, and full case handling is in phishing forensics and investigation.
Security education disclaimer: this page explains how to read email headers for defensive purposes. The sample header is illustrative and uses only reserved example names. Do not use this material to forge headers or to intercept others’ communications.
Sources
- RFC 5321, Simple Mail Transfer Protocol (October 2008), sections 4.4 and 7.1
- RFC 5322, Internet Message Format (October 2008), sections 3.6.2, 3.6.4 and 3.6.7
- RFC 8601, Message Header Field for Indicating Message Authentication Status (May 2019)
- RFC 9989, DMARC (May 2026)
- RFC 7208, Sender Policy Framework (April 2014)
- RFC 6376, DomainKeys Identified Mail (DKIM) Signatures (September 2011)
- RFC 3848, ESMTP and LMTP Transmission Types Registration (July 2004)
- RFC 2606, Reserved Top Level DNS Names (June 1999) and RFC 5737, IPv4 Address Blocks Reserved for Documentation (January 2010)
- Gmail Help, “Trace an email with its full header”
- Microsoft Support, “View internet message headers in Outlook”
- Microsoft Learn, “Anti-spam message headers in cloud organizations” (last updated 2026-07-27)
- FBI, State Department and NSA, “North Korean Actors Exploit Weak DMARC Security Policies to Mask Spearphishing Efforts” (May 2, 2024)
- PHP manual, mail configuration options (
mail.add_x_header)