Expand PMF_FN_* macros.
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / global / dsn_mask.h
blob451650535559d3b7497fbef51d73b5f253c1c8a9
1 /* $NetBSD$ */
3 #ifndef _DSN_MASK_H_INCLUDED_
4 #define _DSN_MASK_H_INCLUDED_
6 /*++
7 /* NAME
8 /* dsn_mask 3h
9 /* SUMMARY
10 /* DSN embedding in SMTP
11 /* SYNOPSIS
12 /* #include "dsn_mask.h"
13 /* DESCRIPTION
14 /* .nf
17 * Support for MAIL FROM ... RET=mumble.
19 #define DSN_RET_FULL (1<<0)
20 #define DSN_RET_HDRS (1<<1)
21 #define DSN_RET_BITS (2)
24 * Use this to filter bad content in queue files.
26 #define DSN_RET_OK(v) ((v) == DSN_RET_FULL || (v) == DSN_RET_HDRS)
29 * Only when RET is specified by the sender is the SMTP client allowed to
30 * specify RET=mumble while delivering mail (RFC 3461 section 5.2.1).
31 * However, if RET is not requested, then the MTA is allowed to interpret
32 * this as RET=FULL or RET=HDRS (RFC 3461 section 4.3). Postfix chooses the
33 * former.
37 * Conversion routines: string to mask and reverse.
39 extern int dsn_ret_code(const char *);
40 extern const char *dsn_ret_str(int);
43 * Support for RCPT TO ... NOTIFY=mumble is in the form of bit masks.
45 #define DSN_NOTIFY_NEVER (1<<0) /* must not */
46 #define DSN_NOTIFY_SUCCESS (1<<1) /* must */
47 #define DSN_NOTIFY_FAILURE (1<<2) /* must */
48 #define DSN_NOTIFY_DELAY (1<<3) /* may */
49 #define DSN_NOTIFY_BITS (4)
52 * Any form of sender-requested notification.
54 #define DSN_NOTIFY_ANY \
55 (DSN_NOTIFY_SUCCESS | DSN_NOTIFY_FAILURE | DSN_NOTIFY_DELAY)
58 * Override the sender-specified notification restriction.
60 #define DSN_NOTIFY_OVERRIDE (DSN_NOTIFY_ANY | DSN_NOTIFY_NEVER)
63 * Use this to filter bad content in queue files.
65 #define DSN_NOTIFY_OK(v) \
66 ((v) == DSN_NOTIFY_NEVER || (v) == ((v) & DSN_NOTIFY_ANY))
69 * Only when NOTIFY=something was requested by the sender is the SMTP client
70 * allowed to specify NOTIFY=mumble while delivering mail (RFC 3461 section
71 * 5.2.1). However, if NOTIFY is not requested, then the MTA is allowed to
72 * interpret this as NOTIFY=FAILURE or NOTIFY=FAILURE,DELAY (RFC 3461
73 * section 4.1). Postfix chooses the latter.
77 * Conversion routines: string to mask and reverse.
79 extern int dsn_notify_mask(const char *);
80 extern const char *dsn_notify_str(int);
82 /* LICENSE
83 /* .ad
84 /* .fi
85 /* The Secure Mailer license must be distributed with this software.
86 /* AUTHOR(S)
87 /* Wietse Venema
88 /* IBM T.J. Watson Research
89 /* P.O. Box 704
90 /* Yorktown Heights, NY 10598, USA
91 /*--*/
93 #endif