|
|
1.1 root 1: #ifndef _d_
2: #define _d_
3:
4: #define MAXSAME 16
5: #define MAXSAMECHAR 128
6:
7: /* status of a destination */
8: typedef enum {
9: d_undefined, /* address has not been matched */
10: d_pipe, /* repl1|repl2 == delivery command, rep */
11: d_cat, /* repl1 == mail file */
12: d_translate, /* repl1 == translation command */
13: d_alias, /* repl1 == translation */
14: d_auth, /* repl1 == command to authorize */
15: d_syntax, /* addr contains illegal characters */
16: d_unknown, /* addr does not match a rewrite rule */
17: d_loop, /* addressing loop */
18: d_eloop, /* external addressing loop */
19: d_noforward, /* forwarding not allowed */
20: d_badmbox, /* mailbox badly formatted */
21: d_resource, /* ran out of something we needed */
22: d_pipeto, /* pipe to from a mailbox */
23: } d_status;
24:
25: /* a destination */
26: typedef struct dest dest;
27: struct dest {
28: dest *next; /* for chaining */
29: dest *same; /* dests with same cmd */
30: dest *parent; /* destination we're a translation of */
31: string *addr; /* destination address */
32: string *repl1; /* substitution field 1 */
33: string *repl2; /* substitution field 2 */
34: int pstat; /* process status */
35: int uid; /* authentication */
36: int gid;
37: d_status status; /* delivery status */
38: int authorized; /* non-zero if we have been authorized */
39: int nsame; /* number of same dests chained to this entry */
40: int nchar; /* number of characters in the command */
41: };
42:
43: /* dest routines */
44: extern dest *d_new();
45: extern void d_free();
46: extern dest *d_rm();
47: extern void d_insert();
48: extern dest *d_rm_same();
49: extern void d_same_insert();
50: extern dest *s_to_dest();
51:
52: /* rewrite rule types */
53: #endif
54:
55:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.