home *** CD-ROM | disk | FTP | other *** search
/ Netscape Plug-Ins Developer's Kit / Netscape_Plug-Ins_Developers_Kit.iso / SOFTWARE / lsoft / unix / common.tz / common / lsv_amin.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-12-31  |  3.1 KB  |  86 lines

  1.  
  2. /* LOG_FACILITY is passed as the third argument to the openlog() system
  3.  * call.  You can change LOG_FACILITY to redirect the syslog entries
  4.  * created by LSV_AMIN as you like.  If your system's openlog() doesn't
  5.  * have a "facility" option, just set LOG_FACILITY to 0.
  6.  */
  7. #define LOG_FACILITY LOG_MAIL
  8.  
  9. /* MAX_BODY_BUFFER is the size (in K-bytes) of the internal buffer used
  10.  * by LSV_AMIN when scanning mail messages for delivery error indicators.
  11.  * If the buffer is exhausted while scanning, LSV_AMIN will create a
  12.  * syslog entry to that effect.
  13.  */
  14. #ifndef MAX_BODY_BUFFER
  15. #define MAX_BODY_BUFFER 80
  16. #endif
  17.  
  18. /* MAX_BODY_LINES defines the number of lines LSV_AMIN will scan in a
  19.  * mail delivery error looking for the cause and target userid.  If
  20.  * you are receiving delivery errors with lots of chit-chat prepended
  21.  * to the actual sendmail "transaction log", thenyou might have to
  22.  * increase MAX_BODY_LINES (and possibly MAX_BODY_BUFFER).
  23.  */
  24. #ifndef MAX_BODY_LINES
  25. #define MAX_BODY_LINES 60
  26. #endif
  27.  
  28. /* If no spool directory is specified on the command line (either as
  29.  * the first non-flagged argument, or following a "-s" flag), then
  30.  * SPOOL_DIR will be used as the full pathname of the LISTSERV spool 
  31.  * directory.  The Makefile delivered with LISTSERV will automatically
  32.  * define this macro using the $LSVSPOOL symbol.  You can leave the
  33.  * directory off your alias file entries now using flags to set the
  34.  * other arguments.  For example,
  35.  *
  36.  * owner-test-l: "|/usr/listserv/lsv_amin -t owner-test-l"
  37.  */
  38. #ifndef SPOOL_DIR
  39. #define SPOOL_DIR "/var/spool/listserv"
  40. #endif
  41.  
  42. /* LISTSERV will prepend the ErrInsert string to the body of any
  43.  * mail delivery errors it recognizes.
  44.  */
  45. #define ErrInsert \
  46. "\n\nAn error was detected while processing the enclosed message. A list of\
  47. \nthe affected recipients follows. This list is in a special format that\
  48. \nallows software like LISTSERV to automatically take action on incorrect\
  49. \naddresses.\n\n"
  50.  
  51. struct SM_Err_type {
  52.   char *err_msg;
  53.   int err_type;
  54. };
  55.  
  56. /* SM_Err_type holds a list of "reasons" LSV_AMIN recognizes, and an
  57.  * associated LISTSERV error code. LISTSERV currently recognizes the
  58.  * following codes:
  59.  *
  60.  * 0 - Unknown or unclassifiable errors.
  61.  * 1 - There is no such host, or the address is otherwise invalid.
  62.  * 2 - Configuration error found trying to deliver the mail.
  63.  * 3 - Non-existant user.
  64.  *
  65.  * Provided a mailing list is setup with Auto-Delete enabled, any
  66.  * code 1 or code 3 errors result in the indicated address being
  67.  * removed from the mailing list.  Therefore, only permanent and
  68.  * unambiguous errors should be classified as type 1 or 3.  All
  69.  * code 0 or 2 errors are simply forwarded to the list owner.  You
  70.  * can add as many new entries as you like (in any order) so long
  71.  * as the first error message in the list has a code of 0.
  72.  */
  73.  
  74. struct SM_Err_type err_list[] =
  75. { { "*default*", 0},            /* this entry must be code 0... */
  76.   { "Can't create output", 0},
  77.   { "No space left on device", 0},
  78.   { "Deffered: Connect refused", 0}, 
  79.   { "Host unknown", 1},
  80.   { "550 Host unknown", 1},
  81.   { "error -- Bad system name", 1},
  82.   { "Mail loop detected", 2},
  83.   { "User unknown", 3},
  84.   { "user unknown", 3}
  85. };
  86.