Postfix3.3.1
cleanup_user.h
[詳解]
1 #ifndef _CLEANUP_USER_H_INCLUDED_
2 #define _CLEANUP_USER_H_INCLUDED_
3 
4 /*++
5 /* NAME
6 /* cleanup_user 3h
7 /* SUMMARY
8 /* cleanup user interface codes
9 /* SYNOPSIS
10 /* #include <cleanup_user.h>
11 /* DESCRIPTION
12 /* .nf
13 
14  /*
15  * Client processing options. Flags 16- are reserved for cleanup.h.
16  */
17 #define CLEANUP_FLAG_NONE 0 /* No special features */
18 #define CLEANUP_FLAG_BOUNCE (1<<0) /* Bounce bad messages */
19 #define CLEANUP_FLAG_FILTER (1<<1) /* Enable header/body checks */
20 #define CLEANUP_FLAG_HOLD (1<<2) /* Place message on hold */
21 #define CLEANUP_FLAG_DISCARD (1<<3) /* Discard message silently */
22 #define CLEANUP_FLAG_BCC_OK (1<<4) /* Ok to add auto-BCC addresses */
23 #define CLEANUP_FLAG_MAP_OK (1<<5) /* Ok to map addresses */
24 #define CLEANUP_FLAG_MILTER (1<<6) /* Enable Milter applications */
25 #define CLEANUP_FLAG_SMTP_REPLY (1<<7) /* Enable SMTP reply */
26 #define CLEANUP_FLAG_SMTPUTF8 (1<<8) /* SMTPUTF8 requested */
27 #define CLEANUP_FLAG_AUTOUTF8 (1<<9) /* Autodetect SMTPUTF8 */
28 
29 #define CLEANUP_FLAG_FILTER_ALL (CLEANUP_FLAG_FILTER | CLEANUP_FLAG_MILTER)
30  /*
31  * These are normally set when receiving mail from outside.
32  */
33 #define CLEANUP_FLAG_MASK_EXTERNAL \
34  (CLEANUP_FLAG_FILTER_ALL | CLEANUP_FLAG_BCC_OK | CLEANUP_FLAG_MAP_OK)
35 
36  /*
37  * These are normally set when generating notices or when forwarding mail
38  * internally.
39  */
40 #define CLEANUP_FLAG_MASK_INTERNAL CLEANUP_FLAG_MAP_OK
41 
42  /*
43  * These are set on the fly while processing SMTP envelopes or message
44  * content.
45  */
46 #define CLEANUP_FLAG_MASK_EXTRA \
47  (CLEANUP_FLAG_HOLD | CLEANUP_FLAG_DISCARD)
48 
49  /*
50  * Diagnostics.
51  *
52  * CLEANUP_STAT_CONT and CLEANUP_STAT_DEFER both update the reason attribute,
53  * but CLEANUP_STAT_DEFER takes precedence. It terminates queue record
54  * processing, and prevents bounces from being sent.
55  */
56 #define CLEANUP_STAT_OK 0 /* Success. */
57 #define CLEANUP_STAT_BAD (1<<0) /* Internal protocol error */
58 #define CLEANUP_STAT_WRITE (1<<1) /* Error writing message file */
59 #define CLEANUP_STAT_SIZE (1<<2) /* Message file too big */
60 #define CLEANUP_STAT_CONT (1<<3) /* Message content rejected */
61 #define CLEANUP_STAT_HOPS (1<<4) /* Too many hops */
62 #define CLEANUP_STAT_RCPT (1<<6) /* No recipients found */
63 #define CLEANUP_STAT_PROXY (1<<7) /* Proxy reject */
64 #define CLEANUP_STAT_DEFER (1<<8) /* Temporary reject */
65 
66  /*
67  * These are set when we can't bounce even if we were asked to.
68  */
69 #define CLEANUP_STAT_MASK_CANT_BOUNCE \
70  (CLEANUP_STAT_BAD | CLEANUP_STAT_WRITE | CLEANUP_STAT_DEFER \
71  | CLEANUP_STAT_RCPT)
72 
73  /*
74  * These are set when we can't examine every record of a message.
75  */
76 #define CLEANUP_STAT_MASK_INCOMPLETE \
77  (CLEANUP_STAT_BAD | CLEANUP_STAT_WRITE | CLEANUP_STAT_SIZE \
78  | CLEANUP_STAT_DEFER)
79 
80  /*
81  * Mapping from status code to DSN detail and free text.
82  */
83 typedef struct {
84  const unsigned status; /* CLEANUP_STAT_MUMBLE */
85  const int smtp; /* RFC 821 */
86  const char *dsn; /* RFC 3463 */
87  const char *text; /* free text */
89 
90 extern const char *cleanup_strerror(unsigned);
91 extern const CLEANUP_STAT_DETAIL *cleanup_stat_detail(unsigned);
92 extern const char *cleanup_strflags(unsigned);
93 
94 /* LICENSE
95 /* .ad
96 /* .fi
97 /* The Secure Mailer license must be distributed with this software.
98 /* AUTHOR(S)
99 /* Wietse Venema
100 /* IBM T.J. Watson Research
101 /* P.O. Box 704
102 /* Yorktown Heights, NY 10598, USA
103 /*--*/
104 
105 #endif
const char * text
Definition: cleanup_user.h:87
const char * cleanup_strflags(unsigned)
const CLEANUP_STAT_DETAIL * cleanup_stat_detail(unsigned)
const unsigned status
Definition: cleanup_user.h:84
const char * cleanup_strerror(unsigned)
const char * dsn
Definition: cleanup_user.h:86