1 /* $NetBSD: mail_error.c,v 1.1.1.1 2009/06/23 10:08:46 tron Exp $ */ 2 3 /*++ 4 /* NAME 5 /* mail_error 3 6 /* SUMMARY 7 /* mail error classes 8 /* SYNOPSIS 9 /* #include <mail_error.h> 10 /* 11 /* NAME_MASK mail_error_masks[]; 12 /* DESCRIPTION 13 /* This module implements error class support. 14 /* 15 /* mail_error_masks[] is a null-terminated table with mail error 16 /* class names and their corresponding bit masks. 17 /* 18 /* The following is a list of implemented names, with the 19 /* corresponding bit masks indicated in parentheses: 20 /* .IP "bounce (MAIL_ERROR_BOUNCE)" 21 /* A message could not be delivered because it was too large, 22 /* because was sent via too many hops, because the recipient 23 /* does not exist, and so on. 24 /* .IP "2bounce (MAIL_ERROR_2BOUNCE)" 25 /* A bounce message could not be delivered. 26 /* .IP "policy (MAIL_ERROR_POLICY)" 27 /* Policy violation. This depends on what restrictions have 28 /* been configured locally. 29 /* .IP "protocol (MAIL_ERROR_PROTOCOL)" 30 /* Protocol violation. Something did not follow the appropriate 31 /* standard, or something requested an unimplemented service. 32 /* .IP "resource (MAIL_ERROR_RESOURCE)" 33 /* A message could not be delivered due to lack of system 34 /* resources, for example, lack of file system space. 35 /* .IP "software (MAIL_ERROR_SOFTWARE)" 36 /* Software bug. The author of this program made a mistake. 37 /* Fixing this requires change to the software. 38 /* SEE ALSO 39 /* name_mask(3), name to mask conversion 40 /* LICENSE 41 /* .ad 42 /* .fi 43 /* The Secure Mailer license must be distributed with this software. 44 /* AUTHOR(S) 45 /* Wietse Venema 46 /* IBM T.J. Watson Research 47 /* P.O. Box 704 48 /* Yorktown Heights, NY 10598, USA 49 /*--*/ 50 51 /* System library. */ 52 53 #include <sys_defs.h> 54 55 /* Utility library. */ 56 57 /* Global library. */ 58 59 #include "mail_error.h" 60 61 /* 62 * The table that maps names to error bit masks. This will work on most UNIX 63 * compilation environments. 64 * 65 * In a some environments the table will not be linked in unless this module 66 * also contains a function that is being called explicitly. REF/DEF and all 67 * that. 68 */ 69 const NAME_MASK mail_error_masks[] = { 70 "bounce", MAIL_ERROR_BOUNCE, 71 "2bounce", MAIL_ERROR_2BOUNCE, 72 "delay", MAIL_ERROR_DELAY, 73 "policy", MAIL_ERROR_POLICY, 74 "protocol", MAIL_ERROR_PROTOCOL, 75 "resource", MAIL_ERROR_RESOURCE, 76 "software", MAIL_ERROR_SOFTWARE, 77 0, 0, 78 }; 79