From: Wietse Venema Date: Tue, 19 May 2009 05:00:00 +0000 (-0500) Subject: postfix-2.6.1 X-Git-Tag: v2.6.1^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4a4054f2b497a9d954fe5de6a6f1e3712eca1bef;p=thirdparty%2Fpostfix.git postfix-2.6.1 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index b1e691391..23597cf56 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -15220,3 +15220,14 @@ Apologies for any names omitted. Code cleanups: don't clobber -o command-line arguments so that Linux people can debug daemon command lines more easily. Files: master/*server.c. + +20090519 + + Bugfix (introduced: Postfix 2.3, but did not cause trouble + until 20090427). Queue file corruption, with (smtpd_milters + or non_smtpd_milters) enabled, AND with delay_warning_time + enabled, AND with short envelope sender addresses e.g., + local submissions with bare usernames, but not bounces). + The queue file would be corrupted when the delay_warning_time + record was marked as "done" after sending the "your mail + is delayed" notice. File: qmgr/qmgr_message.c. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 4433a5c55..0a926aa38 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -42,14 +42,9 @@ and more: Best of all, nothing changes when you use only one Postfix instance. -The postfix-wrapper script (in the daemon directory) implements a -simple but useful multi-instance manager, with instructions. The -plug-in API itself is described in the postfix-wrapper(5) manpage. - -A more sophisticated multi-instance manager called postmulti(1) is -approaching completion. A prototype version has been used internally -at Morgan Stanley. This version will be adapted to the new plug-in -API which makes some simplification possible. +The MULTI_INSTANCE_README file presents an introduction to +multi-instance management. Multi-instance support is based on an +API that is described in the postfix-wrapper(5) manual page. Major changes - milter support ------------------------------ diff --git a/postfix/src/cleanup/cleanup_envelope.c b/postfix/src/cleanup/cleanup_envelope.c index 9ba1830dd..2253fa17a 100644 --- a/postfix/src/cleanup/cleanup_envelope.c +++ b/postfix/src/cleanup/cleanup_envelope.c @@ -385,8 +385,7 @@ static void cleanup_envelope_process(CLEANUP_STATE *state, int type, cleanup_addr_sender(state, buf); if (state->milters || cleanup_milters) { /* Make room to replace sender. */ - if (len < REC_TYPE_PTR_PAYL_SIZE) - rec_pad(state->dst, REC_TYPE_PTR, REC_TYPE_PTR_PAYL_SIZE - len); + rec_pad(state->dst, REC_TYPE_PTR, REC_TYPE_PTR_PAYL_SIZE); /* Remember the after-sender record offset. */ if ((state->sender_pt_target = vstream_ftell(state->dst)) < 0) msg_fatal("%s: vstream_ftell %s: %m:", myname, cleanup_path); diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 7c41198c1..fd5201cad 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,8 +20,8 @@ * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ -#define MAIL_RELEASE_DATE "20090511" -#define MAIL_VERSION_NUMBER "2.6.0" +#define MAIL_RELEASE_DATE "20090519" +#define MAIL_VERSION_NUMBER "2.6.1" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff --git a/postfix/src/oqmgr/qmgr_message.c b/postfix/src/oqmgr/qmgr_message.c index b3a7b15a1..27c5c92bb 100644 --- a/postfix/src/oqmgr/qmgr_message.c +++ b/postfix/src/oqmgr/qmgr_message.c @@ -366,10 +366,16 @@ static int qmgr_message_read(QMGR_MESSAGE *message) msg_fatal("seek file %s: %m", VSTREAM_PATH(message->fp)); curr_offset += message->data_size; } - rec_type = rec_get(message->fp, buf, 0); + rec_type = rec_get_raw(message->fp, buf, 0, REC_FLAG_NONE); start = vstring_str(buf); if (msg_verbose > 1) msg_info("record %c %s", rec_type, start); + if (rec_type == REC_TYPE_PTR) { + if ((rec_type = rec_goto(message->fp, start)) == REC_TYPE_ERROR) + break; + /* Need to update curr_offset after pointer jump. */ + continue; + } if (rec_type <= 0) { msg_warn("%s: message rejected: missing end record", message->queue_id); diff --git a/postfix/src/qmgr/qmgr_message.c b/postfix/src/qmgr/qmgr_message.c index 24a981ed7..a588d6791 100644 --- a/postfix/src/qmgr/qmgr_message.c +++ b/postfix/src/qmgr/qmgr_message.c @@ -406,10 +406,16 @@ static int qmgr_message_read(QMGR_MESSAGE *message) msg_fatal("seek file %s: %m", VSTREAM_PATH(message->fp)); curr_offset += message->data_size; } - rec_type = rec_get(message->fp, buf, 0); + rec_type = rec_get_raw(message->fp, buf, 0, REC_FLAG_NONE); start = vstring_str(buf); if (msg_verbose > 1) msg_info("record %c %s", rec_type, start); + if (rec_type == REC_TYPE_PTR) { + if ((rec_type = rec_goto(message->fp, start)) == REC_TYPE_ERROR) + break; + /* Need to update curr_offset after pointer jump. */ + continue; + } if (rec_type <= 0) { msg_warn("%s: message rejected: missing end record", message->queue_id);