home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

$#

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, 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 either be 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.[16] The error delivery agent is fully described in error.

[16] For some policy rule sets, such as check_vrfy, instead of rejecting the whole message the action (such as SMTP VRFY) is denied.

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.

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 Section 18.7.5 for a full description of this operator.

    Previous Section Next Section