Previous Section Next Section

$@

Specify DSN status in error-agent "triple" RHS delivery-agent operator

Beginning with V8.7, the RHS of a rule to select an error delivery agent can look like this:

R...          $#error $@ dsn  $: text of error message here 

The text following the $: is the actual error message text that will be included in bounced mail or sent back to a connecting SMTP host. The numbers following the $@ specify the DSN error to be returned. For example:

R$* < @ spam.host > $*        $#error $@ 5.7.1 $: 550 You are a spammer, go away

Here, the number following the $@ contains a dot, so it is interpreted as a DSN status expression. The .7. in the number causes sendmail to set its exit value to EX_DATAERR. The 5.7.1 itself is defined in RFC1893 as meaning "Permanent failure, delivery not authorized, message refused." Note that if the number following the $@ does not contain a dot, sendmail sets its exit(2) value to that number.

The use of $@ to specify the DNS return value for the error delivery agent is described in detail in error.

    Previous Section Next Section