From: Wietse Venema Date: Thu, 22 Apr 2004 05:00:00 +0000 (-0500) Subject: postfix-2.0.20 X-Git-Tag: v2.0.20^0 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b8d754b9f2d96501c1ca0795eda88ce25824b201;p=thirdparty%2Fpostfix.git postfix-2.0.20 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 5a3150347..1dfa6a059 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -7977,6 +7977,43 @@ Apologies for any names omitted. keys. Problem reported by Andrei Koulik. Files: util/match_ops.c, src/trivial-rewrite/transport.c. +20040401 + + Bugfix: the MySQL client aborted because of a spurious + dict_register() call, causing complaints about a table + already being registered. File: util/dict_mysql.c. + +20040407 + + Bugfix: missing return statement at the end of the + FREE_MEMORY_AND_RETURN error handling macro. This could + cause core dump after table lookup failure. Adi Prasaja. + File: trivial-rewrite/resolve.c. + +20040414 + + Bugfix: postdrop should not enable SIGHUP (and abort mail + delivery) when SIGHUP was ignored by the parent process. + File: postdrop/postdrop.c. Victor Duchovni, Morgan Stanley. + + +20040415 + + Bugfix: the LMTP client attempted to reuse a connection + after timeout, causing protocol synchronization errors. + Reported by Rob Mueller. File: lmtp/lmtp.c. + +20040421 + + Workaround: allow pipelined SMTP clients to overshoot the + SMTP server recipient limit without triggering the server + hard error limit. The SMTP server does not count "too many + recipients" towards the hard error limit, as long as the + number of excess recipients stays within a hard-coded + overshoot limit of 1000. Based on a Postfix 2.1 solution + that was developed in cooperation with Victor Duchovni. + Files: smtpd/smtpd.c, smtpd/smtpd_state.c, smtpd/smtpd.h. + Open problems: Doc: mention the proxy_interfaces parameter everywhere the diff --git a/postfix/html/postdrop.1.html b/postfix/html/postdrop.1.html index be2201642..68eef09e3 100644 --- a/postfix/html/postdrop.1.html +++ b/postfix/html/postdrop.1.html @@ -13,7 +13,8 @@ POSTDROP(1) POSTDROP(1) Options: - -c The main.cf configuration file is in the named + -c config_dir + The main.cf configuration file is in the named directory instead of the default configuration directory. See also the MAIL_CONFIG environment setting below. diff --git a/postfix/man/man1/postdrop.1 b/postfix/man/man1/postdrop.1 index 17eddc740..8016498e7 100644 --- a/postfix/man/man1/postdrop.1 +++ b/postfix/man/man1/postdrop.1 @@ -16,7 +16,7 @@ The \fBpostdrop\fR command creates a file in the \fBmaildrop\fR directory and copies its standard input to the file. Options: -.IP \fB-c \fIconfig_dir\fR +.IP "\fB-c \fIconfig_dir\fR" The \fBmain.cf\fR configuration file is in the named directory instead of the default configuration directory. See also the MAIL_CONFIG environment setting below. diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 253256add..fd4ac8f2b 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,10 +20,10 @@ * Patches change the patchlevel and the release date. Snapshots change the * release date only, unless they include the same bugfix as a patch release. */ -#define MAIL_RELEASE_DATE "20040312" +#define MAIL_RELEASE_DATE "20040422" #define VAR_MAIL_VERSION "mail_version" -#define DEF_MAIL_VERSION "2.0.19" +#define DEF_MAIL_VERSION "2.0.20" extern char *var_mail_version; /* diff --git a/postfix/src/lmtp/lmtp.c b/postfix/src/lmtp/lmtp.c index 9b1198f7a..146f98a99 100644 --- a/postfix/src/lmtp/lmtp.c +++ b/postfix/src/lmtp/lmtp.c @@ -417,10 +417,14 @@ static int deliver_message(DELIVER_REQUEST *request, char **unused_argv) lmtp_chat_notify(state); /* - * Disconnect if we're not cacheing connections. The pipelined protocol - * state machine knows if it should have sent a QUIT command. + * Disconnect if we're not caching connections. The pipelined protocol + * state machine knows if it should have sent a QUIT command. Do not + * cache a broken connection. */ - if (state->session != 0 && !var_lmtp_cache_conn) + if (state->session != 0 + && (!var_lmtp_cache_conn + || vstream_ferror(state->session->stream) + || vstream_feof(state->session->stream))) state->session = lmtp_session_free(state->session); /* diff --git a/postfix/src/postdrop/postdrop.c b/postfix/src/postdrop/postdrop.c index 7afa0f9ff..6f48a2949 100644 --- a/postfix/src/postdrop/postdrop.c +++ b/postfix/src/postdrop/postdrop.c @@ -10,7 +10,7 @@ /* directory and copies its standard input to the file. /* /* Options: -/* .IP \fB-c \fIconfig_dir\fR +/* .IP "\fB-c \fIconfig_dir\fR" /* The \fBmain.cf\fR configuration file is in the named directory /* instead of the default configuration directory. See also the /* MAIL_CONFIG environment setting below. @@ -266,7 +266,8 @@ int main(int argc, char **argv) signal(SIGPIPE, SIG_IGN); signal(SIGXFSZ, SIG_IGN); - signal(SIGHUP, postdrop_sig); + if (signal(SIGHUP, SIG_IGN) == SIG_DFL) + signal(SIGHUP, postdrop_sig); signal(SIGINT, postdrop_sig); signal(SIGQUIT, postdrop_sig); signal(SIGTERM, postdrop_sig); diff --git a/postfix/src/smtpd/smtpd.c b/postfix/src/smtpd/smtpd.c index 4fd119471..1e7135ad0 100644 --- a/postfix/src/smtpd/smtpd.c +++ b/postfix/src/smtpd/smtpd.c @@ -956,8 +956,11 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv) } } if (var_smtpd_rcpt_limit && state->rcpt_count >= var_smtpd_rcpt_limit) { - state->error_mask |= MAIL_ERROR_POLICY; smtpd_chat_reply(state, "452 Error: too many recipients"); + /* XXX Turning off the error sleep involves too invasive changes. */ + if (state->rcpt_overshoot++ < 1000) + return (0); + state->error_mask |= MAIL_ERROR_POLICY; return (-1); } if (SMTPD_STAND_ALONE(state) == 0) { @@ -987,6 +990,8 @@ static void rcpt_reset(SMTPD_STATE *state) state->recipient = 0; } state->rcpt_count = 0; + /* XXX Must flush the command history. */ + state->rcpt_overshoot = 0; } /* data_cmd - process DATA command */ diff --git a/postfix/src/smtpd/smtpd.h b/postfix/src/smtpd/smtpd.h index a369b7e86..9bdc706b4 100644 --- a/postfix/src/smtpd/smtpd.h +++ b/postfix/src/smtpd/smtpd.h @@ -73,6 +73,7 @@ typedef struct SMTPD_STATE { int recursion; off_t msg_size; int junk_cmds; + int rcpt_overshoot; #ifdef USE_SASL_AUTH #if SASL_VERSION_MAJOR >= 2 const char *sasl_mechanism_list; diff --git a/postfix/src/smtpd/smtpd_state.c b/postfix/src/smtpd/smtpd_state.c index 6475ae49b..18b049b8a 100644 --- a/postfix/src/smtpd/smtpd_state.c +++ b/postfix/src/smtpd/smtpd_state.c @@ -92,6 +92,7 @@ void smtpd_state_init(SMTPD_STATE *state, VSTREAM *stream) state->recursion = 0; state->msg_size = 0; state->junk_cmds = 0; + state->rcpt_overshoot = 0; state->defer_if_permit_client = 0; state->defer_if_permit_helo = 0; state->defer_if_permit_sender = 0; diff --git a/postfix/src/trivial-rewrite/resolve.c b/postfix/src/trivial-rewrite/resolve.c index a02e86018..96e35805a 100644 --- a/postfix/src/trivial-rewrite/resolve.c +++ b/postfix/src/trivial-rewrite/resolve.c @@ -200,6 +200,7 @@ void resolve_addr(char *addr, VSTRING *channel, VSTRING *nexthop, tok822_free_tree(tree); \ if (addr_buf) \ vstring_free(addr_buf); \ + return; \ } /* diff --git a/postfix/src/util/dict_mysql.c b/postfix/src/util/dict_mysql.c index baecfb85b..4b3ab0590 100644 --- a/postfix/src/util/dict_mysql.c +++ b/postfix/src/util/dict_mysql.c @@ -373,7 +373,6 @@ DICT *dict_mysql_open(const char *name, int unused_open_flags, int dict_flags) dict_mysql->name->len_hosts); if (dict_mysql->pldb == NULL) msg_fatal("couldn't intialize pldb!\n"); - dict_register(name, (DICT *) dict_mysql); return (DICT_DEBUG (&dict_mysql->dict)); }