mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 13:48:06 +00:00
postfix-2.4-20061203
This commit is contained in:
parent
1f05848f51
commit
e7b4f1ba66
@ -12862,6 +12862,22 @@ Apologies for any names omitted.
|
|||||||
otherwise they are cut between line boundaries. File:
|
otherwise they are cut between line boundaries. File:
|
||||||
cleanup/cleanup_out.c.
|
cleanup/cleanup_out.c.
|
||||||
|
|
||||||
|
20061203
|
||||||
|
|
||||||
|
Bugfix (introduced with Postfix 2.2): with SMTP server
|
||||||
|
tarpit delays of smtp_rset_timeout or larger, the SMTP
|
||||||
|
client could get out of sync with the server while reusing
|
||||||
|
a connection. The symptoms were "recipient rejected .. in
|
||||||
|
reply to DATA". Fix by Victor Duchovni and Wietse. Files:
|
||||||
|
smtp/smtp_proto.c, smtp/smtp_connect.c.
|
||||||
|
|
||||||
|
Robustness: the vbuf and vstream documentation claimed that
|
||||||
|
their *error() macros reported timeout errors, but they
|
||||||
|
didn't really. The implementation was fixed, and redundant
|
||||||
|
vstream_ftimeout() calls were removed. As a result, many
|
||||||
|
Postfix daemons now properly detect write timeout errors
|
||||||
|
on internal connections. Files: util/vbuf.h.
|
||||||
|
|
||||||
Wish list:
|
Wish list:
|
||||||
|
|
||||||
Investigate if clients of single-instance servers such as
|
Investigate if clients of single-instance servers such as
|
||||||
|
@ -831,7 +831,7 @@ no body content so none is shown in the example below.
|
|||||||
Content-Type: message/rfc822
|
Content-Type: message/rfc822
|
||||||
|
|
||||||
Received: by spike.porcupine.org (Postfix, from userid 1001)
|
Received: by spike.porcupine.org (Postfix, from userid 1001)
|
||||||
id 84863BC0E5; id DA77DBC0A9; Sun, 26 Nov 2006 17:01:01 -0500 (EST)
|
id 84863BC0E5; Sun, 26 Nov 2006 17:01:01 -0500 (EST)
|
||||||
Subject: probe
|
Subject: probe
|
||||||
To: postfix-users@postfix.org
|
To: postfix-users@postfix.org
|
||||||
Message-Id: <20061126220101.84863BC0E5@spike.porcupine.org>
|
Message-Id: <20061126220101.84863BC0E5@spike.porcupine.org>
|
||||||
|
@ -1232,7 +1232,7 @@ Content-Description: Message
|
|||||||
Content-Type: message/rfc822
|
Content-Type: message/rfc822
|
||||||
|
|
||||||
Received: by spike.porcupine.org (Postfix, from userid 1001)
|
Received: by spike.porcupine.org (Postfix, from userid 1001)
|
||||||
id 84863BC0E5; id DA77DBC0A9; Sun, 26 Nov 2006 17:01:01 -0500 (EST)
|
id 84863BC0E5; Sun, 26 Nov 2006 17:01:01 -0500 (EST)
|
||||||
Subject: probe
|
Subject: probe
|
||||||
To: postfix-users@postfix.org
|
To: postfix-users@postfix.org
|
||||||
Message-Id: <20061126220101.84863BC0E5@spike.porcupine.org>
|
Message-Id: <20061126220101.84863BC0E5@spike.porcupine.org>
|
||||||
|
@ -1232,7 +1232,7 @@ Content-Description: Message
|
|||||||
Content-Type: message/rfc822
|
Content-Type: message/rfc822
|
||||||
|
|
||||||
Received: by spike.porcupine.org (Postfix, from userid 1001)
|
Received: by spike.porcupine.org (Postfix, from userid 1001)
|
||||||
id 84863BC0E5; id DA77DBC0A9; Sun, 26 Nov 2006 17:01:01 -0500 (EST)
|
id 84863BC0E5; Sun, 26 Nov 2006 17:01:01 -0500 (EST)
|
||||||
Subject: probe
|
Subject: probe
|
||||||
To: postfix-users@postfix.org
|
To: postfix-users@postfix.org
|
||||||
Message-Id: <20061126220101.84863BC0E5@spike.porcupine.org>
|
Message-Id: <20061126220101.84863BC0E5@spike.porcupine.org>
|
||||||
|
@ -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 "20061201"
|
#define MAIL_RELEASE_DATE "20061203"
|
||||||
#define MAIL_VERSION_NUMBER "2.4"
|
#define MAIL_VERSION_NUMBER "2.4"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@ -769,7 +769,7 @@ static QMGR_PEER *qmgr_job_peer_select(QMGR_JOB *job)
|
|||||||
* solution, but that involves major changes.
|
* solution, but that involves major changes.
|
||||||
*/
|
*/
|
||||||
if (message->rcpt_offset != 0
|
if (message->rcpt_offset != 0
|
||||||
&& message->rcpt_limit > message->rcpt_count - 100
|
&& message->rcpt_limit > message->rcpt_count + 100
|
||||||
&& message->refcount > 0) {
|
&& message->refcount > 0) {
|
||||||
qmgr_message_realloc(message);
|
qmgr_message_realloc(message);
|
||||||
}
|
}
|
||||||
|
@ -379,7 +379,10 @@ static void smtp_cleanup_session(SMTP_STATE *state)
|
|||||||
bad_session = THIS_SESSION_IS_BAD; /* smtp_quit() may fail */
|
bad_session = THIS_SESSION_IS_BAD; /* smtp_quit() may fail */
|
||||||
if (THIS_SESSION_IS_EXPIRED)
|
if (THIS_SESSION_IS_EXPIRED)
|
||||||
smtp_quit(state); /* also disables caching */
|
smtp_quit(state); /* also disables caching */
|
||||||
if (THIS_SESSION_IS_CACHED) {
|
if (THIS_SESSION_IS_CACHED
|
||||||
|
/* Redundant tests for safety... */
|
||||||
|
&& vstream_ferror(session->stream) == 0
|
||||||
|
&& vstream_feof(session->stream) == 0) {
|
||||||
smtp_save_session(state);
|
smtp_save_session(state);
|
||||||
} else {
|
} else {
|
||||||
smtp_session_free(session);
|
smtp_session_free(session);
|
||||||
|
@ -1041,7 +1041,11 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
/* Caution: changes to RETURN() also affect code outside the main loop. */
|
||||||
|
|
||||||
#define RETURN(x) do { \
|
#define RETURN(x) do { \
|
||||||
|
if (recv_state != SMTP_STATE_LAST) \
|
||||||
|
DONT_CACHE_THIS_SESSION; \
|
||||||
vstring_free(next_command); \
|
vstring_free(next_command); \
|
||||||
if (survivors) \
|
if (survivors) \
|
||||||
myfree((char *) survivors); \
|
myfree((char *) survivors); \
|
||||||
|
@ -458,8 +458,7 @@ int smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
|
|||||||
/*
|
/*
|
||||||
* Errors first. Be prepared for delayed errors from the DATA phase.
|
* Errors first. Be prepared for delayed errors from the DATA phase.
|
||||||
*/
|
*/
|
||||||
if (vstream_ftimeout(state->proxy)
|
if (vstream_ferror(state->proxy)
|
||||||
|| vstream_ferror(state->proxy)
|
|
||||||
|| vstream_feof(state->proxy)
|
|| vstream_feof(state->proxy)
|
||||||
|| ((err = vstream_setjmp(state->proxy)) != 0
|
|| ((err = vstream_setjmp(state->proxy)) != 0
|
||||||
&& smtpd_proxy_rdwr_error(state->proxy, err))) {
|
&& smtpd_proxy_rdwr_error(state->proxy, err))) {
|
||||||
@ -579,8 +578,7 @@ int smtpd_proxy_rec_put(VSTREAM *stream, int rec_type,
|
|||||||
/*
|
/*
|
||||||
* Errors first.
|
* Errors first.
|
||||||
*/
|
*/
|
||||||
if (vstream_ftimeout(stream) || vstream_ferror(stream)
|
if (vstream_ferror(stream) || vstream_feof(stream))
|
||||||
|| vstream_feof(stream))
|
|
||||||
return (REC_TYPE_ERROR);
|
return (REC_TYPE_ERROR);
|
||||||
if ((err = vstream_setjmp(stream)) != 0)
|
if ((err = vstream_setjmp(stream)) != 0)
|
||||||
return (smtpd_proxy_rdwr_error(stream, err), REC_TYPE_ERROR);
|
return (smtpd_proxy_rdwr_error(stream, err), REC_TYPE_ERROR);
|
||||||
@ -608,8 +606,7 @@ int smtpd_proxy_rec_fprintf(VSTREAM *stream, int rec_type,
|
|||||||
/*
|
/*
|
||||||
* Errors first.
|
* Errors first.
|
||||||
*/
|
*/
|
||||||
if (vstream_ftimeout(stream) || vstream_ferror(stream)
|
if (vstream_ferror(stream) || vstream_feof(stream))
|
||||||
|| vstream_feof(stream))
|
|
||||||
return (REC_TYPE_ERROR);
|
return (REC_TYPE_ERROR);
|
||||||
if ((err = vstream_setjmp(stream)) != 0)
|
if ((err = vstream_setjmp(stream)) != 0)
|
||||||
return (smtpd_proxy_rdwr_error(stream, err), REC_TYPE_ERROR);
|
return (smtpd_proxy_rdwr_error(stream, err), REC_TYPE_ERROR);
|
||||||
|
@ -65,7 +65,7 @@ struct VBUF {
|
|||||||
#define VBUF_FLAG_BAD (VBUF_FLAG_ERR | VBUF_FLAG_EOF | VBUF_FLAG_TIMEOUT)
|
#define VBUF_FLAG_BAD (VBUF_FLAG_ERR | VBUF_FLAG_EOF | VBUF_FLAG_TIMEOUT)
|
||||||
#define VBUF_FLAG_FIXED (1<<3) /* fixed-size buffer */
|
#define VBUF_FLAG_FIXED (1<<3) /* fixed-size buffer */
|
||||||
|
|
||||||
#define vbuf_error(v) ((v)->flags & VBUF_FLAG_ERR)
|
#define vbuf_error(v) ((v)->flags & (VBUF_FLAG_ERR | VBUF_FLAG_TIMEOUT))
|
||||||
#define vbuf_eof(v) ((v)->flags & VBUF_FLAG_EOF)
|
#define vbuf_eof(v) ((v)->flags & VBUF_FLAG_EOF)
|
||||||
#define vbuf_timeout(v) ((v)->flags & VBUF_FLAG_TIMEOUT)
|
#define vbuf_timeout(v) ((v)->flags & VBUF_FLAG_TIMEOUT)
|
||||||
#define vbuf_clearerr(v) ((v)->flags &= ~VBUF_FLAG_BAD)
|
#define vbuf_clearerr(v) ((v)->flags &= ~VBUF_FLAG_BAD)
|
||||||
|
@ -280,12 +280,18 @@
|
|||||||
/*
|
/*
|
||||||
/* vstream_feof() returns non-zero when a previous operation on the
|
/* vstream_feof() returns non-zero when a previous operation on the
|
||||||
/* specified stream caused an end-of-file condition.
|
/* specified stream caused an end-of-file condition.
|
||||||
|
/* Further read requests after EOF may complete succesfully,
|
||||||
|
/* even when vstream_clearerr() is not called for that stream.
|
||||||
/*
|
/*
|
||||||
/* vstream_ferror() returns non-zero when a previous operation on the
|
/* vstream_ferror() returns non-zero when a previous operation on the
|
||||||
/* specified stream caused a non-EOF error condition, including timeout.
|
/* specified stream caused a non-EOF error condition, including timeout.
|
||||||
|
/* After a non-EOF, non-timeout, error on a stream, no I/O request will
|
||||||
|
/* complete until after vstream_clearerr() is called for that stream.
|
||||||
/*
|
/*
|
||||||
/* vstream_ftimeout() returns non-zero when a previous operation on the
|
/* vstream_ftimeout() returns non-zero when a previous operation on the
|
||||||
/* specified stream caused a timeout error condition.
|
/* specified stream caused a timeout error condition.
|
||||||
|
/* Further I/O requests after timeout may complete succesfully,
|
||||||
|
/* even when vstream_clearerr() is not called for that stream.
|
||||||
/*
|
/*
|
||||||
/* vstream_clearerr() resets the timeout, error and end-of-file indication
|
/* vstream_clearerr() resets the timeout, error and end-of-file indication
|
||||||
/* of the specified stream, and returns no useful result.
|
/* of the specified stream, and returns no useful result.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user