Step-by-Step Email Headers Extraction: Tracing the Source of Suspicious Emails

Have you ever wondered where that weird-looking email really came from? Maybe it claims to be your bank, but the header smells fishy 🐟—don’t hit ‘delete’ just yet! Email headers are like digital footprints, revealing servers, IPs, routing hops, and authentication results. With the right approach, you can trace a suspicious email back to its source and spot spoofers in their tracks. In this guide, we’ll walk through multiple platforms (Gmail, Outlook, Yahoo), share real-life tips, toss in a typo or two (“reciever” instead of “receiver”), and wrap up with a Q&A. And yes, expect a casual, conversational tone—just like chatting over coffee.


Why Email Headers Matter

Before we dive into extraction, let’s quickly cover why headers are worth your time:

  1. Identify the Sending Server: The Received: lines show each mail transfer agent (MTA) that handled the email.
  2. Spot Spoofing: Authentication results (SPF, DKIM, DMARC) give clues if the sender is legit.
  3. Diagnose Delivery Issues: Bounce messages and delays often leave traces in headers.
  4. Forensics and Compliance: In security incidents or legal audits, headers can provide essential evidence.

Anatomy of an Email Header

A typical email header looks like a wall of text. Here’s a simplified example:

Return-Path: <[email protected]>
Received: from smtp.example.com (smtp.example.com [203.0.113.10])
    by mx1.fastdnscheck.com (Postfix) with ESMTPS id ABC123
    for <[email protected]>; Mon, 07 Jun 2024 14:22:31 +0300 (EEST)
Authentication-Results: mx1.fastdnscheck.com;
    spf=pass (sender SPF authorized) smtp.mailfrom=example.com;
    dkim=pass header.d=example.com;
    dmarc=pass (p=NONE) header.from=example.com
Message-ID: <[email protected]>
Date: Mon, 07 Jun 2024 11:22:30 +0000
From: "John Doe" <[email protected]>
To: "You" <[email protected]>
Subject: Your Monthly Statement
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8

Key sections:

  • Return-Path: Bounce address.
  • Received: Each MTA adds one—top is your mail server, bottom is the origin.
  • Authentication-Results: SPF, DKIM, DMARC checks.
  • Message-ID & Date: Unique identifier and sent timestamp.
  • From & To: Sender and recipient fields.

Step 1: Extract Headers in Gmail

  1. Open the Email in Gmail (web).
  2. Click the three dots menu next to Reply.
  3. Select Show original.
  4. A new tab opens showing raw headers and body.
  5. Copy the headers section for analysis.

Pro tip: Gmail timestamps often adjust to your timezone, so keep that in mind if comparing hops.


Step 2: Extract Headers in Outlook

Outlook Web (OWA)

  1. Open the email.
  2. Click the ellipsis (…) in the top-right corner.
  3. Choose View message details.
  4. Raw headers appear; select and copy them.

Outlook Desktop (Windows)

  1. Double-click to open the message in its own window.
  2. Go to File → Properties.
  3. In the Internet headers box, select all and copy.

Step 3: Extract Headers in Yahoo Mail

  1. Open the message.
  2. Click the three dots icon.
  3. Choose View raw message.
  4. Headers and body show in a popup; copy the headers part.

Step 4: Decode and Analyze Headers

Now that you have the headers, let’s break them down.

4.1 Follow the Received Chain

  • Start at the bottom: The first Received: line is the origin.
  • Note each mail server IP and hostname.
  • Check IP geolocation using an IP lookup tool (like FastDNSCheck’s IP Lookup).

Example:

Received: from smtp.example.com (smtp.example.com [203.0.113.10])
Received: from unknown (HELO mail.badactor.net) (198.51.100.20)

Here, 198.51.100.20 might be the attacker’s server—investigate its hosting provider.

4.2 Verify SPF, DKIM, DMARC

Look at the Authentication-Results or equivalent lines:

  • spf=pass vs spf=fail.
  • dkim=pass vs dkim=none or permerror.
  • dmarc=pass vs dmarc=fail.

Example:

Authentication-Results: mx1.fastdnscheck.com;
   spf=fail smtp.mailfrom=example.com;
   dkim=none header.d=badactor.net;
   dmarc=fail header.from=example.com

Failing all three is a red flag.

4.3 Check Message-ID and Date

  • Message-ID should match server domain. If Message-ID is <[email protected]>, yet the From: is example.com, that’s suspicious.
  • Date mismatches: If the Date: is hours ahead of the first Received: timestamp, the header could be forged.

4.4 Inspect Other Fields

  • Reply-To vs From: Attackers sometimes set a benign From: but malicious Reply-To:.
  • Return-Path: Bounce messages go here; mismatches indicate potential spoofing.

Step 5: Use FastDNSCheck.com Tools

To streamline analysis:

  1. IP Lookup: Paste each MTA IP into the IP Lookup tool for geolocation and ASN info.
  2. Blacklist Checker: Check if any sending IP appears on spam blacklists.
  3. SPF/DKIM/DMARC Analyzer: FastDNSCheck’s Email Headers Extractor can parse headers and highlight failures automatically.

Real-World Scenario: Phishing Email Investigation

Last month, a coworker forwarded a “security alert” from “our IT department.” Headers told a different story:

  1. The bottom Received: entry showed mail.office365.com—legit.
  2. Next, it went to mail.spf.badhost.ru—strange!
  3. spf=fail, dkim=none, dmarc=fail.
  4. The Message-ID came from badhost.ru.

Outcome: Blocked the malicious IP, informed IT, and no one clicked the fake link.


Common Pitfalls and Tips

  • Temporary Email Clients: Some mobile apps reformat headers; always check via web or desktop.
  • Truncated Headers: Some clients hide deeper Received: lines; use raw-view rather than summary.
  • Time Zones: Convert all timestamps to UTC when correlating events.
  • Multiple Authentication-Results: Email may pass one check on the first MTA but fail later; read them all.

Q&A

Q1: Why do some headers show encrypted or hidden information?
A: For privacy, some MTAs hide internal details. Focus on public-facing hops and authentication results.

Q2: Can headers be forged?
A: Parts can, but forging the entire chain (all Received: lines) is extremely difficult since each MTA adds its own.

Q3: What if I don’t see an Authentication-Results header?
A: That simply means the receiving server didn’t perform checks. You can re-run headers through FastDNSCheck’s SPF/DKIM/DMARC analyzer.

Q4: How do I report a malicious IP block?
A: Use services like Spamhaus or AbuseIPDB, or contact the hosting provider’s abuse team with the IP and evidence.


Email headers might look daunting, but with a systematic approach—and FastDNSCheck.com’s tools—you’ll soon sniff out phishing attempts and troubleshoot delivery issues like a pro. Did you catch any typos or have more header mysteries? Drop a comment below!

Leave a Reply

Your email address will not be published. Required fields are marked *