Prev | Current Page 1148 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"

Earlier versions of sendmail
would hang forever.
Note that you can avoid the chance of accidental loops by using special prefix operators
on the RHS, as described in ?§18.7.2 on page 662 and ?§18.7.3 on page 664.
18.6 The LHS
The LHS of any rule is compared to the current contents of the workspace to determine
whether the two match. Table 18-2 displays a variety of special operators
offered by sendmail that make comparisons easier and more versatile.
The first three operators in Table 18-2 are wildcard operators, which can be used to
match arbitrary sequences of tokens in the workspace. Consider the following rule,
which employs the $- operator (match any single token):
R $- fred.local
Here, a matchis found only if the workspace contains a single token (suchas tom). If
the workspace contains multiple tokens (such as tom@host), the LHS does not
match. A match causes the workspace to be rewritten by the RHS to become
fred.local. The rewritten workspace is then compared again to the $-, but this time
there is no match because the workspace contains three tokens (fred, a dot [.], and
local). Because there is no match, the current workspace (fred.local) is carried
down to the next rule (if there is one).
The $@ operator (introduced in V8 sendmail) matches an empty workspace. Merely
omitting the LHS won??™t work:
RtabRHS ?†? won??™t work
R $@tabRHS ?†? will work
Table 18-2.


Pages:
1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160
zdjęcia ślubne warszawa dieta light życzenia wierszyki Kapitalne mieszkania do wynajęcia Warszawa