The .eml File
An .eml file is just plain text. It is the message exactly as the mail server saw it. Every header, every signature, every line of the body, in the order the protocol delivered them.
When you "save" or "export" an email from any modern mail client, what you get is a single text file with the extension .eml. The format is defined by RFC 5322. You can open it in any text editor. There are no fancy structures, no databases, no binary blobs. The first half of the file is the headers, separated from the body by a single blank line, and the body is whatever the sender included (plain text, HTML, attachments encoded as MIME parts, or all three).
Every mail client also has a way to show you the raw .eml of a message you have already received, without saving it as a file. The button is called different things in different apps, but it always exists. Learn where it lives in the clients you use.
Gmail (web)
- Open the message
- Click the three-dot menu at the top right of the message
- Choose
Show original - A new tab opens with the full raw .eml and the SPF / DKIM / DMARC results at the top
Outlook (desktop)
- Open the message in its own window (double-click)
File > Properties- Read the
Internet headersfield at the bottom of the dialog - For the full .eml: drag the message to your desktop
Outlook (web / Microsoft 365)
- Open the message
- Click the three-dot menu at the top right
View > View message source
Apple Mail
- Open the message
View > Message > Raw Source(or⌥⌘U)- Or
View > Message > All Headersfor just the header block
Thunderbird
- Open the message
View > Message Source(orCtrl+U)
Any client
- If all else fails: forward the message to yourself as an attachment
- The attached message will arrive as a .eml file
- Save it to disk and open with a text editor
The Headers Worth Knowing
Hundreds of headers exist. A dozen do most of the work. Get familiar with these and you can read any email.
| Header | Half | What it tells you |
|---|---|---|
| From: | Visible | The sender that the mail client shows the user. Free-form display name plus an address. Spoofable. |
| To: | Visible | The intended recipient(s). Can be different from who actually received the message (BCC, list expansion). |
| Subject: | Visible | Free-form text the sender chose. Often the bait line. |
| Date: | Visible | The local clock of the sending machine when the message was composed. Can be wrong, missing, or in the wrong timezone. |
| Reply-To: | Where a reply goes when the user hits Reply. If different from From:, that is a deliberate redirect. | |
| Return-Path: | The SMTP envelope sender (MAIL FROM), captured by the receiving server. Where bounces go. Often the most truthful "from" on the message. | |
| Message-ID: | A globally unique identifier assigned by the originating server. Format hints at the mailing infrastructure used. | |
| Received: | One stamp per relay hop. The receiving server prepends a stamp on every Received header. Reading them bottom-up tells the story of the message's path. | |
| Authentication-Results: | The receiving server's verdict on SPF, DKIM, and DMARC for this message. Single most important header for catching spoofing. | |
| DKIM-Signature: | A cryptographic signature over selected headers and (usually) the body, produced by the sending domain. Validated against a public key in DNS. | |
| ARC-Authentication-Results: | Authenticated Received Chain. When mail passes through a forwarder, ARC preserves the original auth verdict so the final receiver can still trust it. | |
| List-Unsubscribe: | An mailto: or https: that the user's client can call to unsubscribe. Mandatory for bulk senders under Gmail/Yahoo 2024 rules. | |
| Content-Type: | How the body is formatted. text/plain, text/html, or multipart/* if there are attachments. | |
| X-Mailer: | The software that composed the message. Optional. Phishers often forget to set it convincingly. |
The Autopsy
Below is the full text of a phishing email exactly as it would arrive in a Northgate inbox. Click any header line to read what it means and what it gives away. The most suspicious lines are colored red, the passing ones green, the warnings yellow.
This is not a real message. The domains send-mailer.co and northgate-account-reset.help-desk.io are illustrative. The IP 185.220.101.34 is in a range historically used by anonymizing relays. The Northgate mail servers and address ranges shown are realistic but not necessarily accurate.
Walking the Received Chain
Every server that touches the message prepends one Received: header. The chain is read from the bottom up to retrace the path from sender to you.
This is the single most useful skill on this page. The originating IP, the one that actually composed the message, is always the bottom Received: in the file (or close to it, depending on how many internal hops the receiving organization adds). Each hop higher in the file is one step closer to your inbox. The top hop is the server that finally handed the message off to your mailbox.
Final hop · into your mailbox
Received: stamp in the file.Edge relay · into Northgate
Bulk mailer · into the public internet
Origin · the actual sender
Received: stamp. This is the IP that submitted the message to the bulk mailer in the first place. The PTR (reverse DNS) lookup returns unknown, which is itself a tell.Every server adds its own Received: on top, so the most recent hop ends up at the top of the file and the original sender ends up at the bottom. Reading bottom-up follows the actual flow of the message through time. You can verify the chain is intact by checking that each hop's "by" host matches the next hop's "from" host. If there is a gap, the chain has been forged or rewritten.
Looking Up the Originating IP
Once you have the IP from the bottom of the Received chain, three quick lookups tell you almost everything you need to know about the sender.
You do not need to install anything. whois ships on every Linux and macOS install. dig -x performs the reverse DNS lookup. And free IP geolocation services give you a city-level location and the hosting provider in one click. None of these are perfect, but together they paint a picture.
whois 185.220.101.34dig -x 185.220.101.34 +short returns nothing — no PTR record. Legitimate mail servers always have a PTR.whois <ip> — who owns the block.dig -x <ip> +short — what does the IP claim its hostname is.curl https://ipinfo.io/<ip>/json — geolocation, ASN, hosting org in a single JSON response.
Reading Authentication-Results
By the time the message reaches your inbox, the receiving server has already evaluated SPF, DKIM, and DMARC for you. The verdict lives in a single header.
The Authentication-Results: header is a one-stop summary written by the receiving mail server. Look for three keywords: spf=, dkim=, and dmarc=. Each one will read pass, fail, softfail, neutral, or none. The next page covers what each of these protocols actually does. For now, treat the verdict as a quick first pass.
The IP that sent the message is not in the list of IPs allowed to send mail for the claimed domain. In our autopsy: send-mailer.co is not permitted to send on behalf of northgate.edu.
No DKIM signature was attached. Either the sender did not sign the message, or the signature was stripped in transit. A legitimate northgate.edu sender would always sign.
Because both SPF and DKIM failed to align with the From: domain of northgate.edu, DMARC fails. The Northgate DMARC policy is p=quarantine, so the message lands in spam rather than the inbox — but some receivers still deliver to inbox with a warning.
If you see spf=fail, dkim=fail (or dkim=none), and dmarc=fail on a message claiming to be from a major institution or a service you use, the message is almost certainly forged. Real organizations get their mail authentication right.
The Forensics Checklist
Run this list against any suspicious email and you will catch nearly every forged message you receive.
-
Open the raw source. View original / View source / Properties > Internet headers, depending on your client. Get the full .eml in front of you.
-
Compare From, Reply-To, and Return-Path. When any two of these disagree, the message has at least one redirection. When all three disagree, the message is almost certainly spoofed.
-
Find the bottom Received: line. That is the originating IP. Note it for the next step.
-
Look up the IP.
whoisfor the owning organization,dig -xfor the reverse DNS, and an IP geolocation lookup for the country. Compare against where the sender claims to be. -
Read the Authentication-Results header. Three keywords:
spf=,dkim=,dmarc=. All three should pass for a legitimate corporate message. If any of the three saysfailwhile the message claims to come from a brand or institution, escalate to suspicion. -
Inspect every link before clicking. View source on the HTML body. Look at the
hrefvalues, not the displayed text. Any link whose visible text and underlying URL disagree is intentional misdirection. -
Save the .eml for reporting. When you report to your IT/security team, attach the raw .eml or forward as attachment. Forwarding the rendered email loses the headers, which are the entire evidence base.
Where to Go Next
You now know how to read an email. The next page explains the three protocols that decide whether what you're reading should be trusted.