Postfix3.3.1
bounce.h
[詳解]
1 #ifndef _BOUNCE_H_INCLUDED_
2 #define _BOUNCE_H_INCLUDED_
3 
4 /*++
5 /* NAME
6 /* bounce 3h
7 /* SUMMARY
8 /* bounce service client
9 /* SYNOPSIS
10 /* #include <bounce.h>
11 /* DESCRIPTION
12 /* .nf
13 
14  /*
15  * System library.
16  */
17 #include <time.h>
18 
19  /*
20  * Global library.
21  */
22 #include <deliver_request.h>
23 #include <dsn_buf.h>
24 
25  /*
26  * Client interface.
27  */
28 extern int bounce_append(int, const char *, MSG_STATS *, RECIPIENT *,
29  const char *, DSN *);
30 extern int bounce_flush(int, const char *, const char *, const char *, int,
31  const char *, const char *, int);
32 extern int bounce_flush_verp(int, const char *, const char *, const char *, int,
33  const char *, const char *, int, const char *);
34 extern int bounce_one(int, const char *, const char *, const char *, int,
35  const char *, const char *,
36  int, MSG_STATS *, RECIPIENT *,
37  const char *, DSN *);
38 extern void bounce_client_init(const char *, const char *);
39 
40  /*
41  * Bounce/defer protocol commands.
42  */
43 #define BOUNCE_CMD_APPEND 0 /* append log */
44 #define BOUNCE_CMD_FLUSH 1 /* send log */
45 #define BOUNCE_CMD_WARN 2 /* send warning, don't delete log */
46 #define BOUNCE_CMD_VERP 3 /* send log, verp style */
47 #define BOUNCE_CMD_ONE 4 /* send one recipient notice */
48 #define BOUNCE_CMD_TRACE 5 /* send delivery record */
49 
50  /*
51  * Macros to make obscure code more readable.
52  */
53 #define NO_DSN_DCODE ((char *) 0)
54 #define NO_RELAY_AGENT "none"
55 #define NO_DSN_RMTA ((char *) 0)
56 
57  /*
58  * Flags.
59  */
60 #define BOUNCE_FLAG_NONE 0 /* no flags up */
61 #define BOUNCE_FLAG_CLEAN (1<<0) /* remove log on error */
62 #define BOUNCE_FLAG_DELRCPT (1<<1) /* delete recipient from queue file */
63 
64  /*
65  * Backwards compatibility.
66  */
67 #define BOUNCE_FLAG_KEEP BOUNCE_FLAG_NONE
68 
69  /*
70  * Start of private API.
71  */
72 
73 #ifdef DSN_INTERN
74 
75 #include <dsn_filter.h>
76 
78 
79 extern int bounce_append_intern(int, const char *, MSG_STATS *, RECIPIENT *,
80  const char *, DSN *);
81 extern int bounce_one_intern(int, const char *, const char *, const char *,
82  int, const char *, const char *,
83  int, MSG_STATS *, RECIPIENT *,
84  const char *, DSN *);
85 
86 #endif
87 
88 /* LICENSE
89 /* .ad
90 /* .fi
91 /* The Secure Mailer license must be distributed with this software.
92 /* AUTHOR(S)
93 /* Wietse Venema
94 /* IBM T.J. Watson Research
95 /* P.O. Box 704
96 /* Yorktown Heights, NY 10598, USA
97 /*--*/
98 
99 #endif
DSN_FILTER * delivery_status_filter
Definition: bounce.c:218
int bounce_append(int, const char *, MSG_STATS *, RECIPIENT *, const char *, DSN *)
Definition: bounce.c:222
int bounce_flush_verp(int, const char *, const char *, const char *, int, const char *, const char *, int, const char *)
Definition: bounce.c:377
int bounce_append_intern(int flags, const char *id, MSG_STATS *stats, RECIPIENT *rcpt, const char *relay, DSN *dsn)
Definition: bounce.c:252
int bounce_one(int, const char *, const char *, const char *, int, const char *, const char *, int, MSG_STATS *, RECIPIENT *, const char *, DSN *)
Definition: bounce.c:412
int bounce_flush(int, const char *, const char *, const char *, int, const char *, const char *, int)
Definition: bounce.c:343
int bounce_one_intern(int flags, const char *queue, const char *id, const char *encoding, int smtputf8, const char *sender, const char *dsn_envid, int dsn_ret, MSG_STATS *stats, RECIPIENT *rcpt, const char *relay, DSN *dsn)
Definition: bounce.c:444
Definition: dsn.h:17
void bounce_client_init(const char *, const char *)
Definition: bounce.c:532