Recall that the
file that we have been developing
has two purposes: to forward all mail to a central mail hub for
processing and to make all mail appear as though it originated from
the hub. The first purpose was fulfilled by the creation of a rule set
0 that always selects the
But first, to review, recall also that the recipient's address is first
processed by rule set 3 and then by rule set 0.
Rule set 3 finds an address
among other text and cleans up the address by removing nested angle brackets.
After that, rule set
0 selects a delivery agent on the basis of the recipient's address.
If the address is bad, rule set 0 selects the
When sendmail begins processing a mail message for delivery, it first looks for the envelope  recipients. Each recipient address that is found is first processed by rule set 3, and then by rule set 0, which selects a delivery agent.
After appropriate delivery agents have been selected for all recipients,
processes the sender's address. There is usually only a single sender
for any given mail message. The sender's address (or addresses)
may appear in the envelope or in a
As shown in
the address is processed by rule set 3 first and then by
rule set 1. Then, for each recipient in the list of recipients,
each sender's address is custom processed by the rule set
specified in the recipient delivery agent's
We will examine the custom