Postfix/flow

from HTYP, the free directory anyone can edit if they can prove to me that they're not a spambot
< Postfix
Revision as of 17:55, 12 June 2011 by Woozle (talk | contribs) (→‎About: there is now a subpage for local(8))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

About

There are multiple stages inside Postfix, and each stage can be affected by configuration parameters. I have not yet found a clear documentation of the data flow, but it seems to go like this (only much more complicated) under normal circumstances:

SMTP → Postfix delivery queue → user alias mappings → local delivery (MDA, e.g. Dovecot)

However, when using virtual (non-system) users, internally-generated emails (e.g. mail from cron or PHP's mail() function) seem to bypass the alias mappings, which the MDA then rejects if they are addressed to an alias instead of a user.

A table from the official documentation is more detailed (the "-<" between the last two boxes in the original document is apparently intended to indicate rightward movement with a fan-out, i.e. the message may go through any of the 3 sub-boxes on the right; it has been replaced with "->" here).

trivial-
rewrite(8)

(std form)
trivial-
rewrite(8)

(resolve)
^
|
|
v
^
|
|
v
smtpd(8) >- cleanup(8) -> incoming -> active -> qmgr(8) -> smtp(8)
qmqpd(8) lmtp(8)
pickup(8) local
^
|
^
|
|
v
bounces
forwarding
notices
deferred

There are two more diagrams here; the first shows the input stage in a bit more detail, and the second shows the delivery stage. There are two more diagrams here, showing where filtering takes place.