For example, consider the following two sets of rules:
# first set
S21
R $*.. $:$>22 $1. strip extra trailing dots
...etc.
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
666 | Chapter 18: The R (Rules) Configuration Command
# second set
S22
R $*.. $1. strip trailing dots
Here, the first set of rules contains, among other things, a single rule that removes
extra dots from the end of an address. But because other rule sets might also need
extra dots stripped, a subroutine (the second set of rules) is created to perform that
task.
Note that the first rule strips one trailing dot from the workspace and then calls rule
set 22 (the $>22), which then strips any additional dots. The workspace, as rewritten
by rule set 22, becomes the workspace yielded by the RHS in the first rule. The $:
prevents the LHS of the first rule from looking for a match a second time.
Prior to V8.8 sendmail, the subroutine call must begin the RHS (immediately follow
any $@ or $: prefix, if any), and only a single subroutine can be called. That is, the following
causes rule set 22 to be called but does not call 23:
$>22 xxx $>23 yyy
Instead of calling rule set 23, the $> operator and the 23 are copied as is into the
workspace, and that workspace is passed to rule set 22:
xxx $> 23 yyy ?†? passed to rule set 22
Beginning withV8.
Pages:
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171