An email header is the block of named fields at the top of an email message that describes the message rather than its content: who sent it, to whom, when, through which servers and with what authentication results. In Email infrastructure across the Internet, the header is defined by the Internet Message Format in RFC 5322 and is separated from the body by a single empty line.
Mail clients display only a few fields, typically From, To, Subject and Date, but a delivered message usually carries dozens of additional fields added by servers along the way. Those hidden fields are the primary evidence for tracing delivery problems, diagnosing spam filtering and detecting spoofed messages.
How an email header is structured
An email header consists of lines in the form field name, colon, field value, such as Subject: Quarterly report. Field names are case-insensitive, and a long value may be folded across several lines, where each continuation line begins with a space or tab.
Headers are written in US-ASCII. Non-ASCII text in display names or subjects is carried as encoded words defined by MIME, for example =?UTF-8?B?...?=, while internationalized email under SMTPUTF8 permits UTF-8 directly when every server supports it. RFC 5322 recommends lines of no more than 78 characters and forbids lines longer than 998 characters.
The header has two distinct origins. The sending client writes the originator fields that describe authorship, and each server that handles the message prepends trace fields that record its own processing. Because servers add fields at the top, the header reads newest first from top to bottom.
Essential header fields and their roles
A small set of fields carries most of the meaning in an email header. The table below lists the fields that practitioners examine most often and the party that normally writes each one.
| Field | Written by | Purpose |
|---|---|---|
| From | Sending client | Author shown to the recipient; checked by DMARC |
| To / Cc | Sending client | Visible primary and secondary recipients |
| Date | Sending client | Time the message was composed, with time zone |
| Message-ID | Client or first server | Globally unique identifier of the message |
| Reply-To | Sending client | Address that receives replies, if different from From |
| Received | Each mail transfer agent | One hop on the delivery path with timestamp |
| Return-Path | Final delivery server | Envelope sender, where bounces are sent |
| Authentication-Results | Receiving server | Outcome of SPF, DKIM and DMARC checks |
| DKIM-Signature | Signing server | Cryptographic signature over selected fields and body |
Only Date and From are mandatory under RFC 5322; Message-ID is strongly recommended and is almost always present. In-Reply-To and References link replies into conversation threads, and List-Unsubscribe lets clients offer a one-click unsubscribe control for bulk mail.
Header fields compared with the SMTP envelope
The email header is not the same as the SMTP envelope, and confusing the two is one of the most frequent errors in mail troubleshooting. The envelope consists of the MAIL FROM and RCPT TO commands exchanged between servers, and it alone decides where the message is actually delivered.
The comparison below shows how the two layers differ and why a recipient can receive a message whose To field does not mention them.
| Aspect | Message header | SMTP envelope |
|---|---|---|
| Defined by | RFC 5322 | RFC 5321 |
| Sender element | From field | MAIL FROM, later Return-Path |
| Recipient element | To, Cc fields | RCPT TO commands |
| Visible to user | Partly, in the client | Only through Return-Path |
| Controls delivery | No | Yes |
| Checked by | DKIM, DMARC alignment | SPF |
Bcc recipients illustrate the difference: they appear in the envelope but are normally removed from the header. Mailing lists also deliver messages whose To field shows only the list address, while the envelope contains each subscriber.
Reading headers for delivery and authentication analysis
Header analysis means reading Received fields from bottom to top to reconstruct the path, then checking authentication results against the visible sender. Each Received field names the server that accepted the message, the server it came from and a timestamp, so gaps between timestamps reveal where delays occurred.
The following table maps common investigation questions to the fields that answer them.
| Question | Field to examine | What to look for |
|---|---|---|
| Where was delivery delayed | Received timestamps | Large gap between two consecutive hops |
| Is the sender genuine | Authentication-Results | spf=pass, dkim=pass and dmarc=pass |
| Why did it land in spam | Filter-specific X- fields | Spam score and triggered rules |
| Where do bounces go | Return-Path | Envelope sender domain |
| Was the message forwarded | ARC-Seal and ARC-Message-Signature | Authentication chain from an intermediary |
Only Received fields added by servers under trusted control are reliable. Fields below the first trusted hop may have been forged by the sender, because any client can insert fake Received lines before submission.
Risks and common misconceptions
The main risk of email headers is that most fields are unauthenticated text controlled by whoever composes the message. Several practical misconceptions follow from that fact.
- The From field proves nothing on its own: without DMARC alignment it can name any address, which enables spoofing and phishing.
- The display name is the weakest element: a name such as “IT Support” can sit beside an unrelated address, and many mobile clients hide the address.
- X- fields are not standardized: the X- prefix was deprecated by RFC 6648, and such fields mean whatever the adding software intends.
- Headers can leak internal data: Received fields may expose private IP addresses, internal hostnames and client software versions.
- Forwarding breaks assumptions: SPF often fails after forwarding, which is why DKIM and ARC matter for indirect mail flows.
Explained without jargon
An email header is like the outside of a paper envelope, combined with every postmark stamped on it during the journey. It shows who claims to have sent the letter, who it is for, and every post office that handled it along the way.
Your email program normally hides most of this information and shows only the sender, subject and date. When something goes wrong, such as a late message or a suspicious one, the full header is where specialists look first.
A typical use case
An accounts payable clerk at a manufacturing company receives an urgent request to change a supplier’s bank details. The message appears to come from the supplier’s finance manager, so the clerk forwards it to the security team before acting.
The analyst opens the full header and finds that the From field shows the correct supplier domain, but the Authentication-Results field reports dmarc=fail and the Return-Path points to a recently registered lookalike domain. The lowest trusted Received field shows that the message entered the company’s gateway from a consumer hosting provider rather than from the supplier’s mail servers.
Within ten minutes the team confirms a business email compromise attempt. The payment change is rejected, the sending domain is blocked, and the supplier is notified by telephone using a number already on file.