Investigating a Suspicious Email: Header Analysis and the Received Chain

How do you tell where a suspicious email really came from? The Received chain, SPF/DKIM/DMARC results, traces of spoofing and cleaning up similar messages in Microsoft 365.
Technical summary
Technology
SMTP, RFC 5321, RFC 5322, RFC 8601, SPF, DKIM, DMARC, ARC, Exchange Online, Microsoft Defender for Office 365
Topic
Technical investigation of a single suspicious message reported by a user
Level
Intermediate
Prerequisites
  • Access to the message’s full headers
  • Familiarity with SPF, DKIM and DMARC concepts
  • Exchange Online or Purview investigation rights
In this article8 sections

When a user reports “this email is odd”, two questions need quick answers: did the message really come from where it claims, and who else did the same message reach? The answer isn’t in the visible part of the message but in its headers. The display name can lie. The Received chain and the authentication result written by your own server lie much less. This guide walks security and system teams in order through how to read headers, how to interpret the Received chain, what SPF/DKIM/DMARC results prove and don’t prove, and how to find and clean up similar messages in Microsoft 365.

When header analysis is needed

Not every suspicious message needs a deep investigation. Spending hours on bulk spam the email security filter already catches is wasted effort. Header analysis is essential in these cases:

  • The message appears to come from an executive, a supplier or a bank and asks for a payment, an IBAN change or credentials.
  • The message appears to come from your own domain.
  • The user clicked the link or opened the attachment.
  • The same content has been reported by more than one user.

The first condition is access to the raw headers. In Outlook, the “Internet headers” field under message properties is used, and in Outlook on the web, “View message details”. A mistake we often see is asking the user to forward the message normally; a plain forward loses the headers and blinds the investigation before it even starts. Forwarding as an attachment or the built-in Report button should be used.

Important header fields

An email has two separate “senders”: the envelope sender in the SMTP session (RFC 5321, MAIL FROM) and the sender in the message header the user sees (RFC 5322, From). Most spoofing feeds on the gap between these two. Get this distinction settled first.

Field What it tells you Watch out for
From The sender the user sees The display name can be written freely
Return-Path The envelope sender; SPF verifies this Can differ from From
Reply-To The address replies go to The classic trace of BEC
Message-ID The sending system’s message ID The domain gives a clue
Received The servers the message passed through Read from bottom to top
Authentication-Results SPF, DKIM, DMARC results Trust only your own server’s
DKIM-Signature The signing domain (d=) and selector (s=) The presence of a signature isn’t validity

Exchange Online also adds the X-Forefront-Antispam-Report and X-Microsoft-Antispam headers. These contain the connecting IP (CIP), country (CTRY), filter verdict (SFV; for example SPM spam, NSPM not spam, SKA skipped because of an allow list), category (CAT; for example PHSH, SPOOF, UIMP) and bulk complaint level (BCL). If you see SFV:SKA or SFV:SKN, the message skipped filtering because of an allow list or a transport rule. At that point the investigation moves away from the message and to that rule. The problem isn’t the filter; it’s the exception.

Reading the Received chain

Each SMTP server adds a Received line to the top of the header when it receives the message. That’s why the chain is read from bottom to top: the bottom line shows the first server, the top one your own mailbox server. The example below is a fictional message shortened for review.

Received: from DB9PR02MB0000.eurprd02.prod.outlook.com ... (internal transfer)
Received: from mailer.example.net (203.0.113.45) by
 AM2PEPF0000ABCD.mail.protection.outlook.com (10.0.0.10) with ESMTPS;
 Wed, 4 Nov 2026 09:12:41 +0000
Received: from [192.168.1.20] (unknown [198.51.100.77])
 by mailer.example.net with ESMTPSA; Wed, 4 Nov 2026 09:12:40 +0000
Authentication-Results: spf=pass (sender IP is 203.0.113.45)
 smtp.mailfrom=mailer.example.net; dkim=none (message not signed)
 header.d=none; dmarc=fail action=quarantine
 header.from=supplier.com.tr; compauth=fail reason=000
From: "Accounts - Supplier Inc." <[email protected]>
Reply-To: <[email protected]>
Return-Path: [email protected]
Message-ID: <[email protected]>

The reading order is as follows. First find your own boundary: in Exchange Online, this is the line where a server ending in mail.protection.outlook.com appears as “by”. The “from” part of this line gives the connecting IP (203.0.113.45). This is the first trustworthy data point. The lines below it are the sending side’s claims; they may be true, but adding fake lines is also possible. In the example, the bottom line says the message was sent from 198.51.100.77 through an authenticated SMTP session (ESMTPSA). This may be the trace of a compromised account or a rented sending service.

Large gaps between timestamps can indicate waiting in a queue, or that the message was prepared in advance and sent later; convert the time zones to UTC and compare. Do a reverse DNS and ownership check for the connecting IP:

dig -x 203.0.113.45 +short
whois 203.0.113.45 | grep -iE 'orgname|netname|country'
# If there's a DKIM signature, the selector's published key
dig TXT s1._domainkey.example.net +short

A “corporate invoice” message from a residential IP block with no reverse DNS record isn’t proof on its own. But it greatly increases suspicion.

Interpreting Authentication-Results

The format of the Authentication-Results field is defined in RFC 8601. Trust only the line added by your own receiving server; the sending side can also add a header with the same name. The results in the example say this:

  • spf=pass: The mailer.example.net domain is authorized to send from this IP. However, this says nothing about supplier.com.tr, which the user sees.
  • dkim=none: The message isn’t signed.
  • dmarc=fail: There’s no valid SPF or DKIM result aligned with the From domain. action=quarantine is the action applied according to the policy published by the sending domain.
  • compauth=fail reason=000: Microsoft’s composite authentication failed; code 000 indicates an explicit DMARC failure.

SPF pass doesn’t mean From is genuine. If the supplier’s domain had a DMARC policy of p=none, the decision would fall to Microsoft’s implicit authentication and the same message would be more likely to reach the inbox. That’s why knowing your suppliers’ DMARC status is part of risk assessment. For details on alignment logic, see the DMARC p=reject migration guide, and for SPF’s permerror and temperror results, the SPF DNS lookup limit article.

Traces of spoofing and redirection

Even if authentication results come out clean, the message may be fake. An attacker can send from their own registered domain and pass every check. Look for these traces:

Trace Example Interpretation
Display name – address mismatch “General Manager” <[email protected]> Display name spoofing
Look-alike domain supplier-tr.com, suppl1er.com.tr Is the registration date recent?
Reply-To on a different domain Replies go to a free mail service A BEC indicator
Message-ID domain An unexpected service A supporting clue, not proof
An external message that looks like an internal sender X-MS-Exchange-Organization-AuthAs: Anonymous External in origin, internal in appearance

The hardest case is a message from the supplier’s real mailbox with fake content. All checks pass, and the Received chain shows the supplier’s real infrastructure. The headers say “the message came from the supplier”. They don’t say “the supplier sent this”. At this point, the technical investigation ends and verification by phone begins; the process side of the scenario is in the BEC and fake invoice fraud article.

Finding and cleaning up similar messages

If the message turns out to be malicious, from an enterprise cybersecurity standpoint the work has only just begun: you need to find the other recipients of the same campaign. The connecting IP, envelope sender, From address, subject and the URL domain in the message are used as search criteria. A single criterion isn’t enough; combine at least two.

  1. Message trace: In Exchange Online, message trace lists messages from the same sender. In PowerShell, the current cmdlet is Get-MessageTraceV2.
  2. Threat Explorer (Plan 2): Filter by sender, IP, URL or subject, select the messages, and start a soft delete, hard delete or move-to-junk action.
  3. Purview content search: Without Plan 2, create a search, verify the number of results, then run a purge action. The number of items this method can delete per mailbox is limited; for a large campaign, the action is repeated.
  4. Blocking: The sender and URLs are added to the Tenant Allow/Block List; a new wave of the same campaign isn’t delivered.
Connect-ExchangeOnline
Get-MessageTraceV2 -SenderAddress [email protected] `
  -StartDate (Get-Date).AddDays(-3) -EndDate (Get-Date) |
  Select-Object Received, RecipientAddress, Subject, Status, FromIP

Connect-IPPSSession
New-ComplianceSearch -Name "Incident-2026-11-04" -ExchangeLocation All `
  -ContentMatchQuery '(From:[email protected]) AND (Received:2026-11-03..2026-11-05)'
Start-ComplianceSearch -Identity "Incident-2026-11-04"
# After verifying the number of results
New-ComplianceSearchAction -SearchName "Incident-2026-11-04" -Purge -PurgeType SoftDelete

New-TenantAllowBlockListItems -ListType Sender -Block -Entries "[email protected]"

Before running the purge action, look at the number of items in the search result and at sample messages. If the query is written too broadly, legitimate correspondence is deleted too. Recovering from that is laborious.

If the problem is more about mail flow than security, for example if the question is why the message was delayed or rejected, the Exchange Online mail flow troubleshooting guide explains message trace and NDR analysis in detail.

Investigation checklist

  • The raw headers and the original message (.eml or .msg) were preserved as evidence.
  • Your own boundary server’s Received line and the connecting IP were identified.
  • Your own server’s Authentication-Results line was read; the DMARC and compauth results were noted.
  • The From, Return-Path, Reply-To and Message-ID domains were compared.
  • URLs and attachments in the content were checked in an isolated environment or a threat intelligence service.
  • Other recipients were found; users who clicked or replied were identified.
  • The messages were cleaned up, and the sender and URL were blocked.
  • If credentials were entered, a password reset, session revocation and a mailbox rule check were done.

If the last item is skipped, the incident isn’t closed. A forwarding rule the attacker set up in the mailbox keeps working after the password change. Write the regular handling of reported messages with these steps into the incident response process; for role assignment and exercises, see the cyber incident response readiness page. The settings needed for filter policies to catch such messages in the first place are in the Defender for Office 365 configuration guide. For the official definition of the header field, see RFC 8601.

Frequently asked questions

Is it enough to examine headers from a screenshot?

No. A screenshot shows only the display name and subject; the Received chain, Authentication-Results and Reply-To are only visible in the raw headers. Ask the user to forward the message as an attachment or report it with the Report button; a plain forward loses some headers.

Can a message showing SPF pass be considered trustworthy?

Not on its own. SPF verifies the envelope sender (Return-Path) domain, not the From domain the user sees. An attacker can get SPF pass with their own domain and write another name in the From field. What’s decisive is the DMARC evaluation showing an SPF or DKIM result aligned with the From domain.

Can all lines in the Received chain be trusted?

No. Each server adds its own line at the top, and the sending side can put fake lines at the bottom of the chain. The trustworthy starting point is the line added by your own boundary server (for example Exchange Online Protection), which records the connecting IP; the lines below it are informational only.

How can I delete similar messages from user mailboxes?

If you have Defender for Office 365 Plan 2, select the messages in Threat Explorer and start a soft or hard delete action. Without Plan 2, create a Purview content search and run a purge action on the result. With both methods, first verify that the search finds only the target messages.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Cybersecurity

Firewall, VPN, endpoint security and threat prevention. We reduce the attack surface and measure and report the risks.

Knowledge Center

Other articles