Skip to content
OSINTblogs

How to read email headers: trace the sender and spot spoofing

Email headers record the route a message took and whether it passed authentication. How to view them, read the Received chain from the bottom up, interpret SPF, DKIM and DMARC results, tell which lines can be forged, and know when a sender's IP address is and is not there.

· 7 min read

Every email carries a block of technical lines that your mail program hides. These headers record which servers handled the message, when, and whether the sender's domain vouched for it. They are the first thing to examine when an email might be fraudulent, and the most misread.

The key to reading them is knowing who wrote each line. Some were added by your own mail provider, which you can trust. Others were written by the sender, who may be lying.

How to see the headers

Mail program

Where

Gmail

Open the message, three-dot menu, Show original

Outlook on the web

Three-dot menu, View, View message source

Outlook desktop

File, Properties, Internet headers

Apple Mail

View, Message, All Headers

Thunderbird

View, Message Source

Save the full original message as a file, usually .eml, before doing anything else. Forwarding an email destroys the original headers. If someone needs to send you a suspicious message, ask them to forward it as an attachment.

A worked header

A shortened example, with line numbers added for reference:

1  Delivered-To: finance@example.org
2  Received: from mail.sender-host.net (mail.sender-host.net [203.0.113.25])
3          by mx.example.org with ESMTPS id abc123
4          for <finance@example.org>; Tue, 10 Nov 2026 09:14:07 +0000
5  Authentication-Results: mx.example.org;
6          spf=pass smtp.mailfrom=bounce.sender-host.net;
7          dkim=pass header.d=sender-host.net;
8          dmarc=fail header.from=trusted-supplier.com
9  Received: from [198.51.100.77] (unknown [198.51.100.77])
10         by mail.sender-host.net with ESMTPSA id xyz789;
11         Tue, 10 Nov 2026 10:14:02 +0100
12 Return-Path: <bounce@bounce.sender-host.net>
13 From: "Accounts, Trusted Supplier" <accounts@trusted-supplier.com>
14 Reply-To: accounts@trusted-suppl1er.com
15 Subject: Updated bank details
16 Date: Tue, 10 Nov 2026 10:13:58 +0100
17 Message-ID: <5f2a9c@mail.sender-host.net>
18 X-Mailer: ExampleMailer 4.2

The addresses are from ranges reserved for documentation.

Read the Received lines from the bottom up

Each server that handles a message adds a Received line at the top. So the lowest Received line is the earliest hop, and the highest is the last, added by your own provider.

  • Lines 2 to 4 were written by mx.example.org, the recipient's own server. It says it received the message from a server at 203.0.113.25 at 09:14:07 UTC. This is the line you can trust, because your provider wrote it and recorded the connecting address itself.

  • Lines 9 to 11 claim that mail.sender-host.net received the message from a client at 198.51.100.77. This was written by the sending service. It is probably accurate if that service is honest, but you are relying on a third party.

The rule: trust starts at the first server you have reason to trust, and everything below that line is a claim. A sender can insert fake Received lines beneath the real ones to invent a history. Signs of forgery include hops whose times run backwards, a hop that does not connect to the one above, and server names that do not match their addresses.

Compare times after converting to UTC. In the example, 10:14:02 +0100 is 09:14:02 UTC, five seconds before the next hop. That is a normal delay.

The From line proves nothing

From on line 13 is what the recipient sees. It is typed by the sender, exactly like the name written at the top of a paper letter. Three other fields show who is really behind the message:

  • Return-Path (line 12) is the address the sending server gave for bounces. Here it belongs to sender-host.net, not to the supposed supplier.

  • Reply-To (line 14) is where replies go. Here it is a lookalike of the supplier's domain, with a digit in place of a letter. This is the classic pattern of invoice fraud: the visible sender looks right, and the reply goes to the criminal. See our guide to lookalike domains.

  • Message-ID (line 17) is generated by the first mail server and usually ends in that server's domain.

When these three point somewhere different from From, find out why. Legitimate mailing services cause the same mismatch, which is where authentication results come in.

SPF, DKIM and DMARC

The Authentication-Results line, added by your provider, records three checks.

Check

What it tests

What a pass means

SPF

Is the sending server allowed to send for the domain in the Return-Path?

The server is authorised for that domain. Says nothing about the From line

DKIM

Does a cryptographic signature verify against the key published by the signing domain?

The message was signed by header.d and not altered since

DMARC

Does the domain in the From line match a passing SPF or DKIM domain?

The visible sender's domain really did authorise this message

In the example, SPF and DKIM both pass, for sender-host.net. That only shows that the message really came through that service. DMARC fails, because neither result matches trusted-supplier.com in the From line. The message did not come from the supplier.

Reading results correctly:

  • DMARC is the one that relates to what the reader sees. SPF and DKIM passes for some other domain are not reassurance.

  • A full pass is not a clean bill of health. A fraudster who registers a lookalike domain can set up SPF, DKIM and DMARC perfectly for it. Authentication proves which domain sent the mail, and you still have to read that domain character by character.

  • A fail is not proof of fraud. Forwarding and mailing lists break SPF and sometimes DKIM.

  • Only trust the Authentication-Results line from your own provider, identified by its name at the start. A sender can add a fake one lower down.

You can check a domain's published policy yourself:

dig +short TXT trusted-supplier.com | grep spf
dig +short TXT _dmarc.trusted-supplier.com

Can you find the sender's IP address?

Sometimes. It depends on what service the sender used.

  • Large webmail providers do not include it. Mail sent from Gmail, Outlook.com, Yahoo and similar through their websites or apps shows the provider's own servers and not the sender's device. Headers from these give you the provider and a time, and nothing more.

  • Corporate and small providers often do. A company's own mail server, many hosting companies and some regional providers record the client address in the first Received line or in a field such as X-Originating-IP.

  • Mail sent through a desktop program by SMTP usually shows the sender's address at the first hop, as in line 9 of the example.

When you do have an address, treat it with care. It may be a VPN, a compromised machine or a mobile carrier gateway, and it identifies a connection, not a person. Our guide to IP address OSINT explains what can be established from it. Linking it to a subscriber requires a legal request to the provider.

Other useful fields

  • Date is set by the sender's device, with its time zone offset. A consistent offset across several messages suggests a region. It can be set to anything.

  • X-Mailer or User-Agent names the software used. Bulk-mailing tools and unusual clients stand out.

  • Message-ID format varies by software and can link messages sent from the same system.

  • Received-SPF and ARC- lines record earlier authentication results when a message was forwarded.

  • List-Unsubscribe shows a bulk mailing platform, which can be reported to that platform.

  • X- lines from security products show spam scores and what filters thought.

  • Content-Type and attachments. The declared file type and the real one may differ.

A triage routine

  1. Save the original message file and record its hash. See preserving web evidence.

  2. Find the topmost Received line written by your own provider. Note the connecting address and time.

  3. Read Authentication-Results from your provider: does DMARC pass for the From domain?

  4. Compare From, Reply-To, Return-Path and Message-ID domains.

  5. Read each domain carefully for lookalike characters, and check its registration date. See investigating a domain.

  6. Follow the Received chain down, converting times to UTC, noting where trust ends.

  7. Research the earliest credible address and the sending service.

  8. Report to the sending service's abuse contact and, for fraud, to the police.

Our email OSINT guide covers researching the address itself.

Take care with online analysers

Header analysis websites lay the hops out in a readable table and are convenient. Pasting headers into one discloses the sender, the recipient, the subject, internal server names and addresses to a third party. For confidential or legally sensitive mail, read the headers yourself or use a tool that runs locally. See our guide to OPSEC for OSINT.

Frequently asked questions

Can I trace who sent an email?

You can usually identify the service that sent it and when, and sometimes the IP address of the sending device. Identifying the person needs records held by the provider, obtained through legal process.

Can email headers be faked?

Yes. The From line, the date and any Received lines below the first trustworthy server are supplied by the sender. Lines added by your own provider, including its Authentication-Results, are reliable.

What does a DMARC fail mean?

That the domain shown in the From line did not authorise the message, according to SPF and DKIM. It is a strong warning sign, though forwarding can cause false failures.

Does Gmail show the sender's IP address?

No. Messages sent from Gmail's own website or apps show Google's servers, not the sender's device.

What is the difference between Return-Path and From?

From is the address displayed to the reader, chosen by the sender. Return-Path is the address the sending server gave for delivery errors, and is the one SPF checks.

More from Dheeraj Yadav

Report this post