]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.2.12 postfix-2.2 v2.2.12
authorWietse Venema <wietse@porcupine.org>
Sun, 21 Oct 2007 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 21:16:24 +0000 (16:16 -0500)
postfix/HISTORY
postfix/src/flush/flush.c
postfix/src/global/mail_version.h
postfix/src/lmtp/lmtp.c
postfix/src/postdrop/postdrop.c
postfix/src/smtp/smtp_connect.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtpd/smtpd_check.c

index e13b88a748bbae098a25db076cd4ae073ac9c09e..3e970c8ad564a80e0be792c5f7b579a850ffc387 100644 (file)
@@ -11012,3 +11012,36 @@ Apologies for any names omitted.
        if Postfix could somehow be forced to send HELO instead of
        EHLO. Victor Duchovni.  File: src/smtp/smtp_proto.c.
 
+20061203
+
+       Bugfix (introduced with Postfix 2.2): with SMTP server
+       tarpit delays of smtp_rset_timeout or larger, the SMTP
+       client could get out of sync with the server while reusing
+       a connection.  The symptoms were "recipient rejected .. in
+       reply to DATA".  Fix by Victor Duchovni and Wietse.  File:
+       smtp/smtp_proto.c, smtp/smtp_connect.c. Back-ported from
+       Postfix 2.3.
+
+       Safety: additional error tests to prevent connection reuse
+       after timeout error. Files: lmtp/lmtp.c, smtp/smtp_connect.c.
+       Back-ported from Postfix 2.3.
+
+20070529
+
+       Cleanup: misleading error message while discarding malformed
+       input after queue file write error. File postdrop/postdrop.c.
+
+20070911
+
+       Bugfix (introduced Postfix 2.2.11): TLS client certificate
+       with unparsable canonical name caused the SMTP server's
+       policy client to allocate zero-length memory, triggering
+       an assertion that it shouldn't do such things.  File:
+       smtpd/smtpd_check.c.
+
+20070917
+
+       Workaround: the flush daemon forces an access time update
+       for the per-destination logfile, to prevent an excessive
+       rate of delivery attempts when the queue file system is
+       mounted with "noatime".  File: flush/flush.c.
index ffdf81a4189ab0c032f0ab420ee82b0b2df972a9..d9a12209b71c7f7d0369c170ee40dd71dec63cf2 100644 (file)
 
 #include <sys_defs.h>
 #include <sys/stat.h>
+#include <sys/time.h>
 #include <unistd.h>
 #include <stdlib.h>
 #include <utime.h>
@@ -479,6 +480,11 @@ static int flush_send_path(const char *path, int how)
     if (count > 0 && ftruncate(vstream_fileno(log), (off_t) 0) < 0)
        msg_fatal("%s: truncate fast flush logfile %s: %m", myname, path);
 
+    /*
+     * Workaround for noatime mounts. Use futimes() if available.
+     */
+    (void) utimes(VSTREAM_PATH(log), (struct timeval *) 0);
+
     /*
      * Request delivery and clean up.
      */
index b9c9b6c8fd78841c5a256bb2d5d45625e1aae3d0..6c9b58af5bbb40375ff1afd3408b1bb0dd3ea49e 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20060724"
-#define MAIL_VERSION_NUMBER    "2.2.11"
+#define MAIL_RELEASE_DATE      "20071021"
+#define MAIL_VERSION_NUMBER    "2.2.12"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #ifdef SNAPSHOT
index 763c052299c7f4314f85b25c6f7d6a14a0aea3b2..2dd66f00c53b7ec4e29597eaf180d8f68f87f9b1 100644 (file)
@@ -443,6 +443,7 @@ static int deliver_message(DELIVER_REQUEST *request, char **unused_argv)
     if (state->session != 0
        && (!var_lmtp_cache_conn
            || vstream_ferror(state->session->stream)
+           || vstream_ftimeout(state->session->stream)
            || vstream_feof(state->session->stream)))
        state->session = lmtp_session_free(state->session);
 
index 7d22955d84fc737b41c64034a0b78cfadfbd8a24..77ad3b11d8d05b75ec7567650297f11f1de48567 100644 (file)
@@ -406,6 +406,8 @@ int     main(int argc, char **argv)
            while ((rec_type = rec_get(VSTREAM_IN, buf, var_line_limit)) > 0
                   && rec_type != REC_TYPE_END)
                 /* void */ ;
+           if (rec_type <= 0)
+               msg_fatal("uid=%ld: malformed input", (long) uid);
            break;
        }
        if (rec_type == REC_TYPE_END)
index 047d720f745d8dac332da80360e7f42e1a47cbfa..3004ffb6e92f3b66e96a77d56c62e0ab8d1c574f 100644 (file)
@@ -378,7 +378,11 @@ static void smtp_cleanup_session(SMTP_STATE *state)
      * logical next-hop state, so that we won't cache connections to
      * less-preferred MX hosts under the logical next-hop destination.
      */
-    if (session->reuse_count > 0) {
+    if (session->reuse_count > 0
+    /* Redundant tests for safety... */
+       && vstream_ferror(session->stream) == 0
+       && vstream_ftimeout(session->stream) == 0
+       && vstream_feof(session->stream) == 0) {
        smtp_save_session(state);
        if (HAVE_NEXTHOP_STATE(state))
            FREE_NEXTHOP_STATE(state);
@@ -709,6 +713,7 @@ int     smtp_connect(SMTP_STATE *state)
                if ((session->features & SMTP_FEATURE_FROM_CACHE) == 0
                    && smtp_helo(state, misc_flags) != 0) {
                    if (vstream_ferror(session->stream) == 0
+                       && vstream_ftimeout(session->stream) == 0
                        && vstream_feof(session->stream) == 0)
                        smtp_quit(state);
                } else
index 7bb244af39d8a0cfc2847d70e6585678ee409bfb..7fb37204bd01cfe4214ab0bb8cdf4d143e41bb14 100644 (file)
@@ -888,6 +888,8 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
     } while (0)
 
 #define RETURN(x) do { \
+       if (recv_state != SMTP_STATE_LAST) \
+           DONT_CACHE_THIS_SESSION; \
        vstring_free(next_command); \
        if (session->mime_state) \
            session->mime_state = mime_state_free(session->mime_state); \
index 96930395c569570ea2a97dfb8e5dfef9212940a8..286fffb6786a854db6df37b81b8497bc41a51147 100644 (file)
@@ -3072,7 +3072,7 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
            coded_CN_buf = 0; \
            coded_CN = ""; \
        } else { \
-           coded_CN_buf = vstring_alloc(strlen(CN)); \
+           coded_CN_buf = vstring_alloc(strlen(CN) + 1); \
            xtext_quote(coded_CN_buf, CN, ""); \
            coded_CN = STR(coded_CN_buf); \
        } \