If the workspace contains
ben<@philly>, the $2 references the philly.
Also note that multitoken expressions in the workspace will not match. That is, for
multitoken expressions in the workspace, $~ is not the opposite of $=. To illustrate,
consider this mini configuration file:
V10
CX hostA.com
Stest
R $~X $@ no $1 is not in X
R $=X $@ yes $1 is in X
R $* $@ neither
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
22.2 Access Classes in Rules | 865
Now feed a multitokened address through these rules in rule-testing mode:
% /usr/sbin/sendmail -Cx.cf -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter
> test hostC.com
test input: hostC . com
test returns: neither
Here, the rule set returned neither because a multitoken expression in the workspace
should never be used with $~. That is, $~ looks for a workspace that is not a
member of the class and, indeed, hostC.com is not. But because hostC.com is multitokened,
$~ acts as though it is a member of the class, and so does not call the RHS
of the rule:
R $~X ?†? a multitokened workspace will never call the RHS
If you consider multitokens and $~ as illegal to use together, this failure, although
convoluted, makes sense.
Another way to think of this failure is by comparing the $~ operator to the $- operator.
Pages:
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526