Prev | Current Page 1511 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"


This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
22.2 Access Classes in Rules | 863
One possible pitfall is the temptation to define an identical class macro??™s values in
both your domain record and individual host records. If you do, the lookup will be
additive, adding record values from both the domain and the host records.
22.2 Access Classes in Rules
Class macros are useful only in the LHS of rules. The sendmail program offers two
ways to use them:
$=X
The $= prefix causes sendmail to seek a matchbetween the workspace and one of
the words in a class list.*
$~X
The $~ prefix causes sendmail to accept only a single token in the workspace that
does not match any of the words in a class list.
22.2.1 Matching Any in a Class: $=
The list of words that form a class are searched by prefixing the class name with the
characters $=:
R$=X $@<$1>
In this rule, the expression $=X causes sendmail to search a class for the word that is
in the current workspace. If sendmail finds that the word has been defined, and if it
finds that the word is associated with the class $=X, only then is a match made.
The matching word is made available for use in the RHS rewriting. Because the value
of $=X is not known ahead of time, the matched word can be referenced in the RHS
with the $digit positional operator.


Pages:
1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523
katalog stron Tango Olsztyn gustowne meble katowice wierszyki gry strategie