delivering.html   [plain text]


<html>

<head>

<title>Postfix Anatomy - Delivering Mail</title>

</head>

<body>

<h1><a href="big-picture.html"><img src="small-picture.gif" width="115" height="45"></a> Postfix
Anatomy - Delivering Mail</h1>

<hr>

<a href="index.html">Up one level</a> | <a
href="receiving.html">Receiving Mail</a> | Delivering Mail | <a
href="backstage.html">Behind the Scenes</a> | <a
href="commands.html">Command-line Utilities</a>

<p>

Once a message has reached the <b>incoming</b> queue the next step
is to deliver it.  The figure shows the main components of the
Postfix mail delivery apparatus. For an explanation of the symbols,
click on the icon in the upper left-hand corner of this page.

<p>

<center>

<img src="outbound.gif" width="424" height="269">

</center>

<p>

<ul>

<li>The <a href="qmgr.8.html">queue manager</a> is the heart of
the Postfix mail system. It contacts the <a href="local.8.html">local</a>,
<a href="smtp.8.html">smtp</a>, <a href="lmtp.8.html">lmtp</a>, or
<a href="pipe.8.html">pipe</a> delivery agents, and sends a delivery
request with queue file pathname information, the message sender
address, the host to deliver to if the destination is remote, and
one or more message recipient addresses.

<p>

The queue manager maintains a separate <b>deferred</b> queue for
mail that cannot be delivered, so that a large mail backlog will
not slow down normal queue accesses.

<p>

The queue manager maintains a small <b>active</b> queue with just
the few messages that it has opened for delivery.  The <b>active</b>
queue acts as a limited window on the potentially much larger
<b>incoming</b> or <b>deferred</b> queues. The small <b>active</b>
queue prevents the queue manager from running out of memory under
heavy load.

<p>

Optionally, the queue manager bounces mail for recipients that are
listed in the <a href="rewrite.html#relocated">relocated</a> table.
This table contains contact information for users or even entire
domains that no longer exist.

<p>

<li>On request by the queue manager, the <a
href="trivial-rewrite.8.html">trivial-rewrite</a> daemon resolves
destinations. By default, it only distinguishes between <i>local</i>
and <i>remote</i> destinations. Additional routing information can
be specified with the optional <a
href="rewrite.html#transport">transport</a> table.

<p>

<li>On request by the queue manager, the <a href="bounce.8.html">bounce
or defer</a> daemon generates non-delivery reports when mail cannot
be delivered, either due to an unrecoverable error or because the
destination is unreachable for an extended period of time.

<p>

<li>The <a href="local.8.html">local</a> delivery agent understands
UNIX-style mailboxes, <b>sendmail</b>-style system-wide <a
href="aliases.5.html">alias</a> databases, and <b>sendmail</b>-style
per-user <a href="aliases.5.html">.forward</a> files.  Multiple
local delivery agents can be run in parallel, but parallel delivery
to the same user is usually limited.

<p>

Together with the <a href="sendmail.1.html">sendmail</a> mail
posting agent, the <a href="local.8.html">local</a> delivery agent
implements the familiar Sendmail user interface.

<p>

The <a href="local.8.html">local</a> delivery agent has hooks for
alternative forms of local delivery:  you can configure it to
deliver to mailbox files in user home directories, and you can even
configure it to delegate mailbox delivery to an external command
such as the popular <a href="faq.html#procmail">procmail</a> program.

<p>

<li>The <a href="virtual.8.html">virtual</a> delivery agent is a
very much stripped down version of the local delivery agent that
delivers to mailboxes only. This is the most secure Postfix delivery
agent, because it does not aliases expansions and no .forward file
expansions. 

<p>

This delivery agent can deliver mail for multiple domains, which
makes it especially suitable for hosting lots of small domains on
a single machine.

<p>

<li>The <a href="smtp.8.html">SMTP client</a> looks up a list of
mail exchangers for the destination host, sorts the list by
preference, and tries each address in turn until it finds a server
that responds.  On a busy Postfix system you will see several SMTP
client processes running in parallel.

<p>

<li>The <a href="lmtp.8.html">LMTP client</a> speaks a protocol
similar to SMTP. The client can connect to local or remote mailbox
servers such as Cyrus. All the queue management is done by Postfix.
The advantage of this setup is that one Postfix machine can feed
multiple mailbox servers over LMTP. The opposite is true as well:
one mailbox server can be fed over LMTP by multiple Postfix machines.

<p>

<li>The <a href="pipe.8.html">pipe mailer</a> is the outbound
interface to other mail transports (the <a
href="sendmail.1.html">sendmail</a> program is the inbound interface).
The Postfix mail system comes with <a href="faq.html">examples</a>
for delivery via the <b>UUCP</b> protocol. At the time of writing,
this venerable protocol is still widely used. By default, Postfix
understands <a href="rewrite.html#standard">bang path</a> style
addresses.

</ul>

<hr>

<a href="index.html">Up one level</a> | <a
href="receiving.html">Receiving Mail</a> | Delivering Mail | <a
href="backstage.html">Behind the Scenes</a> | <a
href="commands.html">Command-line Utilities</a>

</body>

</html>