Prereq: "2.2.6" diff -cr /var/tmp/postfix-2.2.6/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-2.2.6/src/global/mail_version.h Mon Nov 28 17:12:19 2005 --- ./src/global/mail_version.h Thu Dec 8 09:42:11 2005 *************** *** 20,27 **** * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20051130" ! #define MAIL_VERSION_NUMBER "2.2.6" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT --- 20,27 ---- * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20051208" ! #define MAIL_VERSION_NUMBER "2.2.7" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT diff -cr /var/tmp/postfix-2.2.6/HISTORY ./HISTORY *** /var/tmp/postfix-2.2.6/HISTORY Tue Nov 29 11:20:46 2005 --- ./HISTORY Thu Dec 8 16:43:24 2005 *************** *** 10730,10732 **** --- 10730,10754 ---- be fixed; it must be specified before the message content is received. Files: smtpd/smtpd.c, smtpd/smtpd_check.c, cleanup/cleanup_extracted.c, pickup/pickup.c. + + 20051201 + + Bugfix: the LMTP client would reuse a session after negative + reply to the RSET command (which may happen when client and + server somehow get out of sync). Problem found by Christian + Theune. Files: lmtp/lmtp.c, lmtp/lmtp_proto.c. + + 20051207 + + Bugfix: race condition in the connection caching protocol, + causing the SMTP delivery agent to hang after delivering + mail, while trying to save a connection. Introduced with + Postfix 2.2.5. Files: scache/scache.c. + + 20051208 + + Bugfix: the best_mx_transport, mailbox_transport and + fallback_transport features did not write a per-recipient + defer logfile record when the target delivery agent was + broken. This the analog of queue manager bugfix 20051119. + Files: global/deliver_pass.c. diff -cr /var/tmp/postfix-2.2.6/src/global/deliver_pass.c ./src/global/deliver_pass.c *** /var/tmp/postfix-2.2.6/src/global/deliver_pass.c Mon Oct 25 16:59:04 2004 --- ./src/global/deliver_pass.c Thu Dec 8 16:05:57 2005 *************** *** 72,77 **** --- 72,80 ---- #include #include + #define DELIVER_PASS_DEFER 1 + #define DELIVER_PASS_UNKNOWN 2 + /* deliver_pass_initial_reply - retrieve initial delivery process response */ static int deliver_pass_initial_reply(VSTREAM *stream) *************** *** 141,149 **** ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &stat, ATTR_TYPE_END) != 2) { msg_warn("%s: malformed response", VSTREAM_PATH(stream)); ! stat = -1; } - return (stat); } /* deliver_pass - deliver one per-site queue entry */ --- 144,153 ---- ATTR_TYPE_NUM, MAIL_ATTR_STATUS, &stat, ATTR_TYPE_END) != 2) { msg_warn("%s: malformed response", VSTREAM_PATH(stream)); ! return (DELIVER_PASS_UNKNOWN); ! } else { ! return (stat ? DELIVER_PASS_DEFER : 0); } } /* deliver_pass - deliver one per-site queue entry */ *************** *** 185,194 **** * XXX Can't pass back hop status info because the problem is with a * different transport. */ ! if ((status = deliver_pass_initial_reply(stream)) == 0 ! && (status = deliver_pass_send_request(stream, request, nexthop, ! orig_addr, addr, offs)) == 0) ! status = deliver_pass_final_reply(stream, reason); /* * Clean up. --- 189,208 ---- * XXX Can't pass back hop status info because the problem is with a * different transport. */ ! if (deliver_pass_initial_reply(stream) != 0 ! || deliver_pass_send_request(stream, request, nexthop, ! orig_addr, addr, offs) != 0) { ! status = defer_append(DEL_REQ_TRACE_FLAGS(request->flags), ! request->queue_id, orig_addr, addr, ! offs, "none", request->arrival_time, ! "mail transport unavailable"); ! } else if ((status = deliver_pass_final_reply(stream, reason)) ! == DELIVER_PASS_UNKNOWN) { ! status = defer_append(DEL_REQ_TRACE_FLAGS(request->flags), ! request->queue_id, orig_addr, addr, ! offs, "none", request->arrival_time, ! "unknown mail transport error"); ! } /* * Clean up. diff -cr /var/tmp/postfix-2.2.6/src/lmtp/lmtp.c ./src/lmtp/lmtp.c *** /var/tmp/postfix-2.2.6/src/lmtp/lmtp.c Fri Feb 4 15:41:40 2005 --- ./src/lmtp/lmtp.c Thu Dec 1 09:19:08 2005 *************** *** 365,371 **** * Disconnect if RSET can't be sent over an existing connection. * Discard transcript and status information for sending RSET. */ ! else if (lmtp_rset(state) != 0) { lmtp_chat_reset(state); state->session = lmtp_session_free(state->session); #ifdef USE_SASL_AUTH --- 365,372 ---- * Disconnect if RSET can't be sent over an existing connection. * Discard transcript and status information for sending RSET. */ ! else if (lmtp_rset(state) != 0 ! || (state->features & LMTP_FEATURE_RSET_REJECTED) != 0) { lmtp_chat_reset(state); state->session = lmtp_session_free(state->session); #ifdef USE_SASL_AUTH diff -cr /var/tmp/postfix-2.2.6/src/lmtp/lmtp.h ./src/lmtp/lmtp.h *** /var/tmp/postfix-2.2.6/src/lmtp/lmtp.h Mon Oct 25 16:59:06 2004 --- ./src/lmtp/lmtp.h Thu Dec 1 09:17:05 2005 *************** *** 66,71 **** --- 66,72 ---- #define LMTP_FEATURE_XFORWARD_PROTO (1<<8) #define LMTP_FEATURE_XFORWARD_HELO (1<<9) #define LMTP_FEATURE_XFORWARD_DOMAIN (1<<10) + #define LMTP_FEATURE_RSET_REJECTED (1<<11) /* * lmtp.c diff -cr /var/tmp/postfix-2.2.6/src/lmtp/lmtp_proto.c ./src/lmtp/lmtp_proto.c *** /var/tmp/postfix-2.2.6/src/lmtp/lmtp_proto.c Tue Dec 7 15:18:57 2004 --- ./src/lmtp/lmtp_proto.c Thu Dec 1 09:20:36 2005 *************** *** 31,36 **** --- 31,37 ---- /* accordingly. /* /* lmtp_rset() sends a lone RSET command and waits for the response. + /* In case of a negative reply it sets the CANT_RSET_THIS_SESSION flag. /* /* lmtp_quit() sends a lone QUIT command and waits for the response /* only if waiting for QUIT replies is enabled. *************** *** 354,359 **** --- 355,363 ---- #define SENDING_MAIL \ (recv_state <= LMTP_STATE_DOT) + #define CANT_RSET_THIS_SESSION \ + (state->features |= LMTP_FEATURE_RSET_REJECTED) + /* * Pipelining support requires two loops: one loop for sending and one * for receiving. Each loop has its own independent state. Most of the *************** *** 734,739 **** --- 738,745 ---- * Ignore the RSET response. */ case LMTP_STATE_RSET: + if (resp->code / 100 != 2) + CANT_RSET_THIS_SESSION; recv_state = LMTP_STATE_LAST; break; diff -cr /var/tmp/postfix-2.2.6/src/scache/scache.c ./src/scache/scache.c *** /var/tmp/postfix-2.2.6/src/scache/scache.c Mon Jul 4 16:36:58 2005 --- ./src/scache/scache.c Wed Dec 7 14:33:41 2005 *************** *** 422,427 **** --- 422,428 ---- * dedicated to the scache service. All connection-management stuff is * handled by the common code in multi_server.c. */ + do { if (attr_scan(client_stream, ATTR_FLAG_MORE | ATTR_FLAG_STRICT, ATTR_TYPE_STR, MAIL_ATTR_REQ, scache_request, *************** *** 442,447 **** --- 443,449 ---- ATTR_TYPE_END); } } + } while (vstream_peek(client_stream) > 0); vstream_fflush(client_stream); }