$#
Specify return for a policy-checking rule set RHS check operator
The $#
RHS operator
serves two functions. The first is to select a
delivery agent, and the second is to return the
status of a policy-checking rule set (such as
check_mail
).
When used as a prefix to the RHS in one of the
policy-checking rule sets, the $#
operator tells
sendmail that the message
should be either rejected, discarded, or accepted.
Consider the following three rules:
R $* $| REJECT $# error $@ 5.7.1 $: "550 Access denied" R $* $| DISCARD $# discard $: discard R $* $| OK $# OK
The first rule shows how the $#
prefix is used in the RHS to specify
the error
delivery agent, which will cause the message to be
rejected.[259] The error
delivery agent is fully described
in error on page 720.
The second rule shows how the $#
prefix is used in the RHS to specify
the discard
delivery agent, which will cause the message to be
simply discarded. The discard
delivery agent is fully
described in discard on page
719.
The last rule shows how the $#
prefix is used in the RHS to specify
that the message is acceptable, and that it is OK to
deliver it.
Note that the $#
in
the RHS must be used as a prefix or it loses its
special meaning. See Return a Selection: $#
on page 667 for a full description of this
operator.
[259] * For some policy
rule sets, such as check_vrfy
, instead of rejecting the
whole message, the action (such as SMTP VRFY) is
denied.
Get sendmail, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.