| 1 | /* |
| 2 | * Copyright (c) 1986 Regents of the University of California. |
| 3 | * All rights reserved. The Berkeley software License Agreement |
| 4 | * specifies the terms and conditions for redistribution. |
| 5 | * |
| 6 | * @(#)bug.h 5.5 (Berkeley) %G% |
| 7 | */ |
| 8 | |
| 9 | #define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU" |
| 10 | #define BUGS_ID "bugs" |
| 11 | #define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs" |
| 12 | |
| 13 | /* |
| 14 | * the METOO definition has the bugfiler exit with an error (-1) status |
| 15 | * if there's a problem. This causes sendmail to send off a copy of the |
| 16 | * report (as failed mail) to the "owner" of the mail alias that executed |
| 17 | * the bugfiler. This is great if you would have otherwise lost the bug |
| 18 | * report. It's not so great if you get a whole bunch of mail that you |
| 19 | * really don't want. |
| 20 | */ |
| 21 | #define METOO |
| 22 | |
| 23 | /* files */ |
| 24 | #define ACK_FILE "bug:ack" /* acknowledge file */ |
| 25 | #define DIST_FILE "bug:redist" /* redistribution file */ |
| 26 | #define ERROR_FILE "log" /* error file */ |
| 27 | #define LOCK_FILE "bug:lock" /* lock file name */ |
| 28 | #define SUMMARY_FILE "summary" /* summary file */ |
| 29 | #define TMP_BUG "errors/BUG_XXXXXX" /* tmp bug report */ |
| 30 | #define TMP_DIR "errors" /* tmp directory */ |
| 31 | |
| 32 | #define CHN (char *)NULL /* null arg string */ |
| 33 | #define COMMENT '#' /* comment in redist file */ |
| 34 | #define EOS (char)NULL /* end of string */ |
| 35 | #define ERR -1 /* error return */ |
| 36 | #define MAXLINELEN 200 /* max line length in message */ |
| 37 | #define NO 0 /* no/false */ |
| 38 | #define OK 0 /* okay return */ |
| 39 | #define YES 1 /* yes/true */ |
| 40 | |
| 41 | typedef struct { |
| 42 | short found, /* line number if found */ |
| 43 | redist; /* if part of redist headers */ |
| 44 | int (*valid)(); /* validation routine */ |
| 45 | short len; /* length of tag */ |
| 46 | char *tag, /* leading tag */ |
| 47 | *line; /* actual line */ |
| 48 | } HEADER; |
| 49 | extern HEADER mailhead[]; |
| 50 | |
| 51 | #define DATE_TAG 0 /* "Date:" offset */ |
| 52 | #define FROM_TAG 1 /* "From " offset */ |
| 53 | #define CFROM_TAG 2 /* "From:" offset */ |
| 54 | #define INDX_TAG 3 /* "Index:" offset */ |
| 55 | #define MSG_TAG 4 /* "Message-Id:" offset */ |
| 56 | #define RPLY_TAG 5 /* "Reply-To:" offset */ |
| 57 | #define RET_TAG 6 /* "Return-Path:" offset */ |
| 58 | #define SUBJ_TAG 7 /* "Subject:" offset */ |
| 59 | #define TO_TAG 8 /* "To:" offset */ |
| 60 | #define APPAR_TO_TAG 9 /* "Apparently-To:" offset */ |
| 61 | |
| 62 | /* so sizeof doesn't return 0 */ |
| 63 | #include <sys/param.h> |
| 64 | #include <sys/dir.h> |
| 65 | extern char bfr[MAXBSIZE], /* general I/O buffer */ |
| 66 | dir[MAXNAMLEN], /* subject and folder */ |
| 67 | folder[MAXNAMLEN], |
| 68 | tmpname[sizeof(TMP_BUG) + 5]; /* temp bug file */ |