Configuration Lines
Selected configuration file lines can be entered in rule-testing mode. They will behave just as they do when being read from the configuration file. For V8.8 sendmail and above, three configuration commands are honored:
#Commands that begin with a
#are treated as comments and ignored. Blank lines are also ignored.DThe
Dconfiguration command (Section 21.3) is used to define a sendmail macro. Both single-character and multicharacter sendmail macro names can be used.CThe
Cconfiguration command (Section 22.1) is used to add a value to a class. Both single-character and multicharacter class names can be used.
The # can begin a
line. The other two configuration commands in rule-testing mode must
begin with a dot:
.D{ntries} 23
.Cw localhostFailure to use a dot will produce this error message:
Undefined ruleset Cw
The use of any character other than the two listed will produce this error:
Unknown "." command .bad command hereTo get a usage message, just type a dot:
> .
Usage: .[DC]macro value(s)Define a Macro with .D
The .D
rule-testing command is used to define a
sendmail macro. One use for this command might
be to modify a rule that depends on the $&
prefix (Section 21.5.3). For example, consider this
small configuration file that contains a rule in
parse rule set 0 that is intended to deliver a
local user’s address via the
local delivery agent:
V10 Sparse=0 R$+ $#local $@ $&X $: $1
If $X has a value, this rule returns that value as
the host (the $@) part of a
parse ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access