Postfix3.3.1
総合概要
データ構造
ファイル
ファイル一覧
大域各種
postfix-3.3.1
src
global
deliver_request.h
[詳解]
1
#ifndef _DELIVER_REQUEST_H_INCLUDED_
2
#define _DELIVER_REQUEST_H_INCLUDED_
3
4
/*++
5
/* NAME
6
/* deliver_request 3h
7
/* SUMMARY
8
/* mail delivery request protocol, server side
9
/* SYNOPSIS
10
/* #include <deliver_request.h>
11
/* DESCRIPTION
12
/* .nf
13
14
/*
15
* Utility library.
16
*/
17
#include <
vstring.h
>
18
#include <
vstream.h
>
19
20
/*
21
* Global library.
22
*/
23
#include <
recipient_list.h
>
24
#include <
dsn.h
>
25
#include <
msg_stats.h
>
26
27
/*
28
* Structure of a server mail delivery request.
29
*/
30
typedef
struct
DELIVER_REQUEST
{
31
VSTREAM
*
fp
;
/* stream, shared lock */
32
int
flags
;
/* see below */
33
char
*
queue_name
;
/* message queue name */
34
char
*
queue_id
;
/* message queue id */
35
long
data_offset
;
/* offset to message */
36
long
data_size
;
/* message size */
37
char
*
nexthop
;
/* next hop name */
38
char
*
encoding
;
/* content encoding */
39
int
smtputf8
;
/* SMTPUTF8 level */
40
char
*
sender
;
/* envelope sender */
41
MSG_STATS
msg_stats
;
/* time profile */
42
RECIPIENT_LIST
rcpt_list
;
/* envelope recipients */
43
DSN
*
hop_status
;
/* DSN status */
44
char
*
client_name
;
/* client hostname */
45
char
*
client_addr
;
/* client address */
46
char
*
client_port
;
/* client port */
47
char
*
client_proto
;
/* client protocol */
48
char
*
client_helo
;
/* helo parameter */
49
char
*
sasl_method
;
/* SASL method */
50
char
*
sasl_username
;
/* SASL user name */
51
char
*
sasl_sender
;
/* SASL sender */
52
char
*
log_ident
;
/* original queue ID */
53
char
*
rewrite_context
;
/* address rewrite context */
54
char
*
dsn_envid
;
/* DSN envelope ID */
55
int
dsn_ret
;
/* DSN full/header notification */
56
}
DELIVER_REQUEST
;
57
58
/*
59
* Since we can't send null pointers, null strings represent unavailable
60
* attributes instead. They're less likely to explode in our face, too.
61
*/
62
#define DEL_REQ_ATTR_AVAIL(a) (*(a))
63
64
/*
65
* How to deliver, really?
66
*/
67
#define DEL_REQ_FLAG_DEFLT (DEL_REQ_FLAG_SUCCESS | DEL_REQ_FLAG_BOUNCE)
68
#define DEL_REQ_FLAG_SUCCESS (1<<0)
/* delete successful recipients */
69
#define DEL_REQ_FLAG_BOUNCE (1<<1)
/* unimplemented */
70
71
#define DEL_REQ_FLAG_MTA_VRFY (1<<8)
/* MTA-requested address probe */
72
#define DEL_REQ_FLAG_USR_VRFY (1<<9)
/* user-requested address probe */
73
#define DEL_REQ_FLAG_RECORD (1<<10)
/* record and deliver */
74
#define DEL_REQ_FLAG_CONN_LOAD (1<<11)
/* Consult opportunistic cache */
75
#define DEL_REQ_FLAG_CONN_STORE (1<<12)
/* Update opportunistic cache */
76
#define DEL_REQ_FLAG_REC_DLY_SENT (1<<13)
/* Record delayed delivery */
77
78
/*
79
* Cache Load and Store as value or mask. Use explicit _MASK for multi-bit
80
* values.
81
*/
82
#define DEL_REQ_FLAG_CONN_MASK \
83
(DEL_REQ_FLAG_CONN_LOAD | DEL_REQ_FLAG_CONN_STORE)
84
85
/*
86
* For compatibility, the old confusing names.
87
*/
88
#define DEL_REQ_FLAG_VERIFY DEL_REQ_FLAG_MTA_VRFY
89
#define DEL_REQ_FLAG_EXPAND DEL_REQ_FLAG_USR_VRFY
90
91
/*
92
* Mail that uses the trace(8) service, and maybe more.
93
*/
94
#define DEL_REQ_TRACE_FLAGS_MASK \
95
(DEL_REQ_FLAG_MTA_VRFY | DEL_REQ_FLAG_USR_VRFY | DEL_REQ_FLAG_RECORD \
96
| DEL_REQ_FLAG_REC_DLY_SENT)
97
#define DEL_REQ_TRACE_FLAGS(f) ((f) & DEL_REQ_TRACE_FLAGS_MASK)
98
99
/*
100
* Mail that is not delivered (i.e. uses the trace(8) service only).
101
*/
102
#define DEL_REQ_TRACE_ONLY_MASK \
103
(DEL_REQ_FLAG_MTA_VRFY | DEL_REQ_FLAG_USR_VRFY)
104
#define DEL_REQ_TRACE_ONLY(f) ((f) & DEL_REQ_TRACE_ONLY_MASK)
105
106
/*
107
* Per-recipient delivery status. Not to be confused with per-delivery
108
* request status.
109
*/
110
#define DEL_RCPT_STAT_OK 0
111
#define DEL_RCPT_STAT_DEFER 1
112
#define DEL_RCPT_STAT_BOUNCE 2
113
#define DEL_RCPT_STAT_TODO 3
114
115
/*
116
* Delivery request status. Note that there are only FINAL and DEFER. This
117
* is because delivery status information can be lost when a delivery agent
118
* or queue manager process terminates prematurely. The only distinctions we
119
* can rely on are "final delivery completed" (positive confirmation that
120
* all recipients are marked as done) and "everything else". In the absence
121
* of a definitive statement the queue manager will always have to be
122
* prepared for all possibilities.
123
*/
124
#define DEL_STAT_FINAL 0
/* delivered or bounced */
125
#define DEL_STAT_DEFER (-1)
/* not delivered or bounced */
126
127
typedef
struct
VSTREAM
_deliver_vstream_
;
128
extern
DELIVER_REQUEST
*
deliver_request_read
(
_deliver_vstream_
*);
129
extern
int
deliver_request_done
(
_deliver_vstream_
*,
DELIVER_REQUEST
*,
int
);
130
131
/* LICENSE
132
/* .ad
133
/* .fi
134
/* The Secure Mailer license must be distributed with this software.
135
/* AUTHOR(S)
136
/* Wietse Venema
137
/* IBM T.J. Watson Research
138
/* P.O. Box 704
139
/* Yorktown Heights, NY 10598, USA
140
/*--*/
141
142
#endif
DELIVER_REQUEST::client_name
char * client_name
Definition:
deliver_request.h:44
VSTREAM
Definition:
vstream.h:43
DELIVER_REQUEST::client_addr
char * client_addr
Definition:
deliver_request.h:45
DELIVER_REQUEST::rcpt_list
RECIPIENT_LIST rcpt_list
Definition:
deliver_request.h:42
recipient_list.h
DELIVER_REQUEST::fp
VSTREAM * fp
Definition:
deliver_request.h:31
dsn.h
DELIVER_REQUEST::dsn_ret
int dsn_ret
Definition:
deliver_request.h:55
DELIVER_REQUEST::queue_id
char * queue_id
Definition:
deliver_request.h:34
DELIVER_REQUEST::msg_stats
MSG_STATS msg_stats
Definition:
deliver_request.h:41
deliver_request_done
int deliver_request_done(_deliver_vstream_ *, DELIVER_REQUEST *, int)
Definition:
deliver_request.c:472
DELIVER_REQUEST::log_ident
char * log_ident
Definition:
deliver_request.h:52
DELIVER_REQUEST::client_helo
char * client_helo
Definition:
deliver_request.h:48
RECIPIENT_LIST
Definition:
recipient_list.h:49
DELIVER_REQUEST::data_offset
long data_offset
Definition:
deliver_request.h:35
DELIVER_REQUEST::hop_status
DSN * hop_status
Definition:
deliver_request.h:43
DELIVER_REQUEST::sasl_method
char * sasl_method
Definition:
deliver_request.h:49
DELIVER_REQUEST
struct DELIVER_REQUEST DELIVER_REQUEST
DELIVER_REQUEST::nexthop
char * nexthop
Definition:
deliver_request.h:37
DELIVER_REQUEST::sender
char * sender
Definition:
deliver_request.h:40
DELIVER_REQUEST::encoding
char * encoding
Definition:
deliver_request.h:38
DELIVER_REQUEST::client_proto
char * client_proto
Definition:
deliver_request.h:47
DELIVER_REQUEST::sasl_username
char * sasl_username
Definition:
deliver_request.h:50
vstring.h
MSG_STATS
Definition:
msg_stats.h:55
DELIVER_REQUEST::rewrite_context
char * rewrite_context
Definition:
deliver_request.h:53
DELIVER_REQUEST::data_size
long data_size
Definition:
deliver_request.h:36
vstream.h
DELIVER_REQUEST
Definition:
deliver_request.h:30
DSN
Definition:
dsn.h:17
DELIVER_REQUEST::sasl_sender
char * sasl_sender
Definition:
deliver_request.h:51
msg_stats.h
DELIVER_REQUEST::dsn_envid
char * dsn_envid
Definition:
deliver_request.h:54
DELIVER_REQUEST::flags
int flags
Definition:
deliver_request.h:32
DELIVER_REQUEST::smtputf8
int smtputf8
Definition:
deliver_request.h:39
deliver_request_read
DELIVER_REQUEST * deliver_request_read(_deliver_vstream_ *)
Definition:
deliver_request.c:439
DELIVER_REQUEST::client_port
char * client_port
Definition:
deliver_request.h:46
DELIVER_REQUEST::queue_name
char * queue_name
Definition:
deliver_request.h:33
2018年11月10日(土) 18時59分36秒作成 - Postfix3.3.1 / 構成:
1.8.9.1