8.6 The Flow of Addresses Through RulesWhen rule sets contain many rules, addresses flow from the first rule that is declared through the last (top down). To illustrate, remove the demo rule that you added to the client.cf file, and replace it with three new demo rules:
Rleft.side new.stuff remove Remember that the LHS of each rule must be separated from the RHS by one or more tab characters.
Before you test these new rules,
consider what they do. The first rule
rewrites any Now run sendmail in rule-testing mode once again:
%
Enter rule set 0 and the letter
>
This shows that any
x the original workspace exact match, so: ``true'' Rx y first rule rewrites y the workspace to be this does not match, so skip Rz x second rule y the workspace is still this does not match, so skip Rx w third rule y the workspace is still this
The important point here is that each rule matches its LHS
to the
current
contents of the workspace. Preceding rules
may have modified that workspace. The third rule, for example,
tries to match an
Now enter rule set 0 and the letter
>
Notice that any
z the original workspace does not match, so skip Rx y first rule z the workspace remains this exact match, so ... Rz x second rule rewrites x the workspace to be this exact match, so ... Rx w third rule rewrites w the workspace to be this
In this instance the first rule does nothing. The second rule matches the
Now feed one more letter into
sendmail
in rule-testing mode.
This time, enter anything other than an
>
Here, the workspace remains unchanged
because |
|