Email Security

How do I read and interpret Received headers?

Received headers record mail-server hops. Learn where to place the trust boundary and how to investigate a message's claimed path.

By Inventive HQ Team

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:

Anatomy of a Received header The Received header split into its from, IP, by, with, id, for, and timestamp fields. Interpret each field in light of who added the header. Anatomy of a Received header Seven fields, three different levels of trust RAW HEADER, FIELD BY FIELD 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 FROM โ€” hostname the server claims May be client-supplied or DNS-derived verify
<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 &#8212; 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 &#8212; 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 &#8212; 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 &#8212; 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 &#8212; 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 &#8212; 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>
Interactive toolEmail Header AnalyzerRuns in your browser โ€” nothing is uploaded.

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.

The multi-hop email journey, read bottom to top An illustrative message route through relays to your mail server shows the usual bottom-to-top order of Received headers. Earlier entries still need verification. The multi-hop journey: read the stack bottom to top Each hop prepends a new Received header above the last one Your mail server adds this header LAST
<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>
Topmost = newest Closest to infrastructure you control โ€” verify who added it.
<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 &#8212;</text>
<text x="450" y="542" font-size="11" fill="#475569">verify before trusting.</text>
READ BOTTOM โ†’ TOP

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)
Advertisement

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:

FieldWho wrote it downTrust level
from hostnameThe receiving server may record a client claim or a DNS-derived nameVerify its source and the hop that recorded it
IP address in (...)Often the peer IP recorded by the receiving serverUseful for a trusted hop; may be a relay, and syntax varies
by (receiving server)The server writing this line, about itselfUseful if you can establish that this server added the line
with (protocol: SMTP/ESMTP/ESMTPS)The receiving serverInformational only
id (transaction ID)The receiving server's internal systemInformational only
for (recipient)The receiving server, based on envelope dataVerify โ€” can look odd on lists or BCC
TimestampThe receiving server's own clockCompare 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

SymptomLikely causeWhat to do
Only one Received header on a message that claims to be externalDirect submission, a short route, or altered headersIdentify the trusted receiving hop and check authentication results
from hostname names a brand, but the IP appears unrelatedA client claim, relay, or unexpected routeCheck who wrote the line, then compare with trusted authentication results
Hostname shows unknownThe receiving server may not have resolved or verified a nameCheck the trusted hop and investigate the IP if relevant
A private or loopback IP appears in the chainIt may describe an internal handoff or a sender-supplied headerCheck which trusted server wrote that line before drawing conclusions
Timestamps decrease as you read up the stackDifferent time zones, clock skew, delay, or an unreliable entryNormalize offsets and inspect which servers added the lines
The from server has no obvious relationship to the visible From domainA third-party service, forwarder, or possible impersonationReview 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

  1. Find a Received header added by your trusted receiving infrastructure and extract its peer IP, if present.
  2. Look up IP ownership with whois.
  3. Check whether the IP belongs to a relay or service that could explain the route.
  4. Compare with any current mail-server information the company publishes.
  5. 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.

Frequently Asked Questions

Do you read Received headers top to bottom or bottom to top?

Bottom to top is the usual reading order: receiving servers normally prepend a new line, so lower entries claim earlier hops. First identify a header added by infrastructure you trust. Entries below that boundary may have been supplied by the sender, and gateways can alter the stack, so its order alone does not establish the message's actual route.

Can Received headers be faked?

Partially, yes. Anyone composing a raw email can type fake "Received:" lines directly into the message before sending it, so headers further down the stack โ€” closer to the claimed origin โ€” can be entirely fabricated. A header added by your trusted receiving infrastructure records the connection it observed, including the connecting IP when logged. Confirm which server added that header before using it as an anchor; a top-most line is not automatically trusted.

How do I investigate where an email came from?

Identify a Received header added by your trusted receiving infrastructure and work downward only as far as independently verified hops allow. Its connecting IP identifies the immediate peer, which may be a relay or forwarding service rather than the person who sent the message. Treat lower, unverified lines as claims. Use IP ownership and reverse DNS as context, then examine SPF, DKIM, and DMARC results reported by a trusted authentication service; none of these checks alone identifies the human sender.

Which part of a Received header is most reliable?

A trusted receiving server's record of the connection it accepted is the strongest anchor. Its logged peer IP, when present, is an observation of that hop, while a hostname may be supplied or derived in different ways. The IP can belong to a relay and does not identify the original sender. Lines from untrusted servers can be fabricated.

Why do the from hostname and the IP address sometimes not match?

A hostname and connecting IP may differ for legitimate relays, gateways, and hosted email providers. Investigate a mismatch against the sending service and authentication results; it is a clue, not proof of spoofing.

What does unknown mean in a Received header?

"Unknown" can mean the receiving server could not resolve or verify a hostname for that connection. Check the trusted hop and the IP directly if it matters; this label alone does not establish whether a message is malicious.

How many Received headers should a normal email have?

There's no fixed number; it depends on relays, filtering, forwarding, and how the message was submitted or processed. Check which entries your receiving infrastructure added before interpreting the count. A short chain alone does not prove that headers were removed.

Is the topmost Received header always trustworthy?

Only after you establish that it was added by a server you control or explicitly trust, such as your mail gateway. Position alone does not authenticate a header, especially in a copied or forwarded set of headers.

Do Received headers replace SPF, DKIM, and DMARC checks?

No. Received headers can help reconstruct a plausible route as far as trusted entries and independent evidence allow. Private IPs and hostname/IP differences can be normal. SPF checks an authorized sending IP for an envelope domain, DKIM checks a signature, and DMARC checks alignment and policy. Review results added by a trusted service alongside the header chain; a pass does not identify the person who sent the message.

email headersreceived headersemail tracingemail forensicsheader analysis