error
Perform a policy-based rejection All versions
All versions of sendmail define a
special internal delivery agent called error
that is designed
to aid in the issuance of error messages. It is
always available for use in the parse
rule set 0, the
localaddr
rule
set 5, and the Local_check
and other policy setting
rule sets. It cannot be defined with an M
command.
Beginning with V8.7, the form for using the error
agent in the RHS
of a rule looks like this:
R... $#error $@ dsnstat $: text of error message here
In general terms, the text following the $
: is the actual error
message that will be included in bounced mail and
sent back to a connecting SMTP host. For example,
the following rule in the parse
rule set 0 would cause all mail
to the local user George Washington to
bounce:
RGeorge.Washington $#error 5.1.1 $: 553 George doesn't sleep here anymore
with an error message such as this:
553 5.1.1 <george.washington>... George doesn't sleep here anymore
The $@ dsnstat part when used with the error delivery agent
The $@
part
of the error
delivery agent specifies either a literal quarantine
(Use rule sets to quarantine on page
442) or a DSN code. Here we describe the DSN
code.
Delivery Status Notification (DSN code, see RFC1893) provides a means for conveying the status of a message’s delivery. That status is conveyed in the form of a three-part numeric expression (so as to be easily parsed by machines). This expression is included in the “machine-readable” part of bounced messages:
success.category.detail ...
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.