mirror of
https://github.com/vdukhovni/postfix
synced 2025-09-03 07:35:20 +00:00
postfix-2.3-20051228
This commit is contained in:
committed by
Viktor Dukhovni
parent
29f0936a9d
commit
4049d5fab2
@@ -11690,6 +11690,23 @@ Apologies for any names omitted.
|
|||||||
(example: sockaddr_to_hostaddr: Unknown error: success).
|
(example: sockaddr_to_hostaddr: Unknown error: success).
|
||||||
File: util/myaddrinfo.c.
|
File: util/myaddrinfo.c.
|
||||||
|
|
||||||
|
20051228
|
||||||
|
|
||||||
|
Workaround: don't pipeline the DOT+QUIT commands in the
|
||||||
|
SMTP client. The 20050929 paranoia about malformed server
|
||||||
|
replies eliminated a rare occurrence of "lost mail" with
|
||||||
|
sites that mis-implement DOT+QUIT pipelining. However, we
|
||||||
|
now have a larger occurrence of repeated deliveries to sites
|
||||||
|
with different implementation errors.
|
||||||
|
|
||||||
|
The default "smtp_pipeline_dot_quit = never" setting
|
||||||
|
eliminates the repeated deliveries at the cost of a small
|
||||||
|
performance loss with normal deliveries. Other settings
|
||||||
|
are "always" (always pipeline the DOT+QUIT commands, when
|
||||||
|
pipelining is enabled) and "newmail" (pipeline DOT+QUIT
|
||||||
|
only when mail is newer than $minimal_backoff_time).
|
||||||
|
Files: smtp/smtp_proto.c, smtp/smtp.c.
|
||||||
|
|
||||||
Open problems:
|
Open problems:
|
||||||
|
|
||||||
"postsuper -r" no longer resets the message arrival time,
|
"postsuper -r" no longer resets the message arrival time,
|
||||||
|
@@ -17,6 +17,20 @@ Incompatibility with Postfix 2.1 and earlier
|
|||||||
If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2
|
If you upgrade from Postfix 2.1 or earlier, read RELEASE_NOTES-2.2
|
||||||
before proceeding.
|
before proceeding.
|
||||||
|
|
||||||
|
Incompatibility with snapshot 20051228
|
||||||
|
======================================
|
||||||
|
|
||||||
|
New parameter "smtp_pipeline_dot_quit" (default: "never") to work
|
||||||
|
around broken servers and firewalls. After one documented case of
|
||||||
|
lost mail, as of 20050929 Postfix is more paranoid about malformed
|
||||||
|
SMTP server replies. Unfortuately this results in repeated delivery
|
||||||
|
attempts with other broken systems. To avoid this, the SMTP+LMTP
|
||||||
|
client no longer pipelines the DOT+QUIT commands by default. Instead
|
||||||
|
of "never" you can specify "always" (self-evident) or "newmail"
|
||||||
|
(pipeline DOT+QUIT only when mail is newer than $minimal_backoff_time,
|
||||||
|
so that the number of duplicate deliveries is limited). More details
|
||||||
|
are in the postconf(5) manual.
|
||||||
|
|
||||||
Major changes with snapshot 20051222
|
Major changes with snapshot 20051222
|
||||||
====================================
|
====================================
|
||||||
|
|
||||||
|
@@ -3224,7 +3224,7 @@ case insensitive lists of LHLO keywords (pipelining, starttls,
|
|||||||
auth, etc.) that the LMTP client will ignore in the LHLO response
|
auth, etc.) that the LMTP client will ignore in the LHLO response
|
||||||
from a remote LMTP server. See <a href="postconf.5.html#lmtp_discard_lhlo_keywords">lmtp_discard_lhlo_keywords</a> for
|
from a remote LMTP server. See <a href="postconf.5.html#lmtp_discard_lhlo_keywords">lmtp_discard_lhlo_keywords</a> for
|
||||||
details. The table is not indexed by hostname for consistency with
|
details. The table is not indexed by hostname for consistency with
|
||||||
smtpd_discard_ehlo_keyword_address_map </p>
|
<a href="postconf.5.html#smtpd_discard_ehlo_keyword_address_maps">smtpd_discard_ehlo_keyword_address_maps</a>. </p>
|
||||||
|
|
||||||
<p> This feature is available in Postfix 2.3 and later. </p>
|
<p> This feature is available in Postfix 2.3 and later. </p>
|
||||||
|
|
||||||
@@ -3377,6 +3377,15 @@ parameter. See there for details. </p>
|
|||||||
<p> This feature is available in Postfix 2.3 and later. </p>
|
<p> This feature is available in Postfix 2.3 and later. </p>
|
||||||
|
|
||||||
|
|
||||||
|
</DD>
|
||||||
|
|
||||||
|
<DT><b><a name="lmtp_pipeline_dot_quit">lmtp_pipeline_dot_quit</a>
|
||||||
|
(default: never)</b></DT><DD>
|
||||||
|
|
||||||
|
<p> The LMTP-specific version of the <a href="postconf.5.html#smtp_pipeline_dot_quit">smtp_pipeline_dot_quit</a>
|
||||||
|
configuration parameter. See there for details. </p>
|
||||||
|
|
||||||
|
|
||||||
</DD>
|
</DD>
|
||||||
|
|
||||||
<DT><b><a name="lmtp_pix_workaround_delay_time">lmtp_pix_workaround_delay_time</a>
|
<DT><b><a name="lmtp_pix_workaround_delay_time">lmtp_pix_workaround_delay_time</a>
|
||||||
@@ -6892,6 +6901,45 @@ complete the EHLO and TLS handshake (Postfix version 2.3 and later). </p>
|
|||||||
<a href="postconf.5.html#smtp_always_send_ehlo">smtp_always_send_ehlo</a> parameter. </p>
|
<a href="postconf.5.html#smtp_always_send_ehlo">smtp_always_send_ehlo</a> parameter. </p>
|
||||||
|
|
||||||
|
|
||||||
|
</DD>
|
||||||
|
|
||||||
|
<DT><b><a name="smtp_pipeline_dot_quit">smtp_pipeline_dot_quit</a>
|
||||||
|
(default: never)</b></DT><DD>
|
||||||
|
|
||||||
|
<p> When ESMTP command pipelining is enabled, whether or not the
|
||||||
|
SMTP client will send the QUIT command before it has received the
|
||||||
|
server's END-OF-DATA reply. </p>
|
||||||
|
|
||||||
|
<p> Specify one of the following: </p>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
|
||||||
|
<dt> <b>always</b> </dt> <dd> Always pipeline the END-OF-DATA and
|
||||||
|
QUIT commands. With servers or firewalls that mis-implement
|
||||||
|
END-OF-DATA + QUIT pipelining, mail will be delivered repeatedly
|
||||||
|
until it expires in the queue. </dd>
|
||||||
|
|
||||||
|
<dt> <b>never</b> </dt> <dd> Wait for the server's END-OF-DATA reply
|
||||||
|
before sending the QUIT command. This avoids repeated delivery
|
||||||
|
attempts with servers and firewalls that mis-implement END-OF-DATA
|
||||||
|
+ QUIT pipelining, at the cost of a small performance loss with
|
||||||
|
sites that correctly implement SMTP. </dd>
|
||||||
|
|
||||||
|
<dt> <b>newmail</b> </dt> <dd> Pipeline the END-OF-DATA and QUIT
|
||||||
|
commands only when mail is newer than $<a href="postconf.5.html#minimal_backoff_time">minimal_backoff_time</a>. This
|
||||||
|
limits the number of repeated deliveries with servers and firewalls
|
||||||
|
that mis-implement END-OF-DATA + QUIT pipelining, while avoiding
|
||||||
|
the performance loss associated with the "never" setting for normal
|
||||||
|
deliveries. </dd>
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<p> Note: when <a href="postconf.5.html#smtp_fallback_relay">smtp_fallback_relay</a> is used, the "always" and "newmail"
|
||||||
|
settings become identical in practice. </p>
|
||||||
|
|
||||||
|
<p> This feature is available in Postfix 2.3 and later. </p>
|
||||||
|
|
||||||
|
|
||||||
</DD>
|
</DD>
|
||||||
|
|
||||||
<DT><b><a name="smtp_pix_workaround_delay_time">smtp_pix_workaround_delay_time</a>
|
<DT><b><a name="smtp_pix_workaround_delay_time">smtp_pix_workaround_delay_time</a>
|
||||||
|
@@ -170,6 +170,12 @@ SMTP(8) SMTP(8)
|
|||||||
The maximal length of message header and body lines
|
The maximal length of message header and body lines
|
||||||
that Postfix will send via SMTP.
|
that Postfix will send via SMTP.
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#smtp_pipeline_dot_quit">smtp_pipeline_dot_quit</a> (never)</b>
|
||||||
|
When ESMTP command pipelining is enabled, whether
|
||||||
|
or not the SMTP client will send the QUIT command
|
||||||
|
before it has received the server's END-OF-DATA
|
||||||
|
reply.
|
||||||
|
|
||||||
<b><a href="postconf.5.html#smtp_pix_workaround_delay_time">smtp_pix_workaround_delay_time</a> (10s)</b>
|
<b><a href="postconf.5.html#smtp_pix_workaround_delay_time">smtp_pix_workaround_delay_time</a> (10s)</b>
|
||||||
How long the Postfix SMTP client pauses before
|
How long the Postfix SMTP client pauses before
|
||||||
sending ".<CR><LF>" in order to work around the PIX
|
sending ".<CR><LF>" in order to work around the PIX
|
||||||
|
@@ -1729,7 +1729,7 @@ case insensitive lists of LHLO keywords (pipelining, starttls,
|
|||||||
auth, etc.) that the LMTP client will ignore in the LHLO response
|
auth, etc.) that the LMTP client will ignore in the LHLO response
|
||||||
from a remote LMTP server. See lmtp_discard_lhlo_keywords for
|
from a remote LMTP server. See lmtp_discard_lhlo_keywords for
|
||||||
details. The table is not indexed by hostname for consistency with
|
details. The table is not indexed by hostname for consistency with
|
||||||
smtpd_discard_ehlo_keyword_address_map
|
smtpd_discard_ehlo_keyword_address_maps.
|
||||||
.PP
|
.PP
|
||||||
This feature is available in Postfix 2.3 and later.
|
This feature is available in Postfix 2.3 and later.
|
||||||
.SH lmtp_discard_lhlo_keywords (default: $myhostname)
|
.SH lmtp_discard_lhlo_keywords (default: $myhostname)
|
||||||
@@ -1808,6 +1808,9 @@ The LMTP-specific version of the smtp_mx_session_limit configuration
|
|||||||
parameter. See there for details.
|
parameter. See there for details.
|
||||||
.PP
|
.PP
|
||||||
This feature is available in Postfix 2.3 and later.
|
This feature is available in Postfix 2.3 and later.
|
||||||
|
.SH lmtp_pipeline_dot_quit (default: never)
|
||||||
|
The LMTP-specific version of the smtp_pipeline_dot_quit
|
||||||
|
configuration parameter. See there for details.
|
||||||
.SH lmtp_pix_workaround_delay_time (default: 10s)
|
.SH lmtp_pix_workaround_delay_time (default: 10s)
|
||||||
The LMTP-specific version of the smtp_pix_workaround_delay_time
|
The LMTP-specific version of the smtp_pix_workaround_delay_time
|
||||||
configuration parameter. See there for details.
|
configuration parameter. See there for details.
|
||||||
@@ -3838,6 +3841,35 @@ This feature is available in Postfix 2.1 and later.
|
|||||||
.SH smtp_never_send_ehlo (default: no)
|
.SH smtp_never_send_ehlo (default: no)
|
||||||
Never send EHLO at the start of an SMTP session. See also the
|
Never send EHLO at the start of an SMTP session. See also the
|
||||||
smtp_always_send_ehlo parameter.
|
smtp_always_send_ehlo parameter.
|
||||||
|
.SH smtp_pipeline_dot_quit (default: never)
|
||||||
|
When ESMTP command pipelining is enabled, whether or not the
|
||||||
|
SMTP client will send the QUIT command before it has received the
|
||||||
|
server's END-OF-DATA reply.
|
||||||
|
.PP
|
||||||
|
Specify one of the following:
|
||||||
|
.IP "\fBalways\fR"
|
||||||
|
Always pipeline the END-OF-DATA and
|
||||||
|
QUIT commands. With servers or firewalls that mis-implement
|
||||||
|
END-OF-DATA + QUIT pipelining, mail will be delivered repeatedly
|
||||||
|
until it expires in the queue.
|
||||||
|
.IP "\fBnever\fR"
|
||||||
|
Wait for the server's END-OF-DATA reply
|
||||||
|
before sending the QUIT command. This avoids repeated delivery
|
||||||
|
attempts with servers and firewalls that mis-implement END-OF-DATA
|
||||||
|
+ QUIT pipelining, at the cost of a small performance loss with
|
||||||
|
sites that correctly implement SMTP.
|
||||||
|
.IP "\fBnewmail\fR"
|
||||||
|
Pipeline the END-OF-DATA and QUIT
|
||||||
|
commands only when mail is newer than $minimal_backoff_time. This
|
||||||
|
limits the number of repeated deliveries with servers and firewalls
|
||||||
|
that mis-implement END-OF-DATA + QUIT pipelining, while avoiding
|
||||||
|
the performance loss associated with the "never" setting for normal
|
||||||
|
deliveries.
|
||||||
|
.PP
|
||||||
|
Note: when smtp_fallback_relay is used, the "always" and "newmail"
|
||||||
|
settings become identical in practice.
|
||||||
|
.PP
|
||||||
|
This feature is available in Postfix 2.3 and later.
|
||||||
.SH smtp_pix_workaround_delay_time (default: 10s)
|
.SH smtp_pix_workaround_delay_time (default: 10s)
|
||||||
How long the Postfix SMTP client pauses before sending
|
How long the Postfix SMTP client pauses before sending
|
||||||
".<CR><LF>" in order to work around the PIX firewall
|
".<CR><LF>" in order to work around the PIX firewall
|
||||||
|
@@ -165,6 +165,10 @@ Defer mail delivery when no MX record resolves to an IP address.
|
|||||||
.IP "\fBsmtp_line_length_limit (990)\fR"
|
.IP "\fBsmtp_line_length_limit (990)\fR"
|
||||||
The maximal length of message header and body lines that Postfix
|
The maximal length of message header and body lines that Postfix
|
||||||
will send via SMTP.
|
will send via SMTP.
|
||||||
|
.IP "\fBsmtp_pipeline_dot_quit (never)\fR"
|
||||||
|
When ESMTP command pipelining is enabled, whether or not the
|
||||||
|
SMTP client will send the QUIT command before it has received the
|
||||||
|
server's END-OF-DATA reply.
|
||||||
.IP "\fBsmtp_pix_workaround_delay_time (10s)\fR"
|
.IP "\fBsmtp_pix_workaround_delay_time (10s)\fR"
|
||||||
How long the Postfix SMTP client pauses before sending
|
How long the Postfix SMTP client pauses before sending
|
||||||
".<CR><LF>" in order to work around the PIX firewall
|
".<CR><LF>" in order to work around the PIX firewall
|
||||||
@@ -190,9 +194,9 @@ again later).
|
|||||||
Available in Postfix version 2.2 and later:
|
Available in Postfix version 2.2 and later:
|
||||||
.IP "\fBsmtp_discard_ehlo_keyword_address_maps (empty)\fR"
|
.IP "\fBsmtp_discard_ehlo_keyword_address_maps (empty)\fR"
|
||||||
Lookup tables, indexed by the remote SMTP server address, with
|
Lookup tables, indexed by the remote SMTP server address, with
|
||||||
case insensitive lists of EHLO keywords (pipelining, starttls,
|
case insensitive lists of EHLO keywords (pipelining, starttls, auth,
|
||||||
auth, etc.) that the SMTP client will ignore in the EHLO response
|
etc.) that the SMTP client will ignore in the EHLO response from a
|
||||||
from a remote SMTP server.
|
remote SMTP server.
|
||||||
.IP "\fBsmtp_discard_ehlo_keywords (empty)\fR"
|
.IP "\fBsmtp_discard_ehlo_keywords (empty)\fR"
|
||||||
A case insensitive list of EHLO keywords (pipelining, starttls,
|
A case insensitive list of EHLO keywords (pipelining, starttls,
|
||||||
auth, etc.) that the SMTP client will ignore in the EHLO response
|
auth, etc.) that the SMTP client will ignore in the EHLO response
|
||||||
|
@@ -387,6 +387,7 @@ while (<>) {
|
|||||||
s;\bsmtp_mx_session_limit\b;<a href="postconf.5.html#smtp_mx_session_limit">$&</a>;g;
|
s;\bsmtp_mx_session_limit\b;<a href="postconf.5.html#smtp_mx_session_limit">$&</a>;g;
|
||||||
s;\bsmtp_never_send_ehlo\b;<a href="postconf.5.html#smtp_never_send_ehlo">$&</a>;g;
|
s;\bsmtp_never_send_ehlo\b;<a href="postconf.5.html#smtp_never_send_ehlo">$&</a>;g;
|
||||||
s;\bsmtp_sender_depen[-</bB>]*\n*[ <bB>]*dent_authentication\b;<a href="postconf.5.html#smtp_sender_dependent_authentication">$&</a>;g;
|
s;\bsmtp_sender_depen[-</bB>]*\n*[ <bB>]*dent_authentication\b;<a href="postconf.5.html#smtp_sender_dependent_authentication">$&</a>;g;
|
||||||
|
s;\bsmtp_pipeline_dot_quit\b;<a href="postconf.5.html#smtp_pipeline_dot_quit">$&</a>;g;
|
||||||
s;\bsmtp_pix_workaround_delay_time\b;<a href="postconf.5.html#smtp_pix_workaround_delay_time">$&</a>;g;
|
s;\bsmtp_pix_workaround_delay_time\b;<a href="postconf.5.html#smtp_pix_workaround_delay_time">$&</a>;g;
|
||||||
s;\bsmtp_pix_workaround_threshold_time\b;<a href="postconf.5.html#smtp_pix_workaround_threshold_time">$&</a>;g;
|
s;\bsmtp_pix_workaround_threshold_time\b;<a href="postconf.5.html#smtp_pix_workaround_threshold_time">$&</a>;g;
|
||||||
s;\bsmtp_quit_timeout\b;<a href="postconf.5.html#smtp_quit_timeout">$&</a>;g;
|
s;\bsmtp_quit_timeout\b;<a href="postconf.5.html#smtp_quit_timeout">$&</a>;g;
|
||||||
|
@@ -8837,7 +8837,7 @@ case insensitive lists of LHLO keywords (pipelining, starttls,
|
|||||||
auth, etc.) that the LMTP client will ignore in the LHLO response
|
auth, etc.) that the LMTP client will ignore in the LHLO response
|
||||||
from a remote LMTP server. See lmtp_discard_lhlo_keywords for
|
from a remote LMTP server. See lmtp_discard_lhlo_keywords for
|
||||||
details. The table is not indexed by hostname for consistency with
|
details. The table is not indexed by hostname for consistency with
|
||||||
smtpd_discard_ehlo_keyword_address_map </p>
|
smtpd_discard_ehlo_keyword_address_maps. </p>
|
||||||
|
|
||||||
<p> This feature is available in Postfix 2.3 and later. </p>
|
<p> This feature is available in Postfix 2.3 and later. </p>
|
||||||
|
|
||||||
@@ -9125,3 +9125,43 @@ is rejected by the <b>reject_plaintext_session</b> restriction.
|
|||||||
rejecting the address as invalid. </p>
|
rejecting the address as invalid. </p>
|
||||||
|
|
||||||
<p> This feature is available in Postfix 2.3 and later.
|
<p> This feature is available in Postfix 2.3 and later.
|
||||||
|
|
||||||
|
%PARAM smtp_pipeline_dot_quit never
|
||||||
|
|
||||||
|
<p> When ESMTP command pipelining is enabled, whether or not the
|
||||||
|
SMTP client will send the QUIT command before it has received the
|
||||||
|
server's END-OF-DATA reply. </p>
|
||||||
|
|
||||||
|
<p> Specify one of the following: </p>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
|
||||||
|
<dt> <b>always</b> </dt> <dd> Always pipeline the END-OF-DATA and
|
||||||
|
QUIT commands. With servers or firewalls that mis-implement
|
||||||
|
END-OF-DATA + QUIT pipelining, mail will be delivered repeatedly
|
||||||
|
until it expires in the queue. </dd>
|
||||||
|
|
||||||
|
<dt> <b>never</b> </dt> <dd> Wait for the server's END-OF-DATA reply
|
||||||
|
before sending the QUIT command. This avoids repeated delivery
|
||||||
|
attempts with servers and firewalls that mis-implement END-OF-DATA
|
||||||
|
+ QUIT pipelining, at the cost of a small performance loss with
|
||||||
|
sites that correctly implement SMTP. </dd>
|
||||||
|
|
||||||
|
<dt> <b>newmail</b> </dt> <dd> Pipeline the END-OF-DATA and QUIT
|
||||||
|
commands only when mail is newer than $minimal_backoff_time. This
|
||||||
|
limits the number of repeated deliveries with servers and firewalls
|
||||||
|
that mis-implement END-OF-DATA + QUIT pipelining, while avoiding
|
||||||
|
the performance loss associated with the "never" setting for normal
|
||||||
|
deliveries. </dd>
|
||||||
|
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
<p> Note: when smtp_fallback_relay is used, the "always" and "newmail"
|
||||||
|
settings become identical in practice. </p>
|
||||||
|
|
||||||
|
<p> This feature is available in Postfix 2.3 and later. </p>
|
||||||
|
|
||||||
|
%PARAM lmtp_pipeline_dot_quit never
|
||||||
|
|
||||||
|
<p> The LMTP-specific version of the smtp_pipeline_dot_quit
|
||||||
|
configuration parameter. See there for details. </p>
|
||||||
|
@@ -1006,6 +1006,16 @@ extern int var_smtp_pix_thresh;
|
|||||||
#define DEF_LMTP_PIX_DELAY "10s"
|
#define DEF_LMTP_PIX_DELAY "10s"
|
||||||
extern int var_smtp_pix_delay;
|
extern int var_smtp_pix_delay;
|
||||||
|
|
||||||
|
#define SMTP_PIPE_DOT_QUIT_NEVER "never"
|
||||||
|
#define SMTP_PIPE_DOT_QUIT_NEWMAIL "newmail"
|
||||||
|
#define SMTP_PIPE_DOT_QUIT_ALWAYS "always"
|
||||||
|
|
||||||
|
#define VAR_SMTP_PIPE_DOT_QUIT "smtp_pipeline_dot_quit"
|
||||||
|
#define DEF_SMTP_PIPE_DOT_QUIT SMTP_PIPE_DOT_QUIT_NEVER
|
||||||
|
#define VAR_LMTP_PIPE_DOT_QUIT "lmtp_pipeline_dot_quit"
|
||||||
|
#define DEF_LMTP_PIPE_DOT_QUIT SMTP_PIPE_DOT_QUIT_NEVER
|
||||||
|
extern char *var_smtp_pipe_dot_quit;
|
||||||
|
|
||||||
#define VAR_SMTP_DEFER_MXADDR "smtp_defer_if_no_mx_address_found"
|
#define VAR_SMTP_DEFER_MXADDR "smtp_defer_if_no_mx_address_found"
|
||||||
#define DEF_SMTP_DEFER_MXADDR 0
|
#define DEF_SMTP_DEFER_MXADDR 0
|
||||||
#define VAR_LMTP_DEFER_MXADDR "lmtp_defer_if_no_mx_address_found"
|
#define VAR_LMTP_DEFER_MXADDR "lmtp_defer_if_no_mx_address_found"
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20051227"
|
#define MAIL_RELEASE_DATE "20051228"
|
||||||
#define MAIL_VERSION_NUMBER "2.3"
|
#define MAIL_VERSION_NUMBER "2.3"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0,
|
VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0,
|
||||||
VAR_LMTP_GENERIC_MAPS, DEF_LMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0,
|
VAR_LMTP_GENERIC_MAPS, DEF_LMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0,
|
||||||
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
|
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
|
||||||
|
VAR_LMTP_PIPE_DOT_QUIT, DEF_LMTP_PIPE_DOT_QUIT, &var_smtp_pipe_dot_quit, 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
static CONFIG_TIME_TABLE lmtp_time_table[] = {
|
static CONFIG_TIME_TABLE lmtp_time_table[] = {
|
||||||
@@ -43,6 +44,7 @@
|
|||||||
VAR_LMTP_STARTTLS_TMOUT, DEF_LMTP_STARTTLS_TMOUT, &var_smtp_starttls_tmout, 1, 0,
|
VAR_LMTP_STARTTLS_TMOUT, DEF_LMTP_STARTTLS_TMOUT, &var_smtp_starttls_tmout, 1, 0,
|
||||||
#endif
|
#endif
|
||||||
VAR_SCACHE_PROTO_TMOUT, DEF_SCACHE_PROTO_TMOUT, &var_scache_proto_tmout, 1, 0,
|
VAR_SCACHE_PROTO_TMOUT, DEF_SCACHE_PROTO_TMOUT, &var_scache_proto_tmout, 1, 0,
|
||||||
|
VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
static CONFIG_INT_TABLE lmtp_int_table[] = {
|
static CONFIG_INT_TABLE lmtp_int_table[] = {
|
||||||
|
@@ -143,6 +143,10 @@
|
|||||||
/* .IP "\fBsmtp_line_length_limit (990)\fR"
|
/* .IP "\fBsmtp_line_length_limit (990)\fR"
|
||||||
/* The maximal length of message header and body lines that Postfix
|
/* The maximal length of message header and body lines that Postfix
|
||||||
/* will send via SMTP.
|
/* will send via SMTP.
|
||||||
|
/* .IP "\fBsmtp_pipeline_dot_quit (never)\fR"
|
||||||
|
/* When ESMTP command pipelining is enabled, whether or not the
|
||||||
|
/* SMTP client will send the QUIT command before it has received the
|
||||||
|
/* server's END-OF-DATA reply.
|
||||||
/* .IP "\fBsmtp_pix_workaround_delay_time (10s)\fR"
|
/* .IP "\fBsmtp_pix_workaround_delay_time (10s)\fR"
|
||||||
/* How long the Postfix SMTP client pauses before sending
|
/* How long the Postfix SMTP client pauses before sending
|
||||||
/* ".<CR><LF>" in order to work around the PIX firewall
|
/* ".<CR><LF>" in order to work around the PIX firewall
|
||||||
@@ -168,9 +172,9 @@
|
|||||||
/* Available in Postfix version 2.2 and later:
|
/* Available in Postfix version 2.2 and later:
|
||||||
/* .IP "\fBsmtp_discard_ehlo_keyword_address_maps (empty)\fR"
|
/* .IP "\fBsmtp_discard_ehlo_keyword_address_maps (empty)\fR"
|
||||||
/* Lookup tables, indexed by the remote SMTP server address, with
|
/* Lookup tables, indexed by the remote SMTP server address, with
|
||||||
/* case insensitive lists of EHLO keywords (pipelining, starttls,
|
/* case insensitive lists of EHLO keywords (pipelining, starttls, auth,
|
||||||
/* auth, etc.) that the SMTP client will ignore in the EHLO response
|
/* etc.) that the SMTP client will ignore in the EHLO response from a
|
||||||
/* from a remote SMTP server.
|
/* remote SMTP server.
|
||||||
/* .IP "\fBsmtp_discard_ehlo_keywords (empty)\fR"
|
/* .IP "\fBsmtp_discard_ehlo_keywords (empty)\fR"
|
||||||
/* A case insensitive list of EHLO keywords (pipelining, starttls,
|
/* A case insensitive list of EHLO keywords (pipelining, starttls,
|
||||||
/* auth, etc.) that the SMTP client will ignore in the EHLO response
|
/* auth, etc.) that the SMTP client will ignore in the EHLO response
|
||||||
@@ -526,6 +530,7 @@
|
|||||||
#include <msg.h>
|
#include <msg.h>
|
||||||
#include <mymalloc.h>
|
#include <mymalloc.h>
|
||||||
#include <name_mask.h>
|
#include <name_mask.h>
|
||||||
|
#include <name_code.h>
|
||||||
|
|
||||||
/* Global library. */
|
/* Global library. */
|
||||||
|
|
||||||
@@ -617,6 +622,8 @@ char *var_prop_extension;
|
|||||||
bool var_smtp_sender_auth;
|
bool var_smtp_sender_auth;
|
||||||
char *var_lmtp_tcp_port;
|
char *var_lmtp_tcp_port;
|
||||||
int var_scache_proto_tmout;
|
int var_scache_proto_tmout;
|
||||||
|
char *var_smtp_pipe_dot_quit;
|
||||||
|
int var_min_backoff_time;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Global variables. smtp_errno is set by the address lookup routines and by
|
* Global variables. smtp_errno is set by the address lookup routines and by
|
||||||
@@ -629,6 +636,7 @@ SCACHE *smtp_scache;
|
|||||||
MAPS *smtp_ehlo_dis_maps;
|
MAPS *smtp_ehlo_dis_maps;
|
||||||
MAPS *smtp_generic_maps;
|
MAPS *smtp_generic_maps;
|
||||||
int smtp_ext_prop_mask;
|
int smtp_ext_prop_mask;
|
||||||
|
int smtp_pipe_dot_quit;
|
||||||
|
|
||||||
#ifdef USE_TLS
|
#ifdef USE_TLS
|
||||||
|
|
||||||
@@ -722,6 +730,12 @@ static void post_init(char *unused_name, char **unused_argv)
|
|||||||
SMTP_HOST_LOOKUP_NATIVE, SMTP_HOST_FLAG_NATIVE,
|
SMTP_HOST_LOOKUP_NATIVE, SMTP_HOST_FLAG_NATIVE,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
|
static NAME_CODE pipe_dot_quit_codes[] = {
|
||||||
|
SMTP_PIPE_DOT_QUIT_NEVER, SMTP_PIPE_DOT_QUIT_CODE_NEVER,
|
||||||
|
SMTP_PIPE_DOT_QUIT_NEWMAIL, SMTP_PIPE_DOT_QUIT_CODE_NEWMAIL,
|
||||||
|
SMTP_PIPE_DOT_QUIT_ALWAYS, SMTP_PIPE_DOT_QUIT_CODE_ALWAYS,
|
||||||
|
0, SMTP_PIPE_DOT_QUIT_CODE_ERROR,
|
||||||
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Select hostname lookup mechanisms.
|
* Select hostname lookup mechanisms.
|
||||||
@@ -748,6 +762,16 @@ static void post_init(char *unused_name, char **unused_argv)
|
|||||||
var_ipc_idle_limit,
|
var_ipc_idle_limit,
|
||||||
var_ipc_ttl_limit);
|
var_ipc_ttl_limit);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Initialize dot-quit pipelining workaround.
|
||||||
|
*/
|
||||||
|
smtp_pipe_dot_quit = name_code(pipe_dot_quit_codes,
|
||||||
|
NAME_CODE_FLAG_NONE,
|
||||||
|
var_smtp_pipe_dot_quit);
|
||||||
|
if (smtp_pipe_dot_quit == SMTP_PIPE_DOT_QUIT_CODE_ERROR)
|
||||||
|
msg_fatal("unknown %s value: %s", VAR_SMTP_PIPE_DOT_QUIT,
|
||||||
|
var_smtp_pipe_dot_quit);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pre_init - pre-jail initialization */
|
/* pre_init - pre-jail initialization */
|
||||||
|
@@ -166,6 +166,13 @@ extern SSL_CTX *smtp_tls_ctx; /* client-side TLS engine */
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#define SMTP_PIPE_DOT_QUIT_CODE_ERROR 0
|
||||||
|
#define SMTP_PIPE_DOT_QUIT_CODE_NEVER 1
|
||||||
|
#define SMTP_PIPE_DOT_QUIT_CODE_NEWMAIL 2
|
||||||
|
#define SMTP_PIPE_DOT_QUIT_CODE_ALWAYS 3
|
||||||
|
|
||||||
|
extern int smtp_pipe_dot_quit;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* smtp_session.c
|
* smtp_session.c
|
||||||
*/
|
*/
|
||||||
|
@@ -289,7 +289,7 @@ SMTP_RESP *smtp_chat_resp(SMTP_SESSION *session)
|
|||||||
msg_warn("non-%s response from %s: %s",
|
msg_warn("non-%s response from %s: %s",
|
||||||
(session->state->misc_flags &
|
(session->state->misc_flags &
|
||||||
SMTP_MISC_FLAG_USE_LMTP) ? "LMTP" : "ESMTP",
|
SMTP_MISC_FLAG_USE_LMTP) ? "LMTP" : "ESMTP",
|
||||||
session->namaddr, STR(session->buffer));
|
session->namaddrport, STR(session->buffer));
|
||||||
vstream_longjmp(session->stream, SMTP_ERR_PROTO);
|
vstream_longjmp(session->stream, SMTP_ERR_PROTO);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0,
|
VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0,
|
||||||
VAR_SMTP_GENERIC_MAPS, DEF_SMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0,
|
VAR_SMTP_GENERIC_MAPS, DEF_SMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0,
|
||||||
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
|
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
|
||||||
|
VAR_SMTP_PIPE_DOT_QUIT, DEF_SMTP_PIPE_DOT_QUIT, &var_smtp_pipe_dot_quit, 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
static CONFIG_TIME_TABLE smtp_time_table[] = {
|
static CONFIG_TIME_TABLE smtp_time_table[] = {
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
VAR_SMTP_STARTTLS_TMOUT, DEF_SMTP_STARTTLS_TMOUT, &var_smtp_starttls_tmout, 1, 0,
|
VAR_SMTP_STARTTLS_TMOUT, DEF_SMTP_STARTTLS_TMOUT, &var_smtp_starttls_tmout, 1, 0,
|
||||||
#endif
|
#endif
|
||||||
VAR_SCACHE_PROTO_TMOUT, DEF_SCACHE_PROTO_TMOUT, &var_scache_proto_tmout, 1, 0,
|
VAR_SCACHE_PROTO_TMOUT, DEF_SCACHE_PROTO_TMOUT, &var_scache_proto_tmout, 1, 0,
|
||||||
|
VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 1, 0,
|
||||||
0,
|
0,
|
||||||
};
|
};
|
||||||
static CONFIG_INT_TABLE smtp_int_table[] = {
|
static CONFIG_INT_TABLE smtp_int_table[] = {
|
||||||
|
@@ -926,8 +926,16 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
|
|||||||
#define SENDER_IS_AHEAD \
|
#define SENDER_IS_AHEAD \
|
||||||
(recv_state < send_state || recv_rcpt != send_rcpt)
|
(recv_state < send_state || recv_rcpt != send_rcpt)
|
||||||
|
|
||||||
|
#define DONT_PIPELINE_DOT_QUIT \
|
||||||
|
(smtp_pipe_dot_quit == SMTP_PIPE_DOT_QUIT_CODE_NEVER \
|
||||||
|
|| (smtp_pipe_dot_quit == SMTP_PIPE_DOT_QUIT_CODE_NEWMAIL \
|
||||||
|
&& request->msg_stats.incoming_arrival.tv_sec \
|
||||||
|
< vstream_ftime(session->stream) - var_min_backoff_time))
|
||||||
|
|
||||||
#define SENDER_IN_WAIT_STATE \
|
#define SENDER_IN_WAIT_STATE \
|
||||||
(send_state == SMTP_STATE_DOT || send_state == SMTP_STATE_LAST)
|
(send_state == SMTP_STATE_DOT || send_state == SMTP_STATE_LAST \
|
||||||
|
|| (recv_state == SMTP_STATE_DOT && send_state == SMTP_STATE_QUIT \
|
||||||
|
&& DONT_PIPELINE_DOT_QUIT))
|
||||||
|
|
||||||
#define SENDING_MAIL \
|
#define SENDING_MAIL \
|
||||||
(recv_state <= SMTP_STATE_DOT)
|
(recv_state <= SMTP_STATE_DOT)
|
||||||
@@ -1144,7 +1152,8 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Build the "." command before we have seen the DATA response.
|
* Build the "." command after we have seen the DATA response
|
||||||
|
* (DATA is a protocol synchronization point).
|
||||||
*
|
*
|
||||||
* Changing the connection caching state here is safe because it
|
* Changing the connection caching state here is safe because it
|
||||||
* affects none of the not-yet processed replies to
|
* affects none of the not-yet processed replies to
|
||||||
|
Reference in New Issue
Block a user