email smtp security header-analysis spf-dkim-dmarc

Email Header Analysis & Troubleshooting Guide: Master the Received Trace

Learn how to analyze email headers like a pro. Understand Received fields, Return-Path vs From, and trace the origin of any email for troubleshooting and security.

2026-04-12

Email Header Analysis & Troubleshooting Guide: Master the Received Trace

Have you ever wondered what happens behind the scenes when you send or receive an email? While the body of the email contains your message, the Email Header contains the critical "envelope" information that tells the story of the email's journey from the sender's server to your inbox. Mastering email header analysis is an essential skill for IT professionals, developers, and security analysts.

What is an Email Header?

An email header is a block of metadata that accompanies every email. It contains technical details about the sender, the recipient, the route the email took, and the results of various security checks. While most email clients hide the header by default to provide a clean reading experience, it is always there, accessible via options like "View Source" or "View Original."

An email consists of three parts:

  1. The Envelope: Used by the mail servers to route the email (not visible in the final message).
  2. The Header: The metadata we see (and analyze).
  3. The Body: The actual content of the message.

Core Principles: Key Header Fields

To troubleshoot delivery issues or identify spoofing, you need to understand these critical fields:

1. The "Received" Trace

The Received field is the most important part of the header for tracing an email's path. Each mail server that handles the email adds its own Received line at the top of the header. To trace an email, you read these from bottom to top.

Example:

Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com. [209.85.218.44])
        by mx.google.com with ESMTPS id ...
        for <[email protected]>;
        Fri, 12 Apr 2026 10:00:01 -0700 (PDT)

2. Return-Path vs. From

  • From: The address displayed in the email client (the "friendly" sender).
  • Return-Path: The actual address used for bounce messages (the "envelope" sender).
  • Troubleshooting Tip: In phishing emails, the From address often says "[email protected]" while the Return-Path might be a random hacker's address.

3. Authentication-Results

This field shows the results of SPF, DKIM, and DMARC checks.

  • spf=pass: The sending IP is authorized.
  • dkim=pass: The cryptographic signature is valid.
  • dmarc=pass: The email aligns with the sender's policy.

Real-world Applications: Troubleshooting Delivery

Case 1: Why is my email delayed?

By looking at the timestamps in each Received header, you can calculate the delay between hops. If hop 1 is at 10:00 and hop 2 is at 10:15, you know the delay happened at the second server.

Case 2: Identifying Spoofing

If the Authentication-Results show spf=fail or dkim=fail, it's a strong indicator that the email might be fraudulent. Always check if the From domain matches the domain in the Authentication-Results.

Comparison: Key Field Differences

Field Purpose Can it be forged?
From Displayed sender address Yes (Easily)
Return-Path Bounce address Yes (But often reveals the true source)
Received Server hops and timestamps No (Only the bottom-most can be forged by the sender)
Message-ID Unique ID for the message Yes

FAQ: Common Header Questions

Q: Why do I see multiple "Received" headers?

A: Every mail server (MTA) the email passes through adds one. A typical journey involves the sender's server, several intermediate filters/relays, and finally the recipient's server.

Q: What is an .eml file?

A: An .eml file is a standard file format for an email message. It contains the full header and body in plain text. You can open them in any text editor to see the headers.

Q: How do I fix "Authentication-Results: spf=softfail"?

A: This usually means the sending IP is not explicitly listed in your SPF record but isn't strictly forbidden either. Update your SPF TXT record at your DNS provider to include the correct IP addresses or include statements.

Related Tools

  • Email Header Analyzer: Paste your headers to get a visual trace (Coming Soon).
  • SPF/DKIM/DMARC Generator: Create the correct DNS records to secure your domain.