3 The "monolithic" model: recursively expand the complete initial
4 recipient list (via aliases, mailing lists, .forward files) to one
5 expanded recipient list (mail addresses, shell commands, files,
6 mailboxes). Sort/uniq the expanded recipient list, and deliver.
8 The "forward as if sent by recipient" model: each level of recursion
9 (aliases, mailing lists, forward files) takes one entire iteration
10 through the mail system. Non-recursively expand one local recipient
11 (via alias, mailing list, the recipient's .forward file) to a list
12 of expanded recipients. Sort/uniq the list and deliver by re-injecting
13 messages into the mail system. Since recipient expansion uses a
14 non-recursive algorithm, the mailer might loop indefinitely,
15 re-injecting messages into itself. These local forwarding loops
16 must be broken by stamping a message when it reaches the local
17 delivery stage (e.g., by adding a Delivered-To: message header).
19 The Postfix system uses a hybrid approach. It does recursive alias
20 expansion, but only one initial recipient at a time. It delivers
21 to expanded recipients by re-submitting the message into the mail
22 system, so it can keep track of the delivery status for each expanded
23 recipient. Because alias expansion does not look in .forward files,
24 it cannot prevent local forwarding loops. The Postfix system adds
25 Delivered: message headers to break local and external forwarding
28 Delivery status management
30 The "exact" model: maintain on file the delivery status of each
31 expanded recipient: remote recipients, shell commands and files,
32 including the privileges for delivery to shell commands and files.
34 The "safe" model: maintain on file only the delivery status of
35 non-sensitive destinations (local or remote addresses). Deliver to
36 sensitive destinations first (commands, files), but do not keep a
37 record of their status on file (including privileges). This means
38 that the mail system will occasionally deliver the same message
39 more than once to a file or command.