8.1 Overview
The following command runs sendmail in
rule-testing mode:
% /usr/sbin/sendmail -bt
At first, the output produced by this command line prompts you like
this:
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
>
The "ruleset 3" statement says
that, beginning with V8 (and IDA) sendmail, the
canonify rule set 3 is no longer automatically
called when rule sets are listed at the prompt. We cover this
property in detail in Section 8.6.2.
Prior to V8 sendmail, rule-testing mode could be
used only to test addresses. But beginning with V8.7
sendmail new functions were added. To see a
summary of those functions, enter a ? character
followed by a RETURN at the > prompt. The output, which we
reproduce next, lists and gives a brief description of each function.
Note that the numbers to the right refer to sections in this chapter
and are not a part of
sendmail's output:
> ?
Help for test mode:
? :this help message.
.Dmvalue :define macro `m' to `value'. Section 8.2.1
.Ccvalue :add `value' to class `c'. Section 8.2.2
=Sruleset :dump the contents of the indicated ruleset. Section 8.4.1
=M :display the known mailers. Section 8.4.2
-ddebug-spec :equivalent to the command-line -d debug flag.
$m :print the value of macro $m. Section 8.3.1
$=c :print the contents of class $=c. Section 8.3.2
/mx host :returns the MX records for `host'. Section 8.5.2
/parse address :parse address, returning the value of crackaddr, and Section 8.5.5
the parsed address (same as -bv).
/try mailer addr :rewrite address into the form it will have when Section 8.5.6
presented to the indicated mailer.
/tryflags flags :set flags used by parsing. The flags can be `H' for Section 8.5.4
Header or `E' for Envelope, and `S' for Sender or `R'
for Recipient. These can be combined. `HR' sets
flags for header recipients.
/canon hostname :try to canonify hostname. Section 8.5.1
/map mapname key :look up `key' in the indicated `mapname'. Section 8.5.3
/quit :quit address test mode. V8.10 and above
rules addr :run the indicated address through the named rules. Section 8.6
Rules can be a comma-separated list of rules.
End of HELP info
>
This help output is contained in the
helpfile
file, the location of which is defined by the
HelpFile option (HelpFile). If
that option is not defined, or if the file specified does not exist,
you will get the following error message instead of help:
Sendmail 8.12 -- HELP not implemented
Help for rule-testing mode requires that the
helpfile both exist and contain lines that begin
with:
-bt
If you installed a new sendmail but did not
install the new help file (thus causing the old file to be used), you
might see this error:
HELP topic "-bt" unknown
The solution here is to upgrade your helpfile
file to the newest version.
Note that each function listed in the help output will also produce a
usage message if it is executed with no arguments. Consider the
/try function, for example:
> /try
Usage: /try mailer address
>
This parallels the syntax shown in the earlier help output. These
mini-usage messages can effectively replace the
helpfile file in case it is missing.
Finally, note that, although address testing was not listed in the
help output for V8.7 sendmail, it still existed.
|