Anatomy of a Mail Header

Zen and the Art of the Internet

Go to the Table of Contents. Visit Gifcom

 Anatomy of a Mail Header
An electronic mail message has a specific structure to it that's
common across every type of computer system. {The standard is written
down in RFC-822. See also  RFCs for more info on how to get copies of
the various RFCs.} A sample would be:
>From Sat May 25 17:06:01 1991
Received: from by with SMTP id AA21901
(4.1/SMI for; Sat, 25 May 91 17:05:56 -0400
Date: Sat, 25 May 91 17:05:56 -0400
From: The President <>
Message-Id: <>
Subject: Meeting
Hi Dan .. we have a meeting at 9:30 a.m. with the Joint Chiefs. Please
don't oversleep this time.
The first line, with From and the two lines for Received: are usually
not very interesting.  They give the ``real'' address that the mail
is coming from (as opposed to the address you should reply to, which
may look much different), and what places the mail went through to
get to you.  Over the Internet, there is always at least one
Received: header and usually no more than four or five.  When a
message is sent using UUCP, one Received: header is added for each
system that the mail passes through.  This can often result in more
than a dozen Received: headers.  While they help with dissecting
problems in mail delivery, odds are the average user will never want
to see them.  Most mail programs will filter out this kind of
``cruft'' in a header.
The Date: header contains the date and time the message was
sent.  Likewise, the ``good'' address (as opposed to ``real'' address)
is laid out in the From: header.  Sometimes it won't include
the full name of the person (in this case The President), and
may look different, but it should always contain an email address of
some form.
The Message-ID: of a message is intended mainly for tracing
mail routing, and is rarely of interest to normal users.  Every
Message-ID: is guaranteed to be unique.
To: lists the email address (or addresses) of the recipients of
the message.  There may be a Cc: header, listing additional
addresses.  Finally, a brief subject for the message goes in the
Subject: header.
The exact order of a message's headers may vary from system to system,
but it will always include these fundamental headers that are vital to
proper delivery.