try to preserve To, etc (or translate from Apparently-To)
[unix-history] / usr / src / libexec / bugfiler / bug.h
CommitLineData
70c98dc6
KB
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 *
24213599 6 * @(#)bug.h 5.5 (Berkeley) %G%
70c98dc6
KB
7 */
8
24213599 9#define BUGS_HOME "owner-bugs@ucbvax.Berkeley.EDU"
70c98dc6 10#define BUGS_ID "bugs"
24213599 11#define MAIL_CMD "/usr/lib/sendmail -i -t -F \"Bugs Bunny\" -f owner-bugs"
70c98dc6
KB
12
13/*
14 * the METOO definition has the bugfiler exit with an error (-1) status
f16d4b82
KB
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.
70c98dc6
KB
20 */
21#define METOO
22
70c98dc6 23/* files */
3dc98623
KB
24#define ACK_FILE "bug:ack" /* acknowledge file */
25#define DIST_FILE "bug:redist" /* redistribution file */
70c98dc6
KB
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 */
f16d4b82 30#define TMP_DIR "errors" /* tmp directory */
70c98dc6 31
70c98dc6
KB
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
41typedef 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;
3dc98623 49extern HEADER mailhead[];
70c98dc6
KB
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 */
24213599 60#define APPAR_TO_TAG 9 /* "Apparently-To:" offset */
70c98dc6
KB
61
62/* so sizeof doesn't return 0 */
63#include <sys/param.h>
3dc98623
KB
64#include <sys/dir.h>
65extern 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 */