← RFC Reference

Anatomy of Email Headers

Email Concepts Encyclopedia
ELI5: Email headers are like the writing on the outside of an envelope, plus a detailed travel log stapled to it. The From: and To: say who it’s from and who it’s going to. The Received: headers are stamps from every post office that handled it. The DKIM-Signature: is a tamper-evident seal. The Authentication-Results: is the final post office’s verdict on whether the letter is legitimate.

Every important header field in an email message explained — what it means, who sets it, and why it matters. Includes a fully annotated real-world example.

A Complete Example

Here is a real email's headers, top to bottom, as they appear in a recipient's mailbox. We will dissect each one.

Return-Path: <bounces+alice=example.com@sender.mailertogo.com>
Delivered-To: bob@example.net
Received: from mx1.example.net (mx1.example.net [203.0.113.10])
by final-mda.example.net with LMTP id abc123
for <bob@example.net>; Tue, 11 Mar 2026 14:00:12 +0000
Received: from sender.mailertogo.com (sender.mailertogo.com [198.51.100.42])
by mx1.example.net (Postfix) with ESMTPS id 4F3A21C8
for <bob@example.net>; Tue, 11 Mar 2026 14:00:10 +0000
Authentication-Results: mx1.example.net;
spf=pass (sender SPF authorized) smtp.mailfrom=sender.mailertogo.com;
dkim=pass header.d=example.com header.s=mtg header.b=AuUoFE;
dmarc=pass (policy=reject) header.from=example.com
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=mtg;
c=relaxed/relaxed; q=dns/txt;
h=from:to:subject:date:message-id:mime-version:content-type;
bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=;
b=AuUoFEfDxTDkHlLXSZEpZj79LICEps6eda7W3deTVFOk...
From: Alice <alice@example.com>
To: Bob <bob@example.net>
Subject: Your March invoice is ready
Date: Tue, 11 Mar 2026 14:00:00 +0000
Message-ID: <inv-7842@example.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_Part_001"
List-Unsubscribe: <https://example.com/unsub?t=abc123>,
<mailto:unsub@example.com?subject=unsubscribe-abc123>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

Now let's go through each header.

Identity Headers

From

From: Alice <alice@example.com>

The author of the message, as defined by RFC 5322. This is what the recipient sees in their mail client. It consists of an optional display name (Alice) and a mailbox address (alice@example.com). DMARC alignment checks are performed against the domain in this header.

From is not the same as the envelope sender. The envelope sender (MAIL FROM in SMTP) can be completely different. The From: header is set by the message author; the envelope sender is set by the sending system.

To, Cc, Bcc

To: Bob <bob@example.net>

To: and Cc: are display headers — they indicate the intended audience but do not control delivery. The actual recipients are determined by the SMTP RCPT TO commands, which may include Bcc recipients not listed in any header. A message can have a To: header listing addresses that are not in the RCPT TO, and vice versa (this is how Bcc works).

Reply-To

Not shown in our example, but common. Specifies where replies should be directed if different from From:. Often used when a message is sent from a no-reply address but replies should go to support:

Reply-To: support@example.com

Sender

Used when the entity responsible for sending differs from the author. If Alice's assistant sends a message on her behalf, the headers might read From: Alice and Sender: Assistant. Most messages omit this header.

Message Identification

Message-ID

Message-ID: <inv-7842@example.com>

A globally unique identifier for this message, generated by the sender. The format is <unique-part@domain>. This is critical for threading, deduplication, and bounce correlation. Every message should have one. If your sending system does not set it, the first MTA will generate one — but then you lose the ability to correlate bounces with specific sent messages.

In-Reply-To and References

Used for threading. In-Reply-To contains the Message-ID of the message being replied to. References contains the full chain of Message-ID values in the thread. Mail clients use these to group conversations:

In-Reply-To: <inv-7842@example.com>
References: <inv-7842@example.com> <reply-001@example.net>

Date and Subject

Date

Date: Tue, 11 Mar 2026 14:00:00 +0000

The date and time the message was composed, set by the sender. The format is specified in RFC 5322. It is not the delivery time. A message can sit in a queue for hours or days before delivery. Always include a timezone offset.

Subject

Subject: Your March invoice is ready

Free-form text summarizing the message. No length limit in the spec, but mail clients truncate at varying lengths. Keep it under 60 characters for consistent display. Non-ASCII characters must be encoded using RFC 2047 encoding (e.g., =?UTF-8?Q?...?=), though most modern mail systems handle this transparently.

The Received Chain

Received: from mx1.example.net (mx1.example.net [203.0.113.10])
by final-mda.example.net with LMTP id abc123
for <bob@example.net>; Tue, 11 Mar 2026 14:00:12 +0000
Received: from sender.mailertogo.com (sender.mailertogo.com [198.51.100.42])
by mx1.example.net (Postfix) with ESMTPS id 4F3A21C8
for <bob@example.net>; Tue, 11 Mar 2026 14:00:10 +0000

Each server that handles the message prepends a Received: header. They are read bottom to top — the oldest hop is at the bottom, the most recent at the top. Each header records:

The Received chain is invaluable for debugging delivery delays. Compare timestamps between hops to find where time was lost. Note: Received: headers from the sender's side can be forged. Only trust headers added by your own infrastructure.

Return-Path

Return-Path: <bounces+alice=example.com@sender.mailertogo.com>

Set by the final delivering MTA, this records the SMTP envelope sender (MAIL FROM). This is where bounces are sent. In this example, VERP encoding is used — the original recipient (alice@example.com) is encoded into the local part of the bounce address.

The Return-Path is not set by the message author; it is extracted from the SMTP session and added by the delivering server. There should be exactly one Return-Path header in a delivered message.

Authentication Headers

DKIM-Signature

DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=mtg;
c=relaxed/relaxed; q=dns/txt;
h=from:to:subject:date:message-id:mime-version:content-type;
bh=2jUSOH9NhtVGCQWNr9BrIAPreKQjO6Sn7XIkfJVOzv8=;
b=AuUoFEfDxTDkHlLXSZEpZj79LICEps6eda7W3deTVFOk...

Added by the sending server. The d= field identifies the signing domain (used for DMARC alignment). The s= field is the selector used to look up the public key in DNS. The h= field lists which headers are signed. See Email Authentication Explained for the full verification process.

Authentication-Results

Authentication-Results: mx1.example.net;
spf=pass (sender SPF authorized) smtp.mailfrom=sender.mailertogo.com;
dkim=pass header.d=example.com header.s=mtg header.b=AuUoFE;
dmarc=pass (policy=reject) header.from=example.com

Added by the receiving server (RFC 8601). This is the authoritative record of authentication checks for this message at this hop. The authserv-id (mx1.example.net) identifies which server performed the check. It records SPF, DKIM, and DMARC results, including the identifiers checked.

Security note: Forged Authentication-Results headers from external sources should be stripped by the border MTA. Only trust this header when it is added by your own infrastructure.

MIME Headers

MIME-Version

MIME-Version: 1.0

Indicates the message uses MIME (RFC 2045). This is always 1.0 and should be present on every message. Without it, the message is interpreted as plain US-ASCII text.

Content-Type

Content-Type: multipart/alternative; boundary="----=_Part_001"

Describes the media type of the message body. Common values:

The boundary parameter defines the delimiter between MIME parts. See RFC 2046 for details.

Content-Transfer-Encoding

How the body is encoded for safe transit. Common values: 7bit, quoted-printable, base64. Attachments use base64. HTML email bodies typically use quoted-printable to handle non-ASCII characters while remaining mostly readable.

List Management Headers

List-Unsubscribe: <https://example.com/unsub?t=abc123>,
<mailto:unsub@example.com?subject=unsubscribe-abc123>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

RFC 2369 defines List-Unsubscribe, which provides a URL and/or mailto address for unsubscription. RFC 8058 adds List-Unsubscribe-Post, enabling one-click unsubscribe directly from the mail client's UI without opening a browser. Gmail and other major providers require both headers for bulk and marketing email.

Headers You Should Not See (But Sometimes Do)

X-Mailer / User-Agent

Identifies the mail client or sending software. Sometimes used by spam filters as a signal. Modern sending systems often omit this to reduce fingerprinting surface.

X-Priority / Importance

Non-standard headers that attempt to set message priority. Most mail clients ignore them. Some spam filters treat high-priority markings as a negative signal.

X-Spam-Status / X-Spam-Score

Added by spam filtering systems (like SpamAssassin). Not standardized, but widely used internally. These should not be present on outgoing mail — they are added by the receiving infrastructure.

What Can Go Wrong

Missing Message-ID

If you do not set a Message-ID, the first MTA adds one. But you lose the ability to correlate sent messages with bounces and delivery notifications. Always generate your own Message-ID before sending.

From and envelope sender confusion

A common source of deliverability problems. The From: header shows alice@example.com, but the envelope sender is bounce@esp.com. SPF validates the ESP domain, not your domain. If your DKIM signature also uses d=esp.com, DMARC alignment fails for both mechanisms. The fix: sign with d=example.com so DKIM aligns.

Duplicate or conflicting headers

RFC 5322 specifies that some headers (like From:, Date:, Message-ID:) must appear exactly once. Duplicates can cause unpredictable behavior — different mail clients may pick different values. Some spam filters treat duplicate From: headers as suspicious.

Missing Date header

Without a Date: header, the receiving MTA or mail client will substitute its own timestamp, which may differ significantly. Some spam filters penalize messages without a Date header.

Received chain forgery

Anyone can prepend fake Received: headers to a message before sending it. The receiving MTA can only trust headers it added itself. When debugging, start from the top (most recent) and work down, and stop trusting once you hit the border between your infrastructure and the external world.

Key Takeaways

Further Reading

Related RFCs