DSN versus exit(2) values with $@ of $#error
DSN exit(2) String Meaning
2.*.* EX_OK Successful delivery
4.*.* EX_TEMPFAIL tempfail Temporary failure, will keep trying
*.0.* EX_UNAVAILABLE unavailable Other address status
*.1.0 EX_DATAERR Other address status
*.1.1 EX_NOUSER nouser Address is that of a bad mailbox
*.1.2 EX_NOHOST nohost Address of recipient is bad
*.1.3 EX_USAGE usage Address of recipient has bad syntax
*.1.4 EX_UNAVAILABLE unavailable Address is ambiguous
*.1.5 EX_CONFIG Address of destination is valid
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc. All rights reserved.
722 | Chapter 20: The M (Mail Delivery Agent) Configuration Command
To illustrate, consider the need to reject all mail from a particular host (such as, say,
evilhost.domain). We want to reject that host for security reasons, so we might set up
a rule such as this:
R$* < @ evilhost.domain > $* $#error $@ 5.7.1 $: You are bad, go away
Here, the number following the $@ contains a dot, so it is interpreted as a DSN status
expression. The .7. causes sendmail to set its exit value to EX_DATAERR. The 5.7.1
is defined in RFC1893 as meaning ???Permanent failure, delivery not authorized, message
refused.???
If the number following the $@ does not contain a dot, sendmail sets its exit(2) value
to that number.
Pages:
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264