Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / ibm-public / postfix / dist / src / qmqpd / qmqpd.h
blobb94ab238e1fc47b876b2adecde00b229e454ceea
1 /* $NetBSD$ */
3 /*++
4 /* NAME
5 /* qmqpd 3h
6 /* SUMMARY
7 /* Postfix QMQP server
8 /* SYNOPSIS
9 /* include "qmqpd.h"
10 /* DESCRIPTION
11 /* .nf
14 * System library.
16 #include <sys/time.h>
19 * Utility library.
21 #include <vstream.h>
22 #include <vstring.h>
25 * Global library.
27 #include <mail_stream.h>
30 * Per-session state.
32 typedef struct {
33 int err; /* error flags */
34 VSTREAM *client; /* client connection */
35 VSTRING *message; /* message buffer */
36 VSTRING *buf; /* line buffer */
37 struct timeval arrival_time; /* start of session */
38 char *name; /* client name */
39 char *addr; /* client IP address */
40 char *port; /* client TCP port */
41 char *namaddr; /* name[addr]:port */
42 char *rfc_addr; /* RFC 2821 client IP address */
43 int addr_family; /* address family */
44 char *queue_id; /* queue file ID */
45 VSTREAM *cleanup; /* cleanup server */
46 MAIL_STREAM *dest; /* cleanup server */
47 int rcpt_count; /* recipient count */
48 char *reason; /* exception name */
49 char *sender; /* sender address */
50 char *recipient; /* recipient address */
51 char *protocol; /* protocol name */
52 char *where; /* protocol state */
53 VSTRING *why_rejected; /* REJECT reason */
54 } QMQPD_STATE;
57 * Representation of unknown upstream client or message information within
58 * qmqpd processes. This is not the representation that Postfix uses in
59 * queue files, in queue manager delivery requests, or in XCLIENT/XFORWARD
60 * commands!
62 #define CLIENT_ATTR_UNKNOWN "unknown"
64 #define CLIENT_NAME_UNKNOWN CLIENT_ATTR_UNKNOWN
65 #define CLIENT_ADDR_UNKNOWN CLIENT_ATTR_UNKNOWN
66 #define CLIENT_PORT_UNKNOWN CLIENT_ATTR_UNKNOWN
67 #define CLIENT_NAMADDR_UNKNOWN CLIENT_ATTR_UNKNOWN
70 * QMQP protocol status codes.
72 #define QMQPD_STAT_OK 'K'
73 #define QMQPD_STAT_RETRY 'Z'
74 #define QMQPD_STAT_HARD 'D'
77 * qmqpd_state.c
79 QMQPD_STATE *qmqpd_state_alloc(VSTREAM *);
80 void qmqpd_state_free(QMQPD_STATE *);
83 * qmqpd_peer.c
85 void qmqpd_peer_init(QMQPD_STATE *);
86 void qmqpd_peer_reset(QMQPD_STATE *);
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 /*--*/