Lesson 8 of 14 · 20m
Read Received: Bottom-Up
Every hop prepends a Received: header; the one your own infrastructure wrote is the trust boundary, and everything below it is what the client claimed.
What Actually Happens
RFC 5321 requires each relay to prepend a Received: header as it accepts the message. Reading a header block top to bottom, the Received: lines run newest-to-oldest — the last hop sits at the top, the claimed origin at the bottom. A typical line:
Received: from mta.evil.example (mta.evil.example [203.0.113.44])
by mx.yourdomain.org with ESMTPS id A1B2C3
for <you@yourdomain.org>; Sat, 15 Nov 2026 04:12:31 +0000The by field is the server that wrote the line. The from clause contains two different things: the name the peer announced in EHLO/HELO (mta.evil.example) and the IP of the TCP peer as the receiver observed it (203.0.113.44). The announced name is a string the client typed. The IP is a fact the receiver observed.
Two more fields do quiet work. with ESMTPS records the protocol — ESMTP plain, ESMTPS over TLS, ESMTPA or ESMTPSA when the session was authenticated (the A flag is how you spot an authenticated submission versus an unauthenticated relay, which matters when you're deciding whether mail came through your own users' accounts). The for <you@yourdomain.org> clause names the envelope recipient — invaluable when To: and the envelope diverge, which is always.
The Trust Boundary
Because any client can inject Received: headers into its own DATA, the bottom of the chain is not evidence — it's narrative. The forensic rule: find the Received: line your own infrastructure wrote; that is the boundary. It records the true connecting IP. Everything it says about the peer is observed. Everything below it was supplied by that peer and may be fabricated, trimmed, or real — you can't tell, and don't have to.
The second forensic rule: Return-Path: at the top of the headers is your MTA's copy of the envelope MAIL FROM. Compare it against From:. Divergence is normal (mailing lists, bounce handlers, CRM sends) but it is always the first thing to check, because it tells you who the transport believed it was carrying mail for.
X- headers are noise with occasional signal. Any sender can invent X-* — X-Mailer, X-Originating-IP, X-Priority — and phishers do, sometimes planting X-Authenticated-Sender: ceo@target.com precisely because analysts notice it. X-Originating-IP written by a webmail service is real data; the same header in an SMTP-submitted message is decoration. Weight X- headers by who plausibly wrote them, same as everything else.
Working a Chain
Take a claimed From: support@paypal.com. The boundary Received: (yours) says the peer was 203.0.113.44, announced as mta.evil.example. dig -x 203.0.113.44 gives a VPS provider's generic PTR, not mta.evil.example — announced name doesn't match the reverse. dig TXT paypal.com shows PayPal's SPF ranges; 203.0.113.44 isn't in them. The chain below your boundary happens to show by relay.internal and from webmail — possibly real, possibly typed; either way it doesn't change the answer: this was not PayPal.
Hop timing adds a second dimension. Each Received: ends in a timestamp with a timezone. +0000, -0500, +0530 differ across hops; convert before comparing. A "sent from the CFO's laptop at 2 AM" story that shows a first-hop timestamp at a completely different hour, or a 40-minute gap between submission and relay, is an anomaly worth a sentence in the report.
Evidence
Forged chains are routine in BEC: the bottom two or three Received: lines describe an internal network that never existed (from [10.0.0.5] by exchange.corp.local), specifically to simulate a compromised internal sender. Examiners who treat the whole chain as ground truth write "internal compromise" into reports that should say "external spoof."
Correct Practice
Locate your boundary Received: first — the by you recognize. Extract the observed peer IP from it and run the three lookups: PTR (does it claim a sane hostname?), FCrDNS (does that name come back to this IP?), SPF on the envelope domain (is the IP authorized?). Read Return-Path against From:. Normalize timestamps before reasoning about delays. Everything else is flavor until those five checks are done.
Keep reading
Related articles from the SudoSecurity blog.
Self-Hosted Email in 2026: Mailcow vs Mailu vs Stalwart — Which Mail Server Should You Trust?
Self-hosted email in 2026 comes with more choices than ever. This guide compares Mailcow, Mailu, and Stalwart across security, performance, resource usage, scalability, administration, and deliverability to help you choose the right mail server for your needs.
Stalwart 1.0 Says It's the Fastest Mail Server on the Planet. Here Are the Numbers.
After five years, Stalwart hit its first stable release on October 26 with benchmarks claiming it beats Postfix and Dovecot in 35 of 38 head-to-head tests. Every one of those numbers was produced by the vendor.
How to Self-Host Your Own Email Server With Mailcow in 2026 — Complete Setup Guide
How to Self-Host Your Own Email Server With Mailcow in 2026 — Complete Setup Guide Meta Description: Stop letting Google and Microsoft read your email. This guide sets up a complete private email server with Mailcow on a NetCup VPS — DNS, SPF, DKIM, DMARC, TLS, webmail, and mobile clients.
What Self-Hosters Are Ripping Out of Their Stacks in 2026
Self-hosted email is losing to Gmail's hard SMTP rejections. Self-hosted password managers are split down the middle. And self-hosted music is doing the opposite of what you'd expect.