2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 13:48:06 +00:00

postfix-3.5.0-RC2

This commit is contained in:
Wietse Venema 2020-03-12 00:00:00 -05:00 committed by Viktor Dukhovni
parent 2b650375df
commit 28b3968dd1
4 changed files with 16 additions and 4 deletions

View File

@ -24653,3 +24653,10 @@ Apologies for any names omitted.
Cleanup: harmless memory leak in postconf. File: Cleanup: harmless memory leak in postconf. File:
postconf/postconf_master.c. postconf/postconf_master.c.
20200312
Bugfix (introduced: Postfix 2.3): panic with Postfix
multi-Milter configuration during MAIL FROM. Milter client
state was not properly reset after one of the Milters failed.
Reported by WeiYu Wu.

View File

@ -20,8 +20,8 @@
* 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 "20200308" #define MAIL_RELEASE_DATE "20200312"
#define MAIL_VERSION_NUMBER "3.5-RC1" #define MAIL_VERSION_NUMBER "3.5.0-RC2"
#ifdef SNAPSHOT #ifdef SNAPSHOT
#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE #define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE

View File

@ -2615,6 +2615,7 @@ static int mail_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
} }
if (state->milters != 0 if (state->milters != 0
&& (state->saved_flags & MILTER_SKIP_FLAGS) == 0) { && (state->saved_flags & MILTER_SKIP_FLAGS) == 0) {
state->flags |= SMTPD_FLAG_NEED_MILTER_ABORT;
PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf)); PUSH_STRING(saved_sender, state->sender, STR(state->addr_buf));
err = milter_mail_event(state->milters, err = milter_mail_event(state->milters,
milter_argv(state, argc - 2, argv + 2)); milter_argv(state, argc - 2, argv + 2));
@ -2730,11 +2731,14 @@ static void mail_reset(SMTPD_STATE *state)
state->queue_id = 0; state->queue_id = 0;
} }
if (state->sender) { if (state->sender) {
if (state->milters != 0)
milter_abort(state->milters);
myfree(state->sender); myfree(state->sender);
state->sender = 0; state->sender = 0;
} }
/* WeiYu Wu: need to undo milter_mail_event() state change. */
if (state->flags & SMTPD_FLAG_NEED_MILTER_ABORT) {
milter_abort(state->milters);
state->flags &= ~SMTPD_FLAG_NEED_MILTER_ABORT;
}
if (state->verp_delims) { if (state->verp_delims) {
myfree(state->verp_delims); myfree(state->verp_delims);
state->verp_delims = 0; state->verp_delims = 0;

View File

@ -206,6 +206,7 @@ typedef struct {
#define SMTPD_FLAG_ILL_PIPELINING (1<<1) /* inappropriate pipelining */ #define SMTPD_FLAG_ILL_PIPELINING (1<<1) /* inappropriate pipelining */
#define SMTPD_FLAG_AUTH_USED (1<<2) /* don't reuse SASL state */ #define SMTPD_FLAG_AUTH_USED (1<<2) /* don't reuse SASL state */
#define SMTPD_FLAG_SMTPUTF8 (1<<3) /* RFC 6531/2 transaction */ #define SMTPD_FLAG_SMTPUTF8 (1<<3) /* RFC 6531/2 transaction */
#define SMTPD_FLAG_NEED_MILTER_ABORT (1<<4) /* undo milter_mail_event() */
/* Security: don't reset SMTPD_FLAG_AUTH_USED. */ /* Security: don't reset SMTPD_FLAG_AUTH_USED. */
#define SMTPD_MASK_MAIL_KEEP \ #define SMTPD_MASK_MAIL_KEEP \