]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.0.20 postfix-2.0 v2.0.20
authorWietse Venema <wietse@porcupine.org>
Thu, 22 Apr 2004 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 15:51:51 +0000 (15:51 +0000)
postfix/HISTORY
postfix/html/postdrop.1.html
postfix/man/man1/postdrop.1
postfix/src/global/mail_version.h
postfix/src/lmtp/lmtp.c
postfix/src/postdrop/postdrop.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd.h
postfix/src/smtpd/smtpd_state.c
postfix/src/trivial-rewrite/resolve.c
postfix/src/util/dict_mysql.c

index 5a315034715a095cbd75ba4e8615731a08fa621a..1dfa6a0594f785d27a8584162520d93e8dfacd2a 100644 (file)
@@ -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
index be22016423954f3511546c389a84ad75531dc057..68eef09e30ee7ee0cd1ea6a85cbe24c8fc673248 100644 (file)
@@ -13,7 +13,8 @@ POSTDROP(1)                                           POSTDROP(1)
 
        Options:
 
-       <b>-c</b>     The <b>main.cf</b> configuration  file  is  in  the  named
+       <b>-c</b> <i>config_dir</i>
+              The <b>main.cf</b> configuration  file  is  in  the  named
               directory  instead  of  the  default  configuration
               directory. See  also  the  MAIL_CONFIG  environment
               setting below.
index 17eddc7401a1a97e1f26a55f67e4f18b85f82574..8016498e706235f7f0936bbaf9ac0d583fae476e 100644 (file)
@@ -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.
index 253256add9d4845b7b23cc6e3c6cd9cf15f15b40..fd4ac8f2bab8f05075edaa2ae942b4f6aa92c07a 100644 (file)
   * 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;
 
  /*
index 9b1198f7a8ce19ce33a4322fd0b351d49bda40d8..146f98a997b95549540d61c64fa009064402ea7d 100644 (file)
@@ -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);
 
     /*
index 7afa0f9ff23331639eb5412776b1408a4526ae98..6f48a294954b11266b723e46a5cde853898f2443 100644 (file)
@@ -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);
index 4fd11947101cba6dc949bf9ec1b46dc803952879..1e7135ad0025517d5fa895fc1e7fb05de639f9bc 100644 (file)
@@ -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 */
index a369b7e8603abae1d5cbeb6925777f733d03c77f..9bdc706b40372ebc352638a306efe2b35846ea3d 100644 (file)
@@ -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;
index 6475ae49b05f220bcbd470511cd37ed5f1f8de76..18b049b8a2a585ed244fc3d1827343a1c3d883e4 100644 (file)
@@ -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;
index a02e860184fd78fd60f2f416a8224db89b640bac..96e35805a6d7e279d7bdb44079dc63aef5bfe71a 100644 (file)
@@ -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; \
     }
 
     /*
index baecfb85b12e8574d768877ba39f4973454b55ea..4b3ab0590a07b3b1ca2c49c21d70a10f02486788 100644 (file)
@@ -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));
 }