CyberSurfaceMap
EXTERNAL ATTACK SURFACE INTELLIGENCE
Learning Hub/EMAIL SECURITY

FIELD GUIDE / EMAIL SECURITY

How to Read Email Headers: A Practical Security Guide

A suspicious message can look convincing while its technical details tell a different story. Follow Maya, a security analyst at fictional Northstar Retail, as she examines the message headers, separates useful signals from assumptions, and documents what the evidence actually proves.

Beginner·12 min read·Practical investigation guide

The invoice that looked legitimate

Maya works on the security team at fictional Northstar Retail. On a Monday morning, the finance team forwards a message claiming that a supplier has changed its bank details. The message uses a familiar logo, names a real employee, and refers to an invoice that is genuinely due. Its visible display name looks right, so a colleague nearly approves the payment.

Maya does not decide whether the email is genuine from its appearance alone. She asks the mail administrator to preserve the original message as an .eml file and obtains the headers and the receiving mail system's authentication results. She avoids opening unexpected attachments or following links while the message is being reviewed.

The headers will not magically reveal the sender's intentions. Instead, they provide clues about the identities used to send the message, the systems that handled it, and whether the receiving system's authentication checks passed. Maya treats each clue as evidence to verify, not as a verdict by itself.

Scope of this guide

All domains and addresses here are illustrative. Email clients and gateways format headers differently. For a real incident, use your organization's approved mail-security tools and incident-handling process.

Start with the important fields

The visible sender in an email client is only one part of the message. A raw message contains several fields with different purposes. Maya compares them instead of expecting every address to match.

  • From: the author address shown to the recipient. This is the identity users usually notice first and the domain DMARC alignment evaluates.
  • Reply-To: a reply destination that can differ from From. A mismatch is not automatically malicious, but an unexpected external reply address deserves context.
  • Return-Path: generally added by the receiving system to reflect the envelope sender used for delivery. It often relates to the identity SPF checks, but the exact result and identity should be read from the authentication results.
  • Sender: where present, identifies the agent responsible for transmitting a message on behalf of the author in certain mail formats. Its meaning depends on the message and mail system.
  • Subject: useful for investigation context, but ordinary text and display formatting can be chosen by the sender.
  • Message-ID: a message identifier that can help correlate records across systems. It is not proof that a message is legitimate, and a sender can supply misleading values.

Suppose the visible From address claims to be billing@northstar.example, while Reply-To points to a different domain. Maya records that difference and checks whether the supplier uses an approved ticketing or billing platform. She does not conclude fraud from a mismatch alone: some legitimate workflows intentionally use separate reply services.

Read Received lines carefully

Mail systems commonly add Received headers as they accept and relay a message. A message that passed through several servers can accumulate multiple Received lines. When reviewing a chain, analysts generally read it from the bottom toward the top to understand earlier hops, but they must distinguish trusted infrastructure from text that an untrusted sender could have inserted.

Maya starts with the receiving organization's trusted gateway. She identifies the lines that gateway added, then follows the chain only as far as the available evidence supports. She compares timestamps, hostnames, and IP addresses with mail logs and known providers. She does not treat every earlier Received line as trustworthy, because a sender can include forged header text before a trusted server receives the message.

Time zones, gateways, cloud mail routing, forwarding, and internal relays can make a header chain look more complicated than expected. An unfamiliar hostname is a lead to validate, not proof of compromise. If a system's logs are available, those logs often provide stronger corroboration than a user-supplied copy of a header.

Interpret Authentication-Results

Many receiving mail systems add an Authentication-Results header summarizing checks such as SPF, DKIM, and DMARC. This can be one of the most useful lines in an investigation, but Maya first identifies which mail system added it. An attacker can include a header with the same name earlier in a message; the mere presence of text saying spf=pass is not enough.

A trusted receiving gateway may report results in a format similar to Authentication-Results: mx.receiver.example; spf=fail; dkim=pass; dmarc=fail. This is an illustrative example, not a real trace or a universal syntax guarantee. Actual results may name the identity checked, the DKIM signing domain, the DMARC policy, or an explanation for the outcome.

Maya records the result, the system that produced it, and the identities associated with each check. She then compares it with the organization's mail-security console and message logs. Authentication results can help establish whether a domain's policy checks passed, but they do not tell her whether the message contains a scam, whether a mailbox was compromised, or who physically operated the sending system.

What SPF can tell you

Sender Policy Framework (SPF) lets a domain publish a DNS policy describing which sending hosts are authorized for a relevant mail identity. An SPF result is evaluated against an identity such as the SMTP envelope sender, with HELO/EHLO identity also relevant in some cases. The visible From address is not simply what SPF authenticates.

If a message's SPF result is pass, the connecting sender was permitted by the SPF policy for the identity that was checked. It does not automatically prove that the visible From domain is aligned, that the message is harmless, or that the sender account is secure. A message can pass SPF for a service-provider domain that is unrelated to the visible From domain.

Forwarding can change the sending server in ways that cause SPF to fail, while forwarding systems may also use techniques that affect delivery and authentication results. Maya asks the mail administrator to interpret the result in the context of the actual route and the identity shown in the trusted Authentication-Results header.

For more background on email-related DNS records, read DNS Records Explained and SPF, DKIM, and DMARC Explained.

What DKIM can tell you

DomainKeys Identified Mail (DKIM) adds a cryptographic signature to an email. The recipient can use the public key published in DNS to verify whether the signed parts of the message still match the signature created with the sending domain's private key. A DKIM signature commonly includes a signing-domain value, d=, and a selector, s=, that helps locate the public key.

A passing DKIM result means the signature verified for the signing domain and signed content under the receiver's checks. It does not prove that the visible sender is who the reader expects, that the content is safe, or that the account used to send the message was not compromised. The signing domain and its relationship to the visible From domain still matter.

Forwarders and mailing lists can alter subject lines, bodies, or other signed content and affect signature verification. Maya documents the DKIM signing domain and selector where available, then checks whether the sender is an approved system. She avoids interpreting an isolated pass or fail without considering message flow.

Understand DMARC alignment

Domain-based Message Authentication, Reporting, and Conformance (DMARC) connects SPF and DKIM to the domain displayed in the From address. In simplified terms, DMARC passes when at least one of these conditions is met: SPF passes with an aligned domain, or DKIM passes with an aligned signing domain. Both mechanisms do not have to pass for DMARC to pass.

This alignment requirement matters because SPF and DKIM can pass for domains that are not the same as, or aligned with, the visible From domain. A trusted gateway may report spf=pass, dkim=pass, and dmarc=fail if neither passing identity aligns under the domain's DMARC settings. Alignment modes and receiver reporting can affect the precise interpretation.

DMARC also lets a domain owner publish a policy requesting that receivers take a specified approach to messages that fail DMARC, and it supports aggregate reporting. Actual message handling depends on receiver implementation and local policy. To understand the mechanisms and a staged rollout, continue with the SPF, DKIM, and DMARC guide.

Compare evidence, not impressions

Back at Northstar, Maya compares two hypothetical messages. In the first, the visible From domain is expected, SPF passes for an unrelated vendor domain, DKIM passes for the vendor's signing domain, and DMARC fails alignment. That pattern is worth reviewing, but it needs context: it could reflect a misconfigured legitimate sender or a deceptive message.

In the second message, the visible From address looks similar to the supplier's address, but its domain differs by a small spelling change. A trusted receiving gateway reports a DMARC failure, and the supplier confirms it did not send the message. This combination raises the confidence that the message is impersonating the supplier. The conclusion relies on multiple sources of evidence, not just one header field.

Maya checks payment-change requests through a previously verified contact method rather than replying to the suspicious message. She preserves the original email, submits it through the company's approved phishing-report process, and asks the mail administrator to correlate the message identifiers and sending details with gateway logs.

Evidence is cumulative

A header field can be forged or misunderstood. The strongest assessment combines trusted gateway results, message traces, domain relationships, sender confirmation through a separate channel, and the organization's incident-response process.

A safe investigation workflow

  1. Preserve the original. Use your approved mail client or security tooling to export the original message, including full headers. Avoid relying on a screenshot or a forwarded copy alone.
  2. Identify trusted evidence. Determine which gateway added Authentication-Results and which Received lines belong to trusted systems.
  3. Compare identities. Record From, Reply-To, Return-Path or envelope sender, DKIM signing domain, and relevant domains reported by the gateway.
  4. Read SPF, DKIM, and DMARC together. Record the exact result and identity for each check. Verify alignment rather than treating a pass as blanket approval.
  5. Correlate with logs. Use your organization's mail gateway, provider console, message trace, and endpoint alerts where authorized.
  6. Verify through another channel. Confirm payment changes, credential requests, or unusual instructions using a contact method already known to be genuine.
  7. Report and contain. Follow your organization's incident procedure. Do not click links, enable content, or open unexpected attachments as a test.

Common mistakes

  • Trusting the display name. Display names are easy to imitate; inspect the actual address and relevant domains.
  • Treating every header as trustworthy. Prefer results and trace information added by systems you trust.
  • Assuming SPF pass means the visible sender is authenticated. SPF evaluates a mail identity that may not align with the visible From domain.
  • Assuming DKIM pass means the message is safe. A signed message can still contain fraud or come from a compromised account.
  • Assuming DMARC failure proves an attack. Misconfigured legitimate systems and forwarding paths can also cause failures.
  • Changing DNS during an incident without an owner. Coordinate authentication changes with mail administrators; rushed changes can disrupt legitimate mail.

Investigation checklist

  • Preserve the original message and full headers.
  • Identify the receiving system that supplied trusted authentication results.
  • Record the visible From address, Reply-To, Return-Path/envelope identity, DKIM domain, and selector when available.
  • Evaluate SPF and DKIM results with DMARC alignment, not in isolation.
  • Correlate findings with provider logs and known sender configurations.
  • Verify unusual requests through a separate trusted channel and follow the incident-response process.

Continue learning with SPF, DKIM, and DMARC Explained, revisit DNS Records Explained, or return to the Learning Hub.

KNOWLEDGE CHECK / EMAIL SECURITY

Test your understanding

1. Does an SPF pass guarantee that the visible From domain is aligned?

Show answer

No. SPF evaluates a relevant envelope or HELO identity; DMARC checks whether a passing SPF or DKIM identity aligns with the visible From domain.

2. Should you trust any Authentication-Results header found in an email?

Show answer

No. First identify the trusted receiving system that added the result. A sender can include misleading header text earlier in the message.

3. What should you do with an unexpected request to change supplier bank details?

Show answer

Verify it through a separate, previously trusted contact method and follow the organization's reporting procedure. Do not rely on replying to the suspicious email.

CONTINUE LEARNING ON CYBERSURFACEMAP

Explore the related guides

CONTINUE WITH CYBERSURFACEMAP

Connect email identity to the wider domain picture.

Email-header review and external asset discovery answer different questions. When your work also requires reviewing internet-facing domains you own or are authorized to assess, use the platform to continue building that inventory.

EXPLORE THE CYBERSURFACEMAP SCANNER ↗Only assess assets you own or have explicit permission to test. Sign-in may be required.
Featured on CodeHype