Previous Section Next Section

$@

Rewrite once and return RHS prefix

The $@ operator, when used to prefix the RHS, tells sendmail that the current rule is the last one that should be used in the current rule set. If the LHS of the current rule matches, any rules that follow (in the current rule set) are ignored.

This $@ prefix also prevents the current rule from calling itself recursively. To illustrate, consider the following rule:

R $* . $*      $@ $1

The idea here is to strip the domain part of a hostname, and to return just the host part. That is, if the workspace contains wash.dc.gov, this rule will return wash. The $@ prefix to the RHS tells sendmail to return the rewritten workspace without processing any additional rules in the current rule set, and to allow the LHS to match only once.

Note that the $@ prefix can prefix only the RHS. This operator is described further in Section 18.7.3 of this chapter.

    Previous Section Next Section