Cutthrough: expand transport dkim_domain option when testing for dkim signing
authorJeremy Harris <jgh146exb@wizmail.org>
Sun, 10 Jul 2016 13:20:03 +0000 (14:20 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sun, 10 Jul 2016 13:20:03 +0000 (14:20 +0100)
doc/doc-docbook/spec.xfpt
doc/doc-txt/ChangeLog
src/src/verify.c

index e38e2847eb723e9408b9e01bf2d6cb6d6c80dd48..128aef3d139a593c9c63201737dad49b43f5b4fd 100644 (file)
@@ -29044,7 +29044,7 @@ any ACL verb, including &%deny%& (though this is potentially useful only in a
 RCPT ACL).
 
 Headers will not be added to the message if the modifier is used in
 RCPT ACL).
 
 Headers will not be added to the message if the modifier is used in
-DATA, MIME or DKIM ACLs for messages delivered by cutthrough routing.
+DATA, MIME or DKIM ACLs for a message delivered by cutthrough routing.
 
 Leading and trailing newlines are removed from
 the data for the &%add_header%& modifier; if it then
 
 Leading and trailing newlines are removed from
 the data for the &%add_header%& modifier; if it then
@@ -29145,8 +29145,8 @@ receiving a message). The message must ultimately be accepted for
 with any ACL verb, including &%deny%&, though this is really not useful for
 any verb that doesn't result in a delivered message.
 
 with any ACL verb, including &%deny%&, though this is really not useful for
 any verb that doesn't result in a delivered message.
 
-Headers will not be removed to the message if the modifier is used in
-DATA, MIME or DKIM ACLs for messages delivered by cutthrough routing.
+Headers will not be removed from the message if the modifier is used in
+DATA, MIME or DKIM ACLs for a message delivered by cutthrough routing.
 
 More than one header can be removed at the same time by using a colon separated
 list of header names. The header matching is case insensitive. Wildcards are
 
 More than one header can be removed at the same time by using a colon separated
 list of header names. The header matching is case insensitive. Wildcards are
index c1b43244be496dabfdaba93add0ec1d9a951807d..0fe63f123ada43d5843ce2a226b0b8722f935ffd 100644 (file)
@@ -49,6 +49,12 @@ JH/11 Cutthrough: avoid using the callout hints db on a verify callout when
 JH/12 Cutthrough: disable when verify option success_on_redirect is used, and
       when routing results in more than one destination address.
 
 JH/12 Cutthrough: disable when verify option success_on_redirect is used, and
       when routing results in more than one destination address.
 
+JH/13 Cutthrough: expand transport dkim_domain option when testing for dkim
+      signing (which inhibits the cutthrough capability).  Previously only
+      the presence of an option was tested; now an expansion evaluating as
+      empty is permissible (obviously it should depend only on data available
+      when the cutthrough connection is made).
+
 
 Exim version 4.87
 -----------------
 
 Exim version 4.87
 -----------------
index a730040286b5936c8d1f28997586f62ab34c6aaf..3624af0bc9e428c311d199b7ffc6acd26fd10b26 100644 (file)
@@ -889,13 +889,14 @@ can do it there for the non-rcpt-verify case.  For this we keep an addresscount.
     /* Need proper integration with the proper transport mechanism. */
     if (cutthrough.delivery)
       {
     /* Need proper integration with the proper transport mechanism. */
     if (cutthrough.delivery)
       {
+      uschar * s;
       if (addr->transport->filter_command)
         {
         cutthrough.delivery = FALSE;
         HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of transport filter\n");
         }
 #ifndef DISABLE_DKIM
       if (addr->transport->filter_command)
         {
         cutthrough.delivery = FALSE;
         HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of transport filter\n");
         }
 #ifndef DISABLE_DKIM
-      if (ob->dkim_domain)
+      else if ((s = ob->dkim_domain) && (s = expand_string(s)) && *s)
         {
         cutthrough.delivery = FALSE;
         HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of DKIM signing\n");
         {
         cutthrough.delivery = FALSE;
         HDEBUG(D_acl|D_v) debug_printf("Cutthrough cancelled by presence of DKIM signing\n");