-
Notifications
You must be signed in to change notification settings - Fork 19
/
milter-protocol-extras.txt
125 lines (84 loc) · 4.08 KB
/
milter-protocol-extras.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
This is an extension of milter-protocol.txt document which attempts to document
changes made to the milter protocol.
What is described here together with milter-protocol.txt is believed to be
milter protocol version 6 as understood by sendmail 8.15.2 and libmilter 1.0.1.
----------------------
Protocol negotiation
Actions:
0x00000001 SMFIF_ADDHDRS Add headers (SMFIR_ADDHEADER) [v1]
*and insert headers (SMFIR_INSHEADER)*
0x00000002 SMFIF_CHGBODY Change body chunks (SMFIR_REPLBODY) [v1]
0x00000004 SMFIF_ADDRCPT Add recipients (SMFIR_ADDRCPT) [v1]
0x00000008 SMFIF_DELRCPT Remove recipients (SMFIR_DELRCPT) [v1]
0x00000010 SMFIF_CHGHDRS Change or delete headers (SMFIR_CHGHEADER) [v2]
0x00000020 SMFIF_QUARANTINE Quarantine message (SMFIR_QUARANTINE) [v2]
0x00000040 SMFIF_CHGFROM Change envelope sender (SMFIR_CHGFROM)
0x00000080 SMFIF_ADDRCPT_PAR Add recipient with ESMTP args
0x00000100 SMFIF_SETSYMLIST Send set of macros needed
Protocol flags:
0x00000001 SMFIP_NOCONNECT Skip SMFIC_CONNECT [v1]
0x00000002 SMFIP_NOHELO Skip SMFIC_HELO [v1]
0x00000004 SMFIP_NOMAIL Skip SMFIC_MAIL [v1]
0x00000008 SMFIP_NORCPT Skip SMFIC_RCPT [v1]
0x00000010 SMFIP_NOBODY Skip SMFIC_BODY [v1]
0x00000020 SMFIP_NOHDRS Skip SMFIC_HEADER [v1]
0x00000040 SMFIP_NOEOH Skip SMFIC_EOH [v2]
0x00000080 SMFIP_NR_HDR No reply for SMFIC_HEADER
0x00000100 SMFIP_NOUNKNOWN MTA should not send unknown commands
0x00000200 SMFIP_NODATA MTA should not send DATA
0x00000400 SMFIP_SKIP MTA understands SMFIS_SKIP
0x00000800 SMFIP_RCPT_REJ MTA should also send rejected RCPTs
0x00001000 SMFIP_NR_CONN No reply for SMFIC_CONNECT
0x00002000 SMFIP_NR_HELO No reply for SMFIC_HELO
0x00004000 SMFIP_NR_MAIL No reply for SMFIC_MAIL
0x00008000 SMFIP_NR_RCPT No reply for SMFIC_RCPT
0x00010000 SMFIP_NR_DATA No reply for SMFIC_DATA
0x00020000 SMFIP_NR_UNKN No reply for SMFIC_UNKN
0x00040000 SMFIP_NR_EOH No reply for SMFIC_EOH
0x00080000 SMFIP_NR_BODY No reply for body chunk
0x00100000 SMFIP_HDR_LEADSPC Header value leading space **
0x10000000 SMFIP_MDS_256K Max DATA size = 256K (?)
0x20000000 SMFIP_MDS_1M Max DATA size = 1M (?)
[**] From libmilter docs: Indicates that the MTA can send header values with
leading space intact. If this protocol step is requested, then the MTA will
also not add a leading space to headers when they are added, inserted, or
changed.
----------------
Command codes
**
'K' SMFIC_QUIC_NC QUIT but new connection follows
???
**
'T' SMFIC_DATA DATA
Called when the client uses the DATA command.
**
'U' SMFIC_UNKNOWN Any unknown command (?)
???
----------------
Response codes
**
'2' SMFIR_ADDRCPT_PAR Add recipient with ESMTP args
char args[][] Array of strings, NUL terminated (address at index 0)
args[0] is recipient, with <> qualification.
args[1] and beyond are ESMTP arguments, if any
**
'e' SMFIR_CHGFROM Replace envelope from address
char args[][] Array of strings, NUL terminated (address at index 0)
args[0] is sender, with <> qualification.
args[1] and beyond are ESMTP arguments, if any
**
'f' SMFIR_CONN_FAIL Cause a connection failure
???
**
'i' SMFIR_INSHEADER Insert header at a specified position (modification action)
uint32 index Index into header list where insertion should occur
char name[] Name of header, NUL terminated
char value[] Value of header, NUL terminated
**
'l' SMFIR_SETSYMLIST Set list of symbols (macros)
???
**
's' SMFIR_SKIP Do not send more body chunks
A milter has received sufficiently many body chunks to make a decision, but still
wants to perform message modification functions that are only allowed to be
returned in response to SMFIC_BODYEOB.