~ubuntu-branches/ubuntu/trusty/postfix/trusty-proposed

« back to all changes in this revision

Viewing changes to html/XCLIENT_README.html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-02-27 09:33:07 UTC
  • Revision ID: james.westby@ubuntu.com-20050227093307-cn789t27ibnlh6tf
Tags: upstream-2.1.5
ImportĀ upstreamĀ versionĀ 2.1.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
 
2
        "http://www.w3.org/TR/html4/loose.dtd">
 
3
 
 
4
<html>
 
5
 
 
6
<head>
 
7
 
 
8
<title>Postfix XCLIENT Howto</title>
 
9
 
 
10
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
 
11
 
 
12
</head>
 
13
 
 
14
<body>
 
15
 
 
16
<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix XCLIENT Howto</h1>
 
17
 
 
18
<hr>
 
19
 
 
20
<h2>Purpose of the XCLIENT extension to SMTP</h2>
 
21
 
 
22
<p> The XCLIENT command targets the following problems: </p>
 
23
 
 
24
<ol>
 
25
 
 
26
    <li> <p> Access control tests.  SMTP server access rules are
 
27
    difficult to verify when decisions can be triggered only by
 
28
    remote clients.  In order to facilitate access rule testing,
 
29
    an authorized SMTP client test program needs the ability to
 
30
    override the SMTP server's idea of the SMTP client hostname,
 
31
    network address, and other client information, for the entire
 
32
    duration of an SMTP session.  </p>
 
33
 
 
34
    <li> <p> Client software that downloads mail from an up-stream
 
35
    mail server and injects it into a local MTA via SMTP. In order
 
36
    to take advantage of the local MTA's SMTP server access rules,
 
37
    the client software needs the ability to override the SMTP
 
38
    server's idea of the remote client name, client address and
 
39
    other information.  Such information can typically be extracted
 
40
    from the up-stream mail server's Received:  message header. </p>
 
41
 
 
42
    <li> <p> Post-filter access control and logging. With
 
43
    Internet-&gt;filter-&gt;MTA style content filter applications,
 
44
    the filter can be simplified if it can delegate decisions
 
45
    concerning mail relay and other access control to the MTA. This
 
46
    is especially useful when the filter acts as a transparent
 
47
    proxy for SMTP commands.  This requires that the filter can
 
48
    override the MTA's idea of the SMTP client hostname, network
 
49
    address, and other information. </p>
 
50
 
 
51
</ol>
 
52
 
 
53
<h2>XCLIENT Command syntax</h2>
 
54
 
 
55
<p> Examples of client-server conversations are given at the end
 
56
of this document. </p>
 
57
 
 
58
<p> In SMTP server EHLO replies, the keyword associated with this
 
59
extension is XCLIENT. It is followed by the names of the attributes
 
60
that the XCLIENT implementation supports.  </p>
 
61
 
 
62
<p> The XCLIENT command may be sent at any time except in the middle
 
63
of a mail delivery transaction (i.e.  between MAIL and DOT).  The
 
64
XCLIENT command may be pipelined when the server supports ESMTP
 
65
command pipelining.  </p>
 
66
 
 
67
<p> The syntax of XCLIENT requests is described below.  Upper case
 
68
and quoted strings specify terminals, lowercase strings specify
 
69
meta terminals, and SP is whitespace.  Although command and attribute
 
70
names are shown in upper case, they are in fact case insensitive.
 
71
</p>
 
72
 
 
73
<blockquote>
 
74
<p>
 
75
    xclient-command = XCLIENT 1*( SP attribute-name"="attribute-value )
 
76
</p>
 
77
<p>
 
78
    attribute-name = ( NAME | ADDR | PROTO | HELO )
 
79
</p>
 
80
</blockquote>
 
81
 
 
82
<ul>
 
83
 
 
84
    <li> <p> The NAME attribute specifies an SMTP client hostname
 
85
    (not an SMTP client address), [UNAVAILABLE] when client hostname
 
86
    lookup failed due to a permanent error, or [TEMPUNAVAIL] when
 
87
    the lookup error condition was transient. </p>
 
88
 
 
89
    <li> <p> The ADDR attribute specifies an SMTP client numerical
 
90
    IPv4 network address, an IPv6 address prefixed with IPV6:, or
 
91
    [UNAVAILABLE] when the address information is unavailable.
 
92
    Address information is not enclosed with []. </p>
 
93
 
 
94
    <li> <p> The PROTO attribute specifies either SMTP or ESMTP.
 
95
    </p>
 
96
 
 
97
    <li> <p> The HELO attribute specifies an SMTP HELO parameter
 
98
    value, or the value [UNAVAILABLE] when the information is
 
99
    unavailable.  </p>
 
100
 
 
101
</ul>
 
102
 
 
103
<p> Note 1: syntactically valid NAME and HELO attributes can be up
 
104
to 255 characters long. The client must not send XCLIENT commands
 
105
that exceed the 512 character limit for SMTP commands. To avoid
 
106
exceeding the limit the client should send the information in
 
107
multiple XCLIENT commands. </p>
 
108
 
 
109
<p> Note 2: [UNAVAILABLE], [TEMPUNAVAIL] and IPV6:  may be specified
 
110
in upper case, lower case or mixed case. </p>
 
111
 
 
112
<p> The XCLIENT server reply codes are as follows: </p>
 
113
 
 
114
<blockquote>
 
115
 
 
116
<table border="1" bgcolor="#f0f0ff">
 
117
 
 
118
<tr> <th> Code </th> <th> Meaning </th> </tr>
 
119
 
 
120
<tr> <td> 250 </td> <td> success  </td> </tr>
 
121
 
 
122
<tr> <td> 501 </td> <td> bad command parameter syntax </td> </tr>
 
123
 
 
124
<tr> <td> 503 </td> <td> mail transaction in progress </td> </tr>
 
125
 
 
126
<tr> <td> 421 </td> <td> unable to proceed, disconnecting </td> </tr>
 
127
 
 
128
</table>
 
129
 
 
130
</blockquote>
 
131
 
 
132
<h2>XCLIENT Examples</h2>
 
133
 
 
134
<p> In the first example, the client impersonates a mail originating
 
135
system by passing all SMTP session information via XCLIENT commands.
 
136
Information sent by the client is shown in bold font.
 
137
</p>
 
138
 
 
139
<blockquote>
 
140
<pre>
 
141
220 server.example.com ESMTP Postfix
 
142
<b>EHLO client.example.com</b>
 
143
250-server.example.com
 
144
250-PIPELINING
 
145
250-SIZE 10240000
 
146
250-VRFY
 
147
250-ETRN
 
148
250-XCLIENT NAME ADDR PROTO HELO
 
149
250 8BITMIME
 
150
<b>XCLIENT NAME=spike.porcupine.org ADDR=168.100.189.2 PROTO=ESMTP </b>
 
151
250 Ok
 
152
<b>XCLIENT HELO=spike.porcupine.org</b>
 
153
250 Ok
 
154
<b>MAIL FROM:&lt;wietse@porcupine.org&gt;</b>
 
155
250 Ok
 
156
<b>RCPT TO:&lt;user@example.com&gt;</b>
 
157
250 Ok
 
158
<b>DATA</b>
 
159
354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;
 
160
<b>. . .<i>message content</i>. . .</b>
 
161
<b>.</b>
 
162
250 Ok: queued as 763402AAE6
 
163
<b>QUIT</b>
 
164
221 Bye
 
165
</pre>
 
166
</blockquote>
 
167
 
 
168
<p> In the second example, the client impersonates a mail originating
 
169
system by sending the XCLIENT command before the EHLO or HELO command.
 
170
This increases the realism of impersonation, but requires that the
 
171
client knows ahead of time what XCLIENT options the server supports.
 
172
</p>
 
173
 
 
174
<blockquote>
 
175
<pre>
 
176
220 server.example.com ESMTP Postfix
 
177
<b>XCLIENT NAME=spike.porcupine.org ADDR=168.100.189.2</b>
 
178
250 Ok
 
179
<b>HELO spike.porcupine.org</b>
 
180
250 server.example.com
 
181
<b>MAIL FROM:&lt;wietse@porcupine.org&gt;</b>
 
182
250 Ok
 
183
<b>RCPT TO:&lt;user@example.com&gt;</b>
 
184
250 Ok
 
185
<b>DATA</b>
 
186
354 End data with &lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;
 
187
<b>. . .<i>message content</i>. . .</b>
 
188
<b>.</b>
 
189
250 Ok: queued as CF1E52AAE7
 
190
<b>QUIT</b>
 
191
221 Bye
 
192
</pre>
 
193
</blockquote>
 
194
 
 
195
<h2>Security</h2>
 
196
 
 
197
<p> The XCLIENT command changes audit trails and/or SMTP client
 
198
access permissions. Use of this command must be restricted to
 
199
authorized SMTP clients. However, the XCLIENT command should not
 
200
override its own access control mechanism. </p>
 
201
 
 
202
<h2>SMTP connection caching</h2>
 
203
 
 
204
<p> XCLIENT attributes persist until the end of an SMTP session.
 
205
If one session is used to deliver mail on behalf of different SMTP
 
206
clients, the XCLIENT attributes need to be reset as appropriate 
 
207
before each MAIL FROM command. </p>
 
208
 
 
209
</body>
 
210
 
 
211
</html>