Cutthrough: disable on >1 addr from routing, and on verify option success_on_redirect
authorJeremy Harris <jgh146exb@wizmail.org>
Fri, 8 Jul 2016 17:49:10 +0000 (18:49 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Fri, 8 Jul 2016 17:49:10 +0000 (18:49 +0100)
doc/doc-txt/ChangeLog
src/src/route.c
src/src/verify.c

index 7a5aab755538866120d68b0f6a411a007453e5a0..c1b43244be496dabfdaba93add0ec1d9a951807d 100644 (file)
@@ -40,6 +40,15 @@ JH/09 Bug 1804: Avoid writing msglog files when in -bh or -bhc mode.
 JH/10 Support ${sha256:} applied to a string (as well as the previous
       certificate).
 
+JH/11 Cutthrough: avoid using the callout hints db on a verify callout when
+      a cutthrough deliver is pending, as we always want to make a connection.
+      This also avoids re-routing the message when later placing the cutthrough
+      connection after a verify cache hit.
+      Do not update it with the verify result either.
+
+JH/12 Cutthrough: disable when verify option success_on_redirect is used, and
+      when routing results in more than one destination address.
+
 
 Exim version 4.87
 -----------------
index f7a5325678e587a90cd291bab8ad2a83593fe2c2..57dfc09e6b1c48b8da786b47ea0dbea7347a4f43 100644 (file)
@@ -1657,10 +1657,10 @@ for (r = addr->start_router ? addr->start_router : routers; r; r = nextr)
   set flag. */
 
   if (r->dsn_lasthop && !(addr->dsn_flags & rf_dsnlasthop))
-  {
+    {
     addr->dsn_flags |= rf_dsnlasthop;
     HDEBUG(D_route) debug_printf("DSN: last hop for %s\n", addr->address);
-  }
+    }
 
   HDEBUG(D_route) debug_printf("calling %s router\n", r->name);
 
index 4762760374ed101b7bbf6d2c54ae36cd8176ae8a..a730040286b5936c8d1f28997586f62ab34c6aaf 100644 (file)
@@ -1266,7 +1266,8 @@ can do it there for the non-rcpt-verify case.  For this we keep an addresscount.
        && rcpt_count == 1
        && done
        && yield == OK
-       && (options & (vopt_callout_recipsender|vopt_callout_recippmaster)) == vopt_callout_recipsender
+       &&    (options & (vopt_callout_recipsender|vopt_callout_recippmaster|vopt_success_on_redirect))
+          == vopt_callout_recipsender
        && !random_local_part
        && !pm_mailfrom
        && cutthrough.fd < 0
@@ -2266,6 +2267,12 @@ while (addr_new)
       of $address_data to be that of the child */
 
       vaddr->prop.address_data = addr->prop.address_data;
+
+      /* If stopped because more than one new address, cannot cutthrough */
+
+      if (addr_new && addr_new->next)
+       cancel_cutthrough_connection("multiple addresses from routing");
+
       yield = OK;
       goto out;
       }