Prev | Current Page 1513 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"

domain
from the workspace, so that text is used to rewrite the new workspace.
Note that prior to V8, when sendmail looked up the workspace to check for a
matchto a class, it looked up only a single token. V8 sendmail allows multitoken
class matching.
22.2.2 Matching Any Token Not in a Class: $~
The $~ prefix is used to match any single token in the workspace that is not in a
class. It is used fewer than a dozen times in a typical production configuration file,
but when the need for its properties arises, it can be very useful.
To illustrate, consider a network with three PC machines on it. The PC machines
cannot receive mail, whereas all the other machines on the network can. If the list of
PC hostnames is defined in the class {PChosts}:
C{PChosts} pc1 pc2 pc3
a rule can be designed that will match any but a PC hostname:
R $* < @ $~{PChosts} > $@ $1 < @ $2 > filter out the PC hosts
Here the LHS looks for an address of the form:
"user" "<" "@" "not-a-PC" "">
This matches only if the @ token is not followed by one of the PC hosts listed in class
$={PChosts}. If the part of the workspace that is tested against the list provided by $~
is found in that list, the match fails.
Note that the $digit positional operator in the RHS (the $2 in the preceding example)
references the part that matches $~{PChosts}. That is, $2 references the token in
the workspace that is not in the class {PChosts}.


Pages:
1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525
reklama noclegi Władysławowo typy bukmacherskie życzenia ślubne bajka