436 lines
9.5 KiB
HTML
436 lines
9.5 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>What Is a Mail Message?</TITLE
|
|
><META
|
|
NAME="GENERATOR"
|
|
CONTENT="Modular DocBook HTML Stylesheet Version 1.57"><LINK
|
|
REL="HOME"
|
|
TITLE="Linux Network Administrators Guide"
|
|
HREF="index.html"><LINK
|
|
REL="UP"
|
|
TITLE="Electronic Mail"
|
|
HREF="x-087-2-mail.html"><LINK
|
|
REL="PREVIOUS"
|
|
TITLE="Electronic Mail"
|
|
HREF="x-087-2-mail.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="How Is Mail Delivered?"
|
|
HREF="x-087-2-mail.delivery.html"></HEAD
|
|
><BODY
|
|
CLASS="SECT1"
|
|
BGCOLOR="#FFFFFF"
|
|
TEXT="#000000"
|
|
LINK="#0000FF"
|
|
VLINK="#840084"
|
|
ALINK="#0000FF"
|
|
><DIV
|
|
CLASS="NAVHEADER"
|
|
><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TH
|
|
COLSPAN="3"
|
|
ALIGN="center"
|
|
>Linux Network Administrators Guide</TH
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="left"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-mail.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="80%"
|
|
ALIGN="center"
|
|
VALIGN="bottom"
|
|
>Chapter 17. Electronic Mail</TD
|
|
><TD
|
|
WIDTH="10%"
|
|
ALIGN="right"
|
|
VALIGN="bottom"
|
|
><A
|
|
HREF="x-087-2-mail.delivery.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="X-087-2-MAIL.MESSAGE-FORMAT"
|
|
>17.1. What Is a Mail Message?</A
|
|
></H1
|
|
><P
|
|
>A mail message generally consists of a message body, which is the text
|
|
of the message, and special administrative data specifying recipients,
|
|
transport medium, etc., like what you see when you look at a physical
|
|
letter's envelope.</P
|
|
><P
|
|
>
|
|
This administrative data falls into two categories. In the first category is
|
|
any data that is specific to the transport medium, like the address of sender
|
|
and recipient. It is therefore called the <I
|
|
CLASS="EMPHASIS"
|
|
>envelope</I
|
|
>. It
|
|
may be transformed by the transport software as the message is passed along.</P
|
|
><P
|
|
>
|
|
|
|
The second variety is any data necessary for handling the mail message, which
|
|
is not particular to any transport mechanism, such as the message's subject
|
|
line, a list of all recipients, and the date the message was sent. In many
|
|
networks, it has become standard to prepend this data to the mail message,
|
|
forming the so-called <I
|
|
CLASS="EMPHASIS"
|
|
>mail header</I
|
|
>. It is offset from the
|
|
<I
|
|
CLASS="EMPHASIS"
|
|
>mail body</I
|
|
> by an empty
|
|
line.<A
|
|
NAME="X-087-2-FNMA03"
|
|
HREF="#FTN.X-087-2-FNMA03"
|
|
>[1]</A
|
|
></P
|
|
><P
|
|
>Most mail transport software in the Unix world use a header format outlined
|
|
in RFC-822. Its original purpose was to specify a standard for use on the
|
|
ARPANET, but since it was designed to be independent from any environment, it
|
|
has been easily adapted to other networks, including many UUCP-based networks.</P
|
|
><P
|
|
>RFC-822 is only the lowest common denominator, however. More recent
|
|
standards have been conceived to cope with growing needs such as
|
|
data encryption, international character set support, and MIME
|
|
|
|
|
|
(Multipurpose Internet Mail Extensions, described in RFC-1341 and other RFCs).</P
|
|
><P
|
|
>In all these standards, the header consists of several lines separated
|
|
by an end-of-line sequence. A line is made up of a field name, beginning in
|
|
column one, and the field itself, offset by a colon and white space. The
|
|
format and semantics of each field vary depending on the field name. A
|
|
header field can be continued across a newline if the next line begins
|
|
with a whitespace character such as tab. Fields can appear in any order.</P
|
|
><P
|
|
>A typical mail header may look like this:
|
|
|
|
<TABLE
|
|
BORDER="0"
|
|
BGCOLOR="#E0E0E0"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
><PRE
|
|
CLASS="SCREEN"
|
|
>Return-Path: <ph10@cus.cam.ac.uk>
|
|
Received: ursa.cus.cam.ac.uk (cusexim@ursa.cus.cam.ac.uk [131.111.8.6])
|
|
by al.animats.net (8.9.3/8.9.3/Debian 8.9.3-6) with ESMTP id WAA04654
|
|
for <terry@animats.net>; Sun, 30 Jan 2000 22:30:01 +1100
|
|
Received: from ph10 (helo=localhost) by ursa.cus.cam.ac.uk with local-smtp
|
|
(Exim 3.13 #1) id 12EsYC-0001eF-00; Sun, 30 Jan 2000 11:29:52 +0000
|
|
Date: Sun, 30 Jan 2000 11:29:52 +0000 (GMT)
|
|
From: Philip Hazel <ph10@cus.cam.ac.uk>
|
|
Reply-To: Philip Hazel <ph10@cus.cam.ac.uk>
|
|
To: Terry Dawson <terry@animats.net>, Andy Oram <andyo@oreilly.com>
|
|
Subject: Electronic mail chapter
|
|
In-Reply-To: <38921283.A58948F2@animats.net>
|
|
Message-ID: <Pine.SOL.3.96.1000130111515.5800A-200000@ursa.cus.cam.ac.uk></PRE
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
></P
|
|
><P
|
|
>Usually, all necessary header fields are generated by the mailer interface you
|
|
use, like <B
|
|
CLASS="COMMAND"
|
|
>elm</B
|
|
>, <B
|
|
CLASS="COMMAND"
|
|
>pine</B
|
|
>,
|
|
<B
|
|
CLASS="COMMAND"
|
|
>mush</B
|
|
>, or <B
|
|
CLASS="COMMAND"
|
|
>mailx</B
|
|
>. However, some are
|
|
optional and may be added by the user. <B
|
|
CLASS="COMMAND"
|
|
>elm</B
|
|
>, for example,
|
|
allows you to edit part of the message header. Others are added by the mail
|
|
transport software. If you look into a local mailbox file, you may see each
|
|
mail message preceded by a “From” line (note: no colon). This is
|
|
<I
|
|
CLASS="EMPHASIS"
|
|
>not</I
|
|
> an RFC-822 header; it has been inserted by your mail
|
|
software as a convenience to programs reading the mailbox. To avoid potential
|
|
trouble with lines in the message body that also begin with
|
|
“From,” it has become standard procedure to escape any such
|
|
occurrence by preceding it with a > character.</P
|
|
><P
|
|
>This list is a collection of common header fields and their meanings:
|
|
|
|
|
|
<P
|
|
></P
|
|
><DIV
|
|
CLASS="VARIABLELIST"
|
|
><DL
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>From:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This contains the sender's email address and possibly the
|
|
“real name.” A complete zoo of formats is used here.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>To:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This is a list of recipient email addresses. Multiple recipient addresses
|
|
are separated by a comma.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Cc:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This is a list of email addresses that will receive “carbon copies”
|
|
of the message. Multiple recipient addresses are separated by a comma.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Bcc:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>This is a list of email addresses that will receive “carbon copies”
|
|
of the message. The key difference between a “Cc:” and a
|
|
“Bcc:” is that the addresses listed in a “Bcc:” will
|
|
not appear in the header of the mail messages delivered to any
|
|
recipient. It's a way of alerting recipients that you've sent copies of the
|
|
message to other people without telling them who those others are. Multiple
|
|
recipient addresses are separated by a comma.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Subject:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Describes the content of the mail in a few words.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Date:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Supplies the date and time the mail was sent.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Reply-To:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Specifies the address the sender wants the recipient's reply directed to.
|
|
This may be useful if you have several accounts, but want to receive the bulk
|
|
of mail only on the one you use most frequently. This field is optional.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Organization:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>The organization that owns the machine from which the mail originates. If your
|
|
machine is owned by you privately, either leave this out, or insert
|
|
“private” or some complete nonsense. This field is not described
|
|
by any RFC and is completely optional. Some mail programs support it directly,
|
|
many don't.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Message-ID:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>A string generated by the mail transport on the originating system. It uniquely
|
|
identifies this message.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>Received:</TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>Every site that processes your mail (including the machines of sender and
|
|
recipient) inserts such a field into the header, giving its site name, a
|
|
message ID, time and date it received the message, which site it is from,
|
|
and which transport software was used. These lines allow you to trace which
|
|
route the message took, and you can complain to the person responsible if
|
|
something went wrong.</P
|
|
></DD
|
|
><DT
|
|
><TT
|
|
CLASS="LITERAL"
|
|
>X-</TT
|
|
><TT
|
|
CLASS="REPLACEABLE"
|
|
><I
|
|
>anything:</I
|
|
></TT
|
|
></DT
|
|
><DD
|
|
><P
|
|
>No mail-related programs should complain about any header that starts
|
|
with <TT
|
|
CLASS="LITERAL"
|
|
>X-</TT
|
|
>. It is used to implement
|
|
additional features that have not yet made it into an RFC, or never
|
|
will. For example, there was once a very large Linux mailing list server that
|
|
allowed you to specify which channel you wanted the mail to go to by
|
|
adding the string <TT
|
|
CLASS="USERINPUT"
|
|
><B
|
|
>X-Mn-Key:</B
|
|
></TT
|
|
> followed by the channel name.</P
|
|
></DD
|
|
></DL
|
|
></DIV
|
|
></P
|
|
></DIV
|
|
><H3
|
|
CLASS="FOOTNOTES"
|
|
>Notes</H3
|
|
><TABLE
|
|
BORDER="0"
|
|
CLASS="FOOTNOTES"
|
|
WIDTH="100%"
|
|
><TR
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="5%"
|
|
><A
|
|
NAME="FTN.X-087-2-FNMA03"
|
|
HREF="x-087-2-mail.message-format.html#X-087-2-FNMA03"
|
|
>[1]</A
|
|
></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="95%"
|
|
><P
|
|
>It is customary to append a <I
|
|
CLASS="EMPHASIS"
|
|
>signature</I
|
|
> or
|
|
<TT
|
|
CLASS="FILENAME"
|
|
>.sig</TT
|
|
> to a mail message, usually containing information
|
|
on the author along with a joke or a motto. It is offset from the mail
|
|
message by a line containing “<TT
|
|
CLASS="LITERAL"
|
|
>--</TT
|
|
>” followed
|
|
by a space.</P
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><DIV
|
|
CLASS="NAVFOOTER"
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"><TABLE
|
|
WIDTH="100%"
|
|
BORDER="0"
|
|
CELLPADDING="0"
|
|
CELLSPACING="0"
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-mail.html"
|
|
>Prev</A
|
|
></TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="index.html"
|
|
>Home</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-mail.delivery.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>Electronic Mail</TD
|
|
><TD
|
|
WIDTH="34%"
|
|
ALIGN="center"
|
|
VALIGN="top"
|
|
><A
|
|
HREF="x-087-2-mail.html"
|
|
>Up</A
|
|
></TD
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="right"
|
|
VALIGN="top"
|
|
>How Is Mail Delivered?</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |