]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.12-20140219
authorWietse Venema <wietse@porcupine.org>
Wed, 19 Feb 2014 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Thu, 20 Feb 2014 03:49:19 +0000 (22:49 -0500)
postfix/HISTORY
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/postconf.proto
postfix/src/global/mail_version.h
postfix/src/master/master_spawn.c
postfix/src/smtp/lmtp_params.c
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_params.c
postfix/src/smtpd/Makefile.in

index da3b242d2cfe60ee0122a7bed5c3167285d83966..fd640a9505516160035e93410af9739fe17e52c3 100644 (file)
@@ -19548,3 +19548,25 @@ Apologies for any names omitted.
        Testbed: unsupported HANGUP access map action that drops
        the connection without responding to the remote SMTP client.
        File: smtpd/smtpd_check.c.
+
+20140214
+
+       Workaround: apparently some buggy kernels report WIFSTOPPED
+       events to the parent process (master daemon) instead of the
+       tracing process (e.g., gdb). File: master/master_spawn.c.
+
+20140218
+
+       Workaround: require that a queue file is older than
+       $minimal_backoff_time, before falling back from failed TLS
+       (both during or after the TLS handshake) to plaintext
+       delivery.  Viktor Dukhovni. Files: smtp/smtp.h, smtp/smtp.c,
+       smtp/lmtp_params.c, smtp/smtp_params.c.
+
+20140219
+
+       Workaround: disable the fallback to plaintext when all
+       recipients have already been bounced or deferred. This
+       happens for example when TLS breaks after the TLS handshake
+       while talking to the "final" SMTP server.  Wietse and Viktor.
+       Files: smtp/smtp.h.
index 592ea1daa4cb9253e8724e4cf02d4f68735006af..2f40f954175581480aa61124343f322c56dae580 100644 (file)
@@ -14070,7 +14070,8 @@ non-permanent error code.  This feature is available in Postfix
 <dt><b><a name="reject_unknown_recipient_domain">reject_unknown_recipient_domain</a></b></dt>
 
 <dd>Reject the request when Postfix is not final destination for
-the recipient domain, and the RCPT TO domain has 1) no DNS A or MX
+the recipient domain, and the RCPT TO domain has 1) no DNS MX and
+no DNS address
 record or 2) a malformed MX record such as a record with
 a zero-length MX hostname (Postfix version 2.3 and later). <br> The
 <a href="postconf.5.html#unknown_address_reject_code">unknown_address_reject_code</a> parameter specifies the numerical
@@ -14803,7 +14804,8 @@ Postfix version 2.1 and later. </dd>
 <dt><b><a name="reject_unknown_sender_domain">reject_unknown_sender_domain</a></b></dt>
 
 <dd>Reject the request when Postfix is not final destination for
-the sender address, and the MAIL FROM domain has 1) no DNS A or MX
+the sender address, and the MAIL FROM domain has 1) no DNS MX and
+no DNS address
 record, or 2) a malformed MX record such as a record with
 a zero-length MX hostname (Postfix version 2.3 and later). <br> The
 <a href="postconf.5.html#unknown_address_reject_code">unknown_address_reject_code</a> parameter specifies the numerical
index 1d77ad54eeb9d1f418183adf1a8c5011e8d3db31..4e83b67b9a9cde8064faf71e768918b56368fc57 100644 (file)
@@ -9320,7 +9320,8 @@ non-permanent error code.  This feature is available in Postfix
 .br
 .IP "\fBreject_unknown_recipient_domain\fR"
 Reject the request when Postfix is not final destination for
-the recipient domain, and the RCPT TO domain has 1) no DNS A or MX
+the recipient domain, and the RCPT TO domain has 1) no DNS MX and
+no DNS address
 record or 2) a malformed MX record such as a record with
 a zero-length MX hostname (Postfix version 2.3 and later).
 .br
@@ -9893,7 +9894,8 @@ Postfix version 2.1 and later.
 .br
 .IP "\fBreject_unknown_sender_domain\fR"
 Reject the request when Postfix is not final destination for
-the sender address, and the MAIL FROM domain has 1) no DNS A or MX
+the sender address, and the MAIL FROM domain has 1) no DNS MX and
+no DNS address
 record, or 2) a malformed MX record such as a record with
 a zero-length MX hostname (Postfix version 2.3 and later).
 .br
index f62ce69c1e90c34546e29c1c3ec38f68a0463449..937a454bd68b1ab3420e1e0f0ae03656e3bfaf9f 100644 (file)
@@ -5896,7 +5896,8 @@ non-permanent error code.  This feature is available in Postfix
 <dt><b><a name="reject_unknown_recipient_domain">reject_unknown_recipient_domain</a></b></dt>
 
 <dd>Reject the request when Postfix is not final destination for
-the recipient domain, and the RCPT TO domain has 1) no DNS A or MX
+the recipient domain, and the RCPT TO domain has 1) no DNS MX and
+no DNS address
 record or 2) a malformed MX record such as a record with
 a zero-length MX hostname (Postfix version 2.3 and later). <br> The
 unknown_address_reject_code parameter specifies the numerical
@@ -6354,7 +6355,8 @@ Postfix version 2.1 and later. </dd>
 <dt><b><a name="reject_unknown_sender_domain">reject_unknown_sender_domain</a></b></dt>
 
 <dd>Reject the request when Postfix is not final destination for
-the sender address, and the MAIL FROM domain has 1) no DNS A or MX
+the sender address, and the MAIL FROM domain has 1) no DNS MX and
+no DNS address
 record, or 2) a malformed MX record such as a record with
 a zero-length MX hostname (Postfix version 2.3 and later). <br> The
 unknown_address_reject_code parameter specifies the numerical
index 459a55f99f90cbcc0abd7a8ffd3b46bdacea938d..e933d4b8f27e37dc08db818c0c6d790799a78a92 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20140209"
+#define MAIL_RELEASE_DATE      "20140219"
 #define MAIL_VERSION_NUMBER    "2.12"
 
 #ifdef SNAPSHOT
index 6318e6bc24a883a50ebf601641f253089dc18613..57baddc9710a37e27b39058770962d24c376a08f 100644 (file)
@@ -310,7 +310,21 @@ void    master_reap_child(void)
        (MASTER_MARKED_FOR_DELETION(serv) \
            && WTERMSIG(status) == MASTER_KILL_SIGNAL)
 
+       /*
+        * XXX The code for WIFSTOPPED() is here in case some buggy kernel
+        * reports WIFSTOPPED() events to a Postfix daemon's parent process
+        * (the master(8) daemon) instead of the tracing process (e.g., gdb).
+        * 
+        * The WIFSTOPPED() test prevents master(8) from deleting its record of
+        * a child process that is stopped. That would cause a master(8)
+        * panic (unknown child) when the child terminates.
+        */
        if (!NORMAL_EXIT_STATUS(status)) {
+           if (WIFSTOPPED(status)) {
+               msg_warn("process %s pid %d stopped by signal %d",
+                        serv->path, pid, WSTOPSIG(status));
+               continue;
+           }
            if (WIFEXITED(status))
                msg_warn("process %s pid %d exit status %d",
                         serv->path, pid, WEXITSTATUS(status));
index 68a2739ac2421e4353409b5cdf95d731c3711566..fdd11868edd583662f5437e90d2a355267d005a2 100644 (file)
@@ -71,6 +71,7 @@
        VAR_LMTP_RSET_TMOUT, DEF_LMTP_RSET_TMOUT, &var_smtp_rset_tmout, 1, 0,
        VAR_LMTP_QUIT_TMOUT, DEF_LMTP_QUIT_TMOUT, &var_smtp_quit_tmout, 1, 0,
        VAR_LMTP_PIX_THRESH, DEF_LMTP_PIX_THRESH, &var_smtp_pix_thresh, 0, 0,
+       VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 1, 0,
        VAR_LMTP_PIX_DELAY, DEF_LMTP_PIX_DELAY, &var_smtp_pix_delay, 1, 0,
        VAR_LMTP_CACHE_CONNT, DEF_LMTP_CACHE_CONNT, &var_smtp_cache_conn, 1, 0,
        VAR_LMTP_REUSE_TIME, DEF_LMTP_REUSE_TIME, &var_smtp_reuse_time, 1, 0,
index 9067bb730cbfa71fbaaa5ea228310614b379a2c0..768b576476d45e328f285c51a34b5a5e8e523206 100644 (file)
@@ -797,6 +797,7 @@ char   *var_smtp_bind_addr;
 char   *var_smtp_bind_addr6;
 bool    var_smtp_rand_addr;
 int     var_smtp_pix_thresh;
+int     var_min_backoff_time;
 int     var_smtp_pix_delay;
 int     var_smtp_line_limit;
 char   *var_smtp_helo_name;
index 99ab7391f76a72ccb72af4c007d8f6226c7d0c54..66e891024f45dc97a797eded1eb0c3994c7d194f 100644 (file)
@@ -462,19 +462,27 @@ extern HBC_CALL_BACKS smtp_hbc_callbacks[];
 #define HAVE_SASL_CREDENTIALS  (0)
 #endif
 
+#define PREACTIVE_DELAY \
+       (session->state->request->msg_stats.active_arrival.tv_sec - \
+        session->state->request->msg_stats.incoming_arrival.tv_sec)
+
 #define PLAINTEXT_FALLBACK_OK_AFTER_STARTTLS_FAILURE \
        (session->tls_context == 0 \
            && session->tls->level == TLS_LEV_MAY \
+           && PREACTIVE_DELAY >= var_min_backoff_time \
            && !HAVE_SASL_CREDENTIALS)
 
 #define PLAINTEXT_FALLBACK_OK_AFTER_TLS_SESSION_FAILURE \
        (session->tls_context != 0 \
+           && SMTP_RCPT_LEFT(state) > 0 \
            && session->tls->level == TLS_LEV_MAY \
+           && PREACTIVE_DELAY >= var_min_backoff_time \
            && !HAVE_SASL_CREDENTIALS)
 
  /*
   * XXX The following will not retry recipients that were deferred while the
-  * SMTP_MISC_FLAG_FINAL_SERVER flag was already set.
+  * SMTP_MISC_FLAG_FINAL_SERVER flag was already set. This includes the case
+  * when TLS fails in the middle of a delivery.
   */
 #define RETRY_AS_PLAINTEXT do { \
        session->tls_retry_plain = 1; \
index c8478b5ef7d23d1a43443524ca6b94bda8a903a6..55a6e71531e84eb24c983fd17981e7152a552688 100644 (file)
@@ -73,6 +73,7 @@
        VAR_SMTP_QUIT_TMOUT, DEF_SMTP_QUIT_TMOUT, &var_smtp_quit_tmout, 1, 0,
        VAR_SMTP_PIX_THRESH, DEF_SMTP_PIX_THRESH, &var_smtp_pix_thresh, 0, 0,
        VAR_SMTP_PIX_DELAY, DEF_SMTP_PIX_DELAY, &var_smtp_pix_delay, 1, 0,
+       VAR_MIN_BACKOFF_TIME, DEF_MIN_BACKOFF_TIME, &var_min_backoff_time, 1, 0,
        VAR_SMTP_CACHE_CONNT, DEF_SMTP_CACHE_CONNT, &var_smtp_cache_conn, 1, 0,
        VAR_SMTP_REUSE_TIME, DEF_SMTP_REUSE_TIME, &var_smtp_reuse_time, 1, 0,
 #ifdef USE_TLS
index d3607e23f0a73be6f5cc5e5950af446b7e551e78..87160dc280c0eb799c19edf779aa6337302a2d89 100644 (file)
@@ -306,6 +306,7 @@ smtpd_check.o: ../../include/recipient_list.h
 smtpd_check.o: ../../include/record.h
 smtpd_check.o: ../../include/resolve_clnt.h
 smtpd_check.o: ../../include/resolve_local.h
+smtpd_check.o: ../../include/smtp_stream.h
 smtpd_check.o: ../../include/sock_addr.h
 smtpd_check.o: ../../include/split_at.h
 smtpd_check.o: ../../include/string_list.h