Prev | Current Page 1183 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"


18.9.17 $+
Match one or more tokens LHS operator
The $+ operator is very handy when you need to match at least one token in the workspace.
For example, recall that the host part of an address containing zero tokens is bad,
but one containing one or more tokens is good:
george@ ?†? zero tokens is bad
george@wash ?†? one token is good
george@wash.dc.gov ?†? many tokens is good
A rule that seeks to match the host part of an address might look like this:
R $- @ $+ $: $1 < @ $2 >
Here, the LHS matches any complete address??”that is, an address that contains a user part
that is a single token (such as george), an @ character, and a host part that is one or more
* At your site, you might have customized sendmail to allow dotted usernames (suchas first.lastname), which
are composed of three tokens. We ignore such usernames for this discussion.
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
680 | Chapter 18: The R (Rules) Configuration Command
tokens (suchas wash or wash.dc.gov).* Any address that matches is rewritten by the RHS to
focus on the host part. Focusing an address means to surround the host part in angle
braces. Thus, for example, george@wash will become george<@wash>.
Note that the $+ operator can be used only on the LHS of rules, and can be referenced by a
$digit operator on the RHS.


Pages:
1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195
London Escort Agencies Rec 3 film życzenia z okazji urodzin pozycjonowanie śmieszne dowcipy