Postfix3.3.1
qmqpd.h
[詳解]
1 /*++
2 /* NAME
3 /* qmqpd 3h
4 /* SUMMARY
5 /* Postfix QMQP server
6 /* SYNOPSIS
7 /* include "qmqpd.h"
8 /* DESCRIPTION
9 /* .nf
10 
11  /*
12  * System library.
13  */
14 #include <sys/time.h>
15 
16  /*
17  * Utility library.
18  */
19 #include <vstream.h>
20 #include <vstring.h>
21 
22  /*
23  * Global library.
24  */
25 #include <mail_stream.h>
26 
27  /*
28  * Per-session state.
29  */
30 typedef struct {
31  int err; /* error flags */
32  VSTREAM *client; /* client connection */
33  VSTRING *message; /* message buffer */
34  VSTRING *buf; /* line buffer */
35  struct timeval arrival_time; /* start of session */
36  char *name; /* client name */
37  char *addr; /* client IP address */
38  char *port; /* client TCP port */
39  char *namaddr; /* name[addr]:port */
40  char *rfc_addr; /* RFC 2821 client IP address */
41  int addr_family; /* address family */
42  char *queue_id; /* queue file ID */
43  VSTREAM *cleanup; /* cleanup server */
44  MAIL_STREAM *dest; /* cleanup server */
45  int rcpt_count; /* recipient count */
46  char *reason; /* exception name */
47  char *sender; /* sender address */
48  char *recipient; /* recipient address */
49  char *protocol; /* protocol name */
50  char *where; /* protocol state */
51  VSTRING *why_rejected; /* REJECT reason */
52 } QMQPD_STATE;
53 
54  /*
55  * Representation of unknown upstream client or message information within
56  * qmqpd processes. This is not the representation that Postfix uses in
57  * queue files, in queue manager delivery requests, or in XCLIENT/XFORWARD
58  * commands!
59  */
60 #define CLIENT_ATTR_UNKNOWN "unknown"
61 
62 #define CLIENT_NAME_UNKNOWN CLIENT_ATTR_UNKNOWN
63 #define CLIENT_ADDR_UNKNOWN CLIENT_ATTR_UNKNOWN
64 #define CLIENT_PORT_UNKNOWN CLIENT_ATTR_UNKNOWN
65 #define CLIENT_NAMADDR_UNKNOWN CLIENT_ATTR_UNKNOWN
66 
67  /*
68  * QMQP protocol status codes.
69  */
70 #define QMQPD_STAT_OK 'K'
71 #define QMQPD_STAT_RETRY 'Z'
72 #define QMQPD_STAT_HARD 'D'
73 
74  /*
75  * qmqpd_state.c
76  */
79 
80  /*
81  * qmqpd_peer.c
82  */
85 
86 /* LICENSE
87 /* .ad
88 /* .fi
89 /* The Secure Mailer license must be distributed with this software.
90 /* AUTHOR(S)
91 /* Wietse Venema
92 /* IBM T.J. Watson Research
93 /* P.O. Box 704
94 /* Yorktown Heights, NY 10598, USA
95 /*--*/
char * rfc_addr
Definition: qmqpd.h:40
void qmqpd_state_free(QMQPD_STATE *)
Definition: qmqpd_state.c:84
char * port
Definition: qmqpd.h:38
VSTREAM * client
Definition: qmqpd.h:32
char * where
Definition: qmqpd.h:50
char * addr
Definition: qmqpd.h:37
QMQPD_STATE * qmqpd_state_alloc(VSTREAM *)
Definition: qmqpd_state.c:58
int addr_family
Definition: qmqpd.h:41
char * sender
Definition: qmqpd.h:47
VSTRING * message
Definition: qmqpd.h:33
int rcpt_count
Definition: qmqpd.h:45
VSTRING * why_rejected
Definition: qmqpd.h:51
char * namaddr
Definition: qmqpd.h:39
char * name
Definition: qmqpd.h:36
char * protocol
Definition: qmqpd.h:49
char * reason
Definition: qmqpd.h:46
VSTREAM * cleanup
Definition: qmqpd.h:43
MAIL_STREAM * dest
Definition: qmqpd.h:44
void qmqpd_peer_init(QMQPD_STATE *)
Definition: qmqpd_peer.c:74
char * recipient
Definition: qmqpd.h:48
void qmqpd_peer_reset(QMQPD_STATE *)
Definition: qmqpd_peer.c:298
VSTRING * buf
Definition: qmqpd.h:34
char * queue_id
Definition: qmqpd.h:42
int err
Definition: qmqpd.h:31