4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
22 /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
23 /* All Rights Reserved */
26 #pragma ident "%Z%%M% %I% %E% SMI"
30 * Map mail(1) error into MTA reason-codes for negative delivery notification.
32 static char *MTAerrors
[] = {
34 /* 1 */ "Invalid Address Specification",
35 /* 2 */ "Ambiguous Originator/Recipient Name",
36 /* 3 */ "Message Transfer Agent Congestion",
37 /* 4 */ "Loop Detection",
38 /* 5 */ "Unavailable User Agent",
39 /* 6 */ "Expired Maximum Time",
40 /* 7 */ "Unsupported Encoded Information Types",
41 /* 8 */ "Prohibited Conversion",
42 /* 9 */ "Impractical Conversion",
43 /* 10 */ "Invalid Parameters",
44 /* 11 */ "Transfer Failure",
45 /* 12 */ "Inability To Transfer",
46 /* 13 */ "Conversion Not Performed",
47 /* 14 */ "Deferred Delivery Not Available",
48 /* 15 */ "Too many Recipients",
49 /* 16 */ "Mail Too Large For Destination To Receive"
52 void mta_ercode(outfile
)
57 case E_FROM
: /* too many From lines */
61 case E_SNDR
: /* invalid sender */
62 case E_USER
: /* invalid user */
66 case E_FRWL
: /* forwarding loop */
67 case E_UNBND
: /* Unbounded forwarding */
71 case 23: /* disallowed from sending binary to remote */
75 case E_SYNTAX
: /* syntax error */
80 case E_SURG
: /* surrogate command failed - rc != 0 || 99 */
84 case E_REMOTE
: /* unknown remote */
85 case E_FILE
: /* file error */
86 case E_FRWD
: /* cannot forward */
87 case E_PERM
: /* bad permissions */
88 case E_TMP
: /* temporary file problem */
89 case E_DEAD
: /* Cannot create dead.letter */
90 case E_LOCK
: /* cannot create lock file */
91 case E_GROUP
: /* no group id of 'mail' */
92 case E_MEM
: /* malloc failure */
93 case E_FORK
: /* could not fork */
94 case E_PIPE
: /* could not pipe */
95 case E_OWNR
: /* invoker does not own mailfile */
96 case E_DENY
: /* permission denied by mailsurr file */
100 case E_MBOX
: /* mbox problem */
102 if (sav_errno
!= EFBIG
) {
105 /* Note drop-thru... */
106 case E_SPACE
: /* no space */
110 fprintf(outfile
, "%.2d %s\n", mtacode
, MTAerrors
[mtacode
]);