Receiving mail servers normally prepend Received headers, so read the stack bottom to top as a claimed sequence of hops. First identify the header added by your own trusted receiving infrastructure. It records the connection that server observed; earlier entries below the trust boundary may be sender-supplied or altered by intermediaries. A header chain can help investigate a route, but it cannot by itself reveal the person who sent a message. This guide explains each field, how to evaluate it, and which patterns warrant a closer look.
How a Received header is built
When a mail server receives a message, it normally prepends a Received header to the headers it was given. Some gateways and intermediaries rewrite or remove headers, and a sender can insert fake lower entries. Use headers from infrastructure you trust as the starting point for investigating the route.
Basic Received header
Received: from mail.example.com ([192.0.2.1]) by mx.company.com with SMTP id abc123def for <john@company.com>; Wed, 15 Jan 2025 14:32:10 -0500
Here's that same header broken into its seven labeled parts. The value of each field depends on whether you trust the server that added the line:
<rect x="392" y="150" width="304" height="34" rx="8" fill="#ffffff" stroke="#f59e0b" stroke-width="1.5"/>
<text x="408" y="163" font-size="12" font-weight="bold" fill="#b45309">IP ADDRESS — what the server saw</text>
<text x="408" y="177" font-size="10" fill="#64748b">Peer IP, if this is a trusted hop</text>
<circle cx="680" cy="167" r="4" fill="#16a34a"/>
<text x="672" y="170" text-anchor="end" font-size="9" fill="#15803d">check</text>
<rect x="392" y="200" width="304" height="34" rx="8" fill="#ffffff" stroke="#0d9488" stroke-width="1.5"/>
<text x="408" y="213" font-size="12" font-weight="bold" fill="#0d9488">BY — this hop's own hostname</text>
<text x="408" y="227" font-size="10" fill="#64748b">Verify this server added the line</text>
<circle cx="680" cy="217" r="4" fill="#16a34a"/>
<text x="672" y="220" text-anchor="end" font-size="9" fill="#15803d">check</text>
<rect x="392" y="250" width="304" height="34" rx="8" fill="#ffffff" stroke="#7c3aed" stroke-width="1.5"/>
<text x="408" y="263" font-size="12" font-weight="bold" fill="#7c3aed">WITH — protocol used</text>
<text x="408" y="277" font-size="10" fill="#64748b">SMTP / ESMTP / ESMTPS</text>
<circle cx="680" cy="267" r="4" fill="#64748b"/>
<text x="672" y="270" text-anchor="end" font-size="9" fill="#475569">info</text>
<rect x="392" y="300" width="304" height="34" rx="8" fill="#ffffff" stroke="#c026d3" stroke-width="1.5"/>
<text x="408" y="313" font-size="12" font-weight="bold" fill="#c026d3">ID — transaction ID</text>
<text x="408" y="327" font-size="10" fill="#64748b">Server's internal tracking number</text>
<circle cx="680" cy="317" r="4" fill="#64748b"/>
<text x="672" y="320" text-anchor="end" font-size="9" fill="#475569">info</text>
<rect x="392" y="350" width="304" height="34" rx="8" fill="#ffffff" stroke="#e11d48" stroke-width="1.5"/>
<text x="408" y="363" font-size="12" font-weight="bold" fill="#e11d48">FOR — recipient at this hop</text>
<text x="408" y="377" font-size="10" fill="#64748b">Can mislead with lists / BCC</text>
<circle cx="680" cy="367" r="4" fill="#f59e0b"/>
<text x="672" y="370" text-anchor="end" font-size="9" fill="#b45309">verify</text>
<rect x="392" y="400" width="304" height="34" rx="8" fill="#ffffff" stroke="#475569" stroke-width="1.5"/>
<text x="408" y="413" font-size="12" font-weight="bold" fill="#475569">TIMESTAMP — when it was logged</text>
<text x="408" y="427" font-size="10" fill="#64748b">Check timezone and clock differences</text>
<circle cx="680" cy="417" r="4" fill="#16a34a"/>
<text x="672" y="420" text-anchor="end" font-size="9" fill="#15803d">check</text>
Email Header Analyzer
Analyze email headers for SPF/DKIM/DMARC validation, routing, and security threats
Open the full Email Header Analyzer tool →The rule of thumb: a header added by a receiving server you trust is useful evidence about that server's immediate peer and processing time. Hostnames can be supplied or derived in different ways, and the for field reflects envelope routing at that hop. Verify claims from earlier, untrusted headers independently.
Reading the email's path: why bottom-to-top matters
Mail servers normally prepend a Received header, but gateways or intermediaries may rewrite or remove headers. Treat the chain as evidence to verify, not an immutable log. The bottom entry generally claims the earliest recorded hop, and the top entry generally records the latest. Read bottom to top to follow the claimed order, then establish which entries were added by trusted infrastructure.
<rect x="210" y="220" width="220" height="64" rx="10" fill="#0d9488"/>
<text x="320" y="246" font-size="13" font-weight="bold" fill="#ffffff">Relay 2</text>
<text x="320" y="264" font-size="10" fill="#ccfbf1">e.g. destination spam filter</text>
<rect x="210" y="350" width="220" height="64" rx="10" fill="#7c3aed"/>
<text x="320" y="376" font-size="13" font-weight="bold" fill="#ffffff">Relay 1</text>
<text x="320" y="394" font-size="10" fill="#ede9fe">e.g. sender's outbound relay</text>
<rect x="210" y="480" width="220" height="64" rx="10" fill="#b45309"/>
<text x="320" y="506" font-size="13" font-weight="bold" fill="#ffffff">Original sender's server</text>
<text x="320" y="524" font-size="10" fill="#fde68a">adds this header FIRST</text>
<text x="450" y="498" font-size="12" font-weight="bold" fill="#b45309">Bottom = oldest</text>
<text x="450" y="514" font-size="11" fill="#475569">Self-reported by the</text>
<text x="450" y="528" font-size="11" fill="#475569">sender's own system —</text>
<text x="450" y="542" font-size="11" fill="#475569">verify before trusting.</text>
Worked example
Email from: john.doe@example.com
To: alice@company.com
Headers as they appear (TOP TO BOTTOM in the raw source):
3. (TOP — newest, added last)
Received: from mail.company.com by mx.company.com
with SMTP id abc123; Wed, 15 Jan 14:32:20 -0500
Analysis: Company's own mail server received it — final hop.
2. (MIDDLE)
Received: from mail.gmail.com by mail.company.com
with ESMTPS id def456; Wed, 15 Jan 14:32:15 -0500
Analysis: Gmail relayed it to the company's server.
1. (BOTTOM — oldest, added first)
Received: from smtp.example.com ([192.0.2.1])
by mail.gmail.com with ESMTP id ghi789
for <alice@company.com>; Wed, 15 Jan 14:32:05 -0500
Analysis: John's own server made first contact — origin of the message.
Path traced bottom to top: example.com (sent) → gmail.com (relayed) → company.com (received)
Which fields can you trust?
Not every field in a Received header carries the same evidentiary weight. Use this as a quick reference before you draw conclusions from a header chain:
| Field | Who wrote it down | Trust level |
|---|---|---|
from hostname | The receiving server may record a client claim or a DNS-derived name | Verify its source and the hop that recorded it |
IP address in (...) | Often the peer IP recorded by the receiving server | Useful for a trusted hop; may be a relay, and syntax varies |
by (receiving server) | The server writing this line, about itself | Useful if you can establish that this server added the line |
with (protocol: SMTP/ESMTP/ESMTPS) | The receiving server | Informational only |
id (transaction ID) | The receiving server's internal system | Informational only |
for (recipient) | The receiving server, based on envelope data | Verify — can look odd on lists or BCC |
| Timestamp | The receiving server's own clock | Compare trusted hops after converting offsets; clocks can differ |
Interpreting each component in detail
From (sending server)
Received: from smtp.gmail.com
What it shows: a name or address for the connecting peer; depending on the server, it may come from the client's greeting, DNS, or both.
Verify: establish which server wrote the line and compare the name with DNS and other evidence. A hostname matching the visible From domain is neither required nor proof of authenticity.
IP address in brackets
Received: from smtp.gmail.com ([142.250.185.46])
What it may show: the IP of the immediate peer seen by the receiving server. In a trusted header this can be more useful than a self-reported name, but the peer may be a relay or gateway.
Verify: check IP ownership or reputation for context and compare with authentication results from a trusted service. Geolocation and ownership cannot identify the person who sent the message.
By (receiving server)
Received: by mx.company.com
What it shows: the hostname of the server that received the message at this hop.
Verify: establish that the server really added this line and whether it fits the known receiving route.
With (protocol and ID)
Received: with SMTP id 47h8ai23skd
What it shows: the protocol label the receiving server recorded for this hop. ESMTP indicates SMTP extensions; ESMTPS commonly indicates a TLS-protected ESMTP hop. A plain SMTP or ESMTP label alone does not prove the connection lacked encryption, and TLS on one hop does not authenticate the sender. The id value, if present, is a server tracking identifier.
For (recipient at this hop)
Received: for <john@company.com>
What it shows: an envelope recipient recorded for that hop, if the server includes one. It can differ across forwarding or list delivery, and it may not appear at all.
Timestamp
Wed, 15 Jan 2025 14:32:10 -0500
What it shows: when this server received the message, plus its timezone offset (-0500 = EST).
Verify: convert offsets to the same time zone before comparing trusted entries. Delays and clock differences can create apparent gaps or small reversals; investigate discrepancies without assuming manipulation.
Symptom, cause, and fix: common Received-header red flags
| Symptom | Likely cause | What to do |
|---|---|---|
| Only one Received header on a message that claims to be external | Direct submission, a short route, or altered headers | Identify the trusted receiving hop and check authentication results |
from hostname names a brand, but the IP appears unrelated | A client claim, relay, or unexpected route | Check who wrote the line, then compare with trusted authentication results |
Hostname shows unknown | The receiving server may not have resolved or verified a name | Check the trusted hop and investigate the IP if relevant |
| A private or loopback IP appears in the chain | It may describe an internal handoff or a sender-supplied header | Check which trusted server wrote that line before drawing conclusions |
| Timestamps decrease as you read up the stack | Different time zones, clock skew, delay, or an unreliable entry | Normalize offsets and inspect which servers added the lines |
The from server has no obvious relationship to the visible From domain | A third-party service, forwarder, or possible impersonation | Review trusted SPF/DKIM/DMARC results and verify unexpected requests separately |
Detail: the six patterns worth knowing by name
Missing Received headers. A message with only one Received header may have taken a short route, been submitted directly, or passed through a system that removed entries. Check the trusted receiving hop before inferring a cause.
Hostname/IP mismatch. Received: from gmail.com ([192.0.2.99]) is an illustrative mismatch using a documentation IP. Check the trusted receiving hop, the actual IP owner, and SPF/DKIM/DMARC before deciding whether the sender was spoofed.
Unresolved hostname. Received: from unknown ([192.0.2.50]) illustrates a server that did not record a usable hostname. It does not by itself prove that no PTR record exists or that the message is malicious.
Private IP addresses. Received: from localhost ([127.0.0.1]) or a 192.168.* / 10.* address can reflect an internal relay. Verify who added the header; sender-supplied lines can also be forged.
Time sequence issues. If a later hop appears earlier in time, first normalize time zones and check for clock skew. An unexplained discrepancy in trusted entries deserves investigation; untrusted entries may contain arbitrary timestamps.
Server chain doesn't match the sender. If the visible From claims john@example.com but a Received line names attacker.net, find out whether a trusted server recorded that hop. The name alone does not establish the message's origin; check trusted authentication results and other evidence.
Reading multiple Received headers together
Email from: john.doe@example.com
To: alice@company.com
Subject: Important update
Headers (read BOTTOM TO TOP):
3. (TOP)
Received: from mail.company.com by mx.company.com
with SMTP id abc123; Wed, 15 Jan 14:32:20 -0500
Analysis: Company's mail server received it
2. (MIDDLE)
Received: from mail.gmail.com by mail.company.com
with ESMTPS id def456; Wed, 15 Jan 14:32:15 -0500
Analysis: Gmail relayed it to company server
1. (BOTTOM - ORIGINAL)
Received: from smtp.example.com ([192.0.2.1])
by mail.gmail.com with ESMTP id ghi789
for <alice@company.com>; Wed, 15 Jan 14:32:05 -0500
Analysis: John's company's server sent it
Path traced: example.com (john sends) → gmail.com (relayed) → company.com (alice receives)
Checking server legitimacy
Verifying Gmail emails
Google's sending infrastructure can use different IP ranges and hostnames. Check Google's current published guidance when evaluating a specific route; a Google-owned IP alone does not authenticate the visible sender.
Check the IP recorded by your trusted receiving server, then review its trusted SPF, DKIM, and DMARC results. A gmail.com hostname, Google-owned IP, or matching reverse DNS is context, not a sender-authentication verdict. 192.0.2.1 is a documentation address in this example.
Verifying Office 365 emails
Microsoft-hosted mail can pass through different services and hostnames. Check Microsoft's current published guidance for expected endpoints, then use the trusted receiving hop and authentication results to assess the message. A Microsoft hostname or IP alone does not authenticate the visible sender.
Unknown companies
- Find a Received header added by your trusted receiving infrastructure and extract its peer IP, if present.
- Look up IP ownership with
whois. - Check whether the IP belongs to a relay or service that could explain the route.
- Compare with any current mail-server information the company publishes.
- Review trusted authentication results and use reputation data only as context.
Tools for header analysis
Online tools
Inventive HQ Email Header Analyzer — paste raw headers and get visual parsing, a path diagram, and automatic red-flag detection:
Google Admin Toolbox — free header analysis that shows the path clearly and surfaces SPF/DKIM/DMARC results.
MXToolbox — header analyzer with built-in IP reputation checks and reverse DNS lookups.
Command line
# Extract all Received headers
awk 'BEGIN { IGNORECASE=1 } /^Received:/ { if (line != "") print line; line=$0; next } /^[ \t]/ && line != "" { line=line " " $0; next } { if (line != "") print line; line="" } END { if (line != "") print line }' email.eml | tac # unfold continuation lines, then reverse
# Check specific IP
whois 192.0.2.1
# Reverse DNS lookup
nslookup -x 192.0.2.1
# IP geolocation
curl -s "http://ip-api.com/json/192.0.2.1"
Step-by-step header reading process
Step 1: Get the headers. View full headers in your email client and copy the raw text.
Step 2: Find the trust boundary. Identify a Received header added by your receiving infrastructure. Read the stack bottom to top for its claimed sequence, but treat lower unverified entries as claims.
Step 3: Investigate the peer IP. For a trusted hop, look up the immediate peer's owner and consider whether a relay or forwarder explains it. Ownership alone does not authenticate the sender.
Step 4: Check authentication. Look for an Authentication-Results header added by a trusted service and examine the SPF, DKIM, and DMARC results and their domains.
Step 5: Assess the path. Compare trusted hops with the claimed sequence. Investigate gaps or inconsistencies while allowing for relays, forwarding, and altered headers.
Step 6: Make a decision. Weigh the trusted hop, authentication results, and message context together. If an unexpected request matters, verify it with the sender through a separate channel even when technical checks pass.
Common legitimate variations
Forwarded emails
A forward usually adds a Received header from the forwarding service. Multiple headers can therefore be normal; the forwarded copy may also have altered or omitted earlier entries.
Mailing lists
A mailing list often receives a message and sends a new copy to subscribers. Its own Received entries can appear alongside earlier ones, subject to the list's handling of the original headers.
BCC recipients
BCC affects envelope recipients, and mail systems may generate recipient-specific copies or omit for fields. Do not assume every recipient sees an identical Received chain.
Illustrative scenarios
Scenario 1: legitimate corporate email
From: ceo@company.com
Claims: Urgent wire transfer needed
Received: from mail.company.com ([203.0.113.10])
Step 1: Is 203.0.113.10 the company's IP? ✓ Assume yes for this example
Step 2: Reverse DNS: assume it matches mail.company.com ✓
Step 3: Authentication: spf=pass, dkim=pass, dmarc=pass ✓
Step 4: Pattern matches a legitimate internal send ✓
Verdict: LIKELY LEGITIMATE — but always verify urgent financial requests through a second channel.
These checks are assumptions in the illustration, not verification of a real IP or sender. Authentication passes and a plausible route still do not establish who requested the transfer.
Scenario 2: phishing attempt
From: support@amazon.com
Claims: Verify your account
Received: from attacker.com ([192.0.2.99])
Step 1: Is 192.0.2.99 Amazon's server? ✗ Documentation IP for this example
Step 2: Reverse DNS: assume an unrelated host ✗
Step 3: Authentication: spf=fail, dkim=fail, dmarc=fail ✗
Step 4: Pattern matches phishing ✗
Verdict: PHISHING — do not click any links.
The failed authentication results and unrelated route would justify treating this example as suspicious. The documentation IP and assumed reverse DNS result are illustrative; they do not prove anything about a real message.
Conclusion
The visible From address and the Received chain each provide limited evidence. Read the chain bottom to top as a claimed sequence, anchor your investigation at a header added by trusted infrastructure, and check trusted SPF, DKIM, and DMARC results. When the message asks for a consequential action, confirm the request through a separate channel.