282 lines
5.4 KiB
HTML
282 lines
5.4 KiB
HTML
<HTML
|
|
><HEAD
|
|
><TITLE
|
|
>How Is Mail Delivered?</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="What Is a Mail Message?"
|
|
HREF="x-087-2-mail.message-format.html"><LINK
|
|
REL="NEXT"
|
|
TITLE="Email Addresses"
|
|
HREF="x-087-2-mail.address.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.message-format.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.address.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
></TABLE
|
|
><HR
|
|
ALIGN="LEFT"
|
|
WIDTH="100%"></DIV
|
|
><DIV
|
|
CLASS="SECT1"
|
|
><H1
|
|
CLASS="SECT1"
|
|
><A
|
|
NAME="X-087-2-MAIL.DELIVERY"
|
|
>17.2. How Is Mail Delivered?</A
|
|
></H1
|
|
><P
|
|
>
|
|
|
|
Generally, you will compose mail using a mailer interface like
|
|
<B
|
|
CLASS="COMMAND"
|
|
>mail</B
|
|
> or <B
|
|
CLASS="COMMAND"
|
|
>mailx</B
|
|
>, or more
|
|
sophisticated ones like <B
|
|
CLASS="COMMAND"
|
|
>mutt</B
|
|
>, <B
|
|
CLASS="COMMAND"
|
|
>tkrat</B
|
|
>,
|
|
or <B
|
|
CLASS="COMMAND"
|
|
>pine</B
|
|
>. These programs are called
|
|
<I
|
|
CLASS="EMPHASIS"
|
|
>mail user agents</I
|
|
>, or MUAs. If you send a mail
|
|
message, the interface program will in most cases hand it to another
|
|
program for delivery. This is called the <I
|
|
CLASS="EMPHASIS"
|
|
>mail transport
|
|
agent</I
|
|
>, or MTA. On most systems the same MTA is used for both
|
|
local and remote delivery and is usually invoked as
|
|
<B
|
|
CLASS="COMMAND"
|
|
>/usr/sbin/sendmail</B
|
|
>, or on non-FSSTND compliant systems as
|
|
<B
|
|
CLASS="COMMAND"
|
|
>/usr/lib/sendmail</B
|
|
>. On UUCP systems it is not uncommon to
|
|
see mail delivery handled by two separate programs: <B
|
|
CLASS="COMMAND"
|
|
>rmail</B
|
|
>
|
|
for remote mail delivery and <B
|
|
CLASS="COMMAND"
|
|
>lmail</B
|
|
> for local mail delivery.</P
|
|
><P
|
|
>
|
|
Local delivery of mail is, of course, more than just appending the
|
|
incoming message to the recipient's mailbox. Usually, the local MTA understands aliasing (setting up local recipient addresses
|
|
pointing to other addresses) and forwarding (redirecting a user's mail
|
|
to some other destination). Also, messages that cannot be delivered
|
|
must usually be <I
|
|
CLASS="EMPHASIS"
|
|
>bounced</I
|
|
>, that is, returned to the
|
|
sender along with some error message.</P
|
|
><P
|
|
>
|
|
For remote delivery, the transport software used depends on the nature
|
|
of the link. Mail delivered over a network using TCP/IP commonly uses
|
|
<I
|
|
CLASS="EMPHASIS"
|
|
>Simple Mail Transfer Protocol</I
|
|
> (SMTP), which is
|
|
described in RFC-821. SMTP was designed to deliver
|
|
mail directly to a
|
|
recipient's machine, negotiating the message transfer with the remote
|
|
side's SMTP daemon. Today it is common practice for organizations to
|
|
establish special hosts that accept all mail for recipients in the
|
|
organization and for that host to manage appropriate delivery to the
|
|
intended recipient.</P
|
|
><P
|
|
>
|
|
|
|
Mail is usually not delivered directly in UUCP networks, but
|
|
rather is forwarded to the destination host by a number of intermediate
|
|
systems. To send a message over a UUCP link, the sending MTA usually executes <B
|
|
CLASS="COMMAND"
|
|
>rmail</B
|
|
> on the forwarding system using
|
|
<B
|
|
CLASS="COMMAND"
|
|
>uux</B
|
|
>, and feeds it the message on standard input.</P
|
|
><P
|
|
>
|
|
|
|
|
|
|
|
Since <B
|
|
CLASS="COMMAND"
|
|
>uux</B
|
|
> is invoked for each message separately, it may
|
|
produce a considerable workload on a major mail hub, as well as clutter the
|
|
UUCP spool queues with hundreds of small files taking up a disproportionate
|
|
amount of disk space.<A
|
|
NAME="X-087-2-FNMA04"
|
|
HREF="#FTN.X-087-2-FNMA04"
|
|
>[1]</A
|
|
> Some MTAs
|
|
therefore allow you to collect several messages for a remote system in a
|
|
single batch file. The batch file contains the SMTP commands that the local
|
|
host would normally issue if a direct SMTP connection were used. This is
|
|
called BSMTP, or <I
|
|
CLASS="EMPHASIS"
|
|
>batched</I
|
|
> SMTP. The batch is then fed
|
|
to the <B
|
|
CLASS="COMMAND"
|
|
>rsmtp</B
|
|
> or <B
|
|
CLASS="COMMAND"
|
|
>bsmtp</B
|
|
> program on the
|
|
remote system, which processes the input almost as if a normal SMTP
|
|
connection has occurred. </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-FNMA04"
|
|
HREF="x-087-2-mail.delivery.html#X-087-2-FNMA04"
|
|
>[1]</A
|
|
></TD
|
|
><TD
|
|
ALIGN="LEFT"
|
|
VALIGN="TOP"
|
|
WIDTH="95%"
|
|
><P
|
|
>This is because disk space is usually allocated in blocks of 1,024 bytes. So
|
|
even a message of a few dozen bytes will eat a full kilobyte.</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.message-format.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.address.html"
|
|
>Next</A
|
|
></TD
|
|
></TR
|
|
><TR
|
|
><TD
|
|
WIDTH="33%"
|
|
ALIGN="left"
|
|
VALIGN="top"
|
|
>What Is a Mail Message?</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"
|
|
>Email Addresses</TD
|
|
></TR
|
|
></TABLE
|
|
></DIV
|
|
></BODY
|
|
></HTML
|
|
> |