1 /* $NetBSD: mail_error.c,v 1.2 2020/03/18 19:05:16 christos 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 "data (MAIL_ERROR_DATA)" 27 /* A message could not be delivered because a critical data 28 /* file was unavailable. 29 /* .IP "policy (MAIL_ERROR_POLICY)" 30 /* Policy violation. This depends on what restrictions have 31 /* been configured locally. 32 /* .IP "protocol (MAIL_ERROR_PROTOCOL)" 33 /* Protocol violation. Something did not follow the appropriate 34 /* standard, or something requested an unimplemented service. 35 /* .IP "resource (MAIL_ERROR_RESOURCE)" 36 /* A message could not be delivered due to lack of system 37 /* resources, for example, lack of file system space. 38 /* .IP "software (MAIL_ERROR_SOFTWARE)" 39 /* Software bug. The author of this program made a mistake. 40 /* Fixing this requires change to the software. 41 /* SEE ALSO 42 /* name_mask(3), name to mask conversion 43 /* LICENSE 44 /* .ad 45 /* .fi 46 /* The Secure Mailer license must be distributed with this software. 47 /* AUTHOR(S) 48 /* Wietse Venema 49 /* IBM T.J. Watson Research 50 /* P.O. Box 704 51 /* Yorktown Heights, NY 10598, USA 52 /*--*/ 53 54 /* System library. */ 55 56 #include <sys_defs.h> 57 58 /* Utility library. */ 59 60 /* Global library. */ 61 62 #include "mail_error.h" 63 64 /* 65 * The table that maps names to error bit masks. This will work on most UNIX 66 * compilation environments. 67 * 68 * In a some environments the table will not be linked in unless this module 69 * also contains a function that is being called explicitly. REF/DEF and all 70 * that. 71 */ 72 const NAME_MASK mail_error_masks[] = { 73 "bounce", MAIL_ERROR_BOUNCE, 74 "2bounce", MAIL_ERROR_2BOUNCE, 75 "data", MAIL_ERROR_DATA, 76 "delay", MAIL_ERROR_DELAY, 77 "policy", MAIL_ERROR_POLICY, 78 "protocol", MAIL_ERROR_PROTOCOL, 79 "resource", MAIL_ERROR_RESOURCE, 80 "software", MAIL_ERROR_SOFTWARE, 81 0, 0, 82 }; 83