summaryrefslogtreecommitdiff
path: root/pod/nginx/ngx_mail_proxy_module.pod
blob: 6157e2e3b79fa86c5c945a5024b00bf33efcebe4 (plain)
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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
=encoding utf-8

=head1 NAME

ngx_mail_proxy_module - Module ngx_mail_proxy_module




=head1 Directives

=head2 proxy_buffer


B<syntax:> proxy_buffer I<I<C<size>>>


B<default:> I<4kE<verbar>8k>


B<context:> I<mail>


B<context:> I<server>





Sets the size of the buffer used for proxying.
By default, the buffer size is equal to one memory page.
Depending on a platform, it is either 4K or 8K.







=head2 proxy_pass_error_message


B<syntax:> proxy_pass_error_message I<C<on> E<verbar> C<off>>


B<default:> I<off>


B<context:> I<mail>


B<context:> I<server>





Indicates whether to pass the error message obtained during
the authentication on the backend to the client.





Usually, if the authentication in nginx is a success,
the backend cannot return an error.
If it nevertheless returns an error,
it means some internal error has occurred.
In such case the backend message can contain information
that should not be shown to the client.
However, responding with an error for the correct password
is a normal behavior for some POP3 servers.
For example, CommuniGatePro informs a user about
L<mailbox
overflow|http://www.stalker.com/CommuniGatePro/Alerts.html#Quota> or other events by periodically outputting the
L<authentication
error|http://www.stalker.com/CommuniGatePro/POP.html#Alerts>.
The directive should be enabled in this case.







=head2 proxy_protocol


B<syntax:> proxy_protocol I<C<on> E<verbar> C<off>>


B<default:> I<off>


B<context:> I<mail>


B<context:> I<server>



This directive appeared in version 1.19.8.





Enables the
L<PROXY
protocol|http://www.haproxy.org/download/1.8/doc/proxy-protocol.txt> for connections to a backend.







=head2 proxy_smtp_auth


B<syntax:> proxy_smtp_auth I<C<on> E<verbar> C<off>>


B<default:> I<off>


B<context:> I<mail>


B<context:> I<server>



This directive appeared in version 1.19.4.





Enables or disables user authentication on the SMTP backend
using the C<AUTH> command.





If XCLIENT is also enabled,
then the C<XCLIENT> command will not send
the C<LOGIN> parameter.







=head2 proxy_timeout


B<syntax:> proxy_timeout I<I<C<timeout>>>


B<default:> I<24h>


B<context:> I<mail>


B<context:> I<server>





Sets the I<C<timeout>> between two successive
read or write operations on client or proxied server connections.
If no data is transmitted within this time, the connection is closed.







=head2 xclient


B<syntax:> xclient I<C<on> E<verbar> C<off>>


B<default:> I<on>


B<context:> I<mail>


B<context:> I<server>





Enables or disables the passing of the
L<XCLIENT|http://www.postfix.org/XCLIENT_README.html>
command with client parameters when connecting to the SMTP backend.





With C<XCLIENT>, the MTA is able to write client information
to the log and apply various limitations based on this data.





If C<XCLIENT> is enabled
then nginx passes the following commands when connecting to the backend:

=over



=item *

C<EHLO> with the
L<server name|ngx_mail_core_module>



=item *

C<
XCLIENT
>



=item *

C<EHLO> or C<HELO>,
as passed by the client


=back







If the name
L<found|ngx_mail_core_module>
by the client IP address points to the same address,
it is passed in the C<NAME> parameter
of the C<XCLIENT> command.
If the name could not be found, points to a different address,
or L<ngx_mail_core_module> is not specified,
the C<[UNAVAILABLE]> is passed
in the C<NAME> parameter.
If an error has occurred in the process of resolving,
the C<[TEMPUNAVAIL]> value is used.





If C<XCLIENT> is disabled
then nginx passes the C<EHLO> command with the
L<server name|ngx_mail_core_module>
when connecting to the backend if the client has passed
C<EHLO>,
or C<HELO> with the server name, otherwise.