Prev | Current Page 1380 | Next

Bryan Costales, Claus Assmann, George Jansen, Gregory Shapiro

"sendmail, 4th Edition"

For example,
consider the following:
DAxxx
DByyy
DC$A.$B
DD$C.zzz
Here, the text for the macro D is $C.zzz. When the D macro is defined, it is recursively
expanded like this:
$D becomes?†’ $C.zzz
$C.zzz becomes?†’ $A.$B.zzz
$A.$B.zzz becomes?†’ xxx.$B.zzz
xxx.$B.zzz becomes?†’ xxx.yyy.zzz
Notice that when sendmail recursively expands a macro, it does so one macro at a
time, always expanding the leftmost macro first.
In rules, when sendmail expands a macro, it also tokenizes it. For example, placing
the earlier $D in the following rule??™s LHS:
R$+ @ $D $1
causes the LHS to contain seven tokens rather than three:
R$+ @ xxx . yyy . zzz $1
Note that the largest a recursive expansion can grow is defined at compile time with
the MACBUFSIZE compile-time macro (?§3.4.22 on page 120), which defaults to
4,096 characters.
21.5.2 When Is a Macro Expanded?
A sendmail macro can be expanded either immediately or at runtime, depending on
where the expansion takes place in the configuration file.
Macros are expanded in rule sets as the configuration file is read and parsed by sendmail,
and (beginning withV8.7) so are macros in rule set names (?§19.1.4 on page
686) and in database maps declared withth e K configuration command (?§23.2 on
page 882). In other configuration lines, expansion is deferred until sendmail actually
needs to use that value.


Pages:
1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392
życzenia ślubne katalog stron kancelaria notarialna Warszawa pozycjonowanie dieta light