Rule sets are declared in the configuration file by beginning a line
with the letter
Rule sets are identified either by number or symbolic name. When identified by name, a number is internally assigned by sendmail. An optional = and number may follow a name to force specific association of number to name.
Rule sets numbered 0 through 9 are reserved for sendmail's internal use. Addresses are rewritten by a specific sequence of rules numbered 0 through 4 (see Figure 2.1).
Rewrites all addresses to prepare them for entry into the sequence for rule sets. It usually focuses on the host part of an address and detects the various forms of the local hostname, so that local delivery can take place (see §29.4).
Undoes any special rewriting done by rule set 3. Rule set 4 is always last (see §29.5).
Selects a delivery agent that determines the R= and S= rule sets. It also selects the recipient user (which is separately rewritten and placed into $u) and the recipient host (which is placed as-is into $h). (See §.29.6)
Rewrites all sender addresses (see §29.9).
Rewrites all recipient addresses (see §29.8).
(Not shown in Figure 2.1.) Can select a new delivery agent (just like rule set 0). If the address is not matched in the aliases(5) database, it is passed to rule set 5. Addresses are given to rule set 5 before ~/.forward files are processed (see §29.7).