Name
error
Synopsis
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
Delivery Status Notification (DSN, 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
Each part is separated from the others with dot characters. There can be no space around the dots. The parts are numeric, and the meanings are as follows:
- success
Was the overall delivery ...
Get Sendmail, 3rd 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.