Postfix3.3.1
dsn_mask.h
[詳解]
1 #ifndef _DSN_MASK_H_INCLUDED_
2 #define _DSN_MASK_H_INCLUDED_
3 
4 /*++
5 /* NAME
6 /* dsn_mask 3h
7 /* SUMMARY
8 /* DSN embedding in SMTP
9 /* SYNOPSIS
10 /* #include "dsn_mask.h"
11 /* DESCRIPTION
12 /* .nf
13 
14  /*
15  * Support for MAIL FROM ... RET=mumble.
16  */
17 #define DSN_RET_FULL (1<<0)
18 #define DSN_RET_HDRS (1<<1)
19 #define DSN_RET_BITS (2)
20 
21  /*
22  * Use this to filter bad content in queue files.
23  */
24 #define DSN_RET_OK(v) ((v) == DSN_RET_FULL || (v) == DSN_RET_HDRS)
25 
26  /*
27  * Only when RET is specified by the sender is the SMTP client allowed to
28  * specify RET=mumble while delivering mail (RFC 3461 section 5.2.1).
29  * However, if RET is not requested, then the MTA is allowed to interpret
30  * this as RET=FULL or RET=HDRS (RFC 3461 section 4.3). Postfix chooses the
31  * former.
32  */
33 
34  /*
35  * Conversion routines: string to mask and reverse.
36  */
37 extern int dsn_ret_code(const char *);
38 extern const char *dsn_ret_str(int);
39 
40  /*
41  * Support for RCPT TO ... NOTIFY=mumble is in the form of bit masks.
42  */
43 #define DSN_NOTIFY_NEVER (1<<0) /* must not */
44 #define DSN_NOTIFY_SUCCESS (1<<1) /* must */
45 #define DSN_NOTIFY_FAILURE (1<<2) /* must */
46 #define DSN_NOTIFY_DELAY (1<<3) /* may */
47 #define DSN_NOTIFY_BITS (4)
48 
49  /*
50  * Any form of sender-requested notification.
51  */
52 #define DSN_NOTIFY_ANY \
53  (DSN_NOTIFY_SUCCESS | DSN_NOTIFY_FAILURE | DSN_NOTIFY_DELAY)
54 
55  /*
56  * Override the sender-specified notification restriction.
57  */
58 #define DSN_NOTIFY_OVERRIDE (DSN_NOTIFY_ANY | DSN_NOTIFY_NEVER)
59 
60  /*
61  * Use this to filter bad content in queue files.
62  */
63 #define DSN_NOTIFY_OK(v) \
64  ((v) == DSN_NOTIFY_NEVER || (v) == ((v) & DSN_NOTIFY_ANY))
65 
66  /*
67  * Only when NOTIFY=something was requested by the sender is the SMTP client
68  * allowed to specify NOTIFY=mumble while delivering mail (RFC 3461 section
69  * 5.2.1). However, if NOTIFY is not requested, then the MTA is allowed to
70  * interpret this as NOTIFY=FAILURE or NOTIFY=FAILURE,DELAY (RFC 3461
71  * section 4.1). Postfix chooses the latter.
72  */
73 
74  /*
75  * Conversion routines: string to mask and reverse.
76  */
77 extern int dsn_notify_mask(const char *);
78 extern const char *dsn_notify_str(int);
79 
80 /* LICENSE
81 /* .ad
82 /* .fi
83 /* The Secure Mailer license must be distributed with this software.
84 /* AUTHOR(S)
85 /* Wietse Venema
86 /* IBM T.J. Watson Research
87 /* P.O. Box 704
88 /* Yorktown Heights, NY 10598, USA
89 /*--*/
90 
91 #endif
const char * dsn_ret_str(int)
Definition: dsn_mask.c:97
const char * dsn_notify_str(int)
Definition: dsn_mask.c:118
int dsn_ret_code(const char *)
Definition: dsn_mask.c:90
int dsn_notify_mask(const char *)
Definition: dsn_mask.c:108