Show an Item
Beginning with V8.7 sendmail, two rule-testing
commands became available: the =S command displays
all the rules in a given rule set, and the =M
command displays all the delivery agents. Both display their items
after the configuration has been read. Thus, in the case of rules,
all the macros will have already been expanded.
Both commands are triggered by the leading =
character. If nothing follows the =, this usage
message is printed:
Usage: =Sruleset or =M
If any character other than S or
M follows the = character, the
following error is printed:
Unknown "=" command =bad character hereShow Rules in a Rule Set with =S
The
=S rule-testing command causes
sendmail to show all the rules of a rule set.
The form of this command looks like this:
=SrulesetOptional whitespace can separate the ruleset
from the S. The ruleset can
be a number or a symbolic name (Section 19.1.2):
=S0 ←a number =SMyrule←a name
Note that, although sendmail macros can be used
in defining rule sets (Section 19.1.4), they cannot be
used with the =S command:
> =S$X
invalid ruleset name: "$X"
Undefined ruleset $X
>One use for the =S command is to determine why a
rule set is not behaving as expected. Consider a rule set named
LocalizeSender that is intended to rewrite all
sending addresses so that the local host’s name
makes the message appear as though it came from the mail hub machine.
Suppose that, when testing, you send an address through that rule but
it comes out unchanged:
> LocalizeSender bob@localhost ...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