Cutthrough: silently ignore ACL control when the message cannot be cutthrough-routed
authorJeremy Harris <jgh146exb@wizmail.org>
Wed, 7 Feb 2018 12:11:22 +0000 (12:11 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Wed, 7 Feb 2018 12:11:22 +0000 (12:11 +0000)
doc/doc-txt/ChangeLog
src/src/acl.c

index bac937e62f7971b9dfbea4d9df98b587ad38ef3b..8221fb564169877e0f76361454097b9987c22f4c 100644 (file)
@@ -77,6 +77,11 @@ JH/14 Bug 2174: A timeout on connect for a callout was also erroneously seen as
       was marked defer_ok.  Fix to keep the two timeout-detection methods
       separate.
 
       was marked defer_ok.  Fix to keep the two timeout-detection methods
       separate.
 
+JH/15 Relax results from ACL control request to enable cutthrough, in
+      unsupported situations, from error to silently (except under debug)
+      ignoring.  This covers use with PRDR, frozen messages, queue-only and
+      fake-reject.
+
 
 Exim version 4.90
 -----------------
 
 Exim version 4.90
 -----------------
index 9efc85844ca484d02f5c3040fb31848ed6cf4dc4..5b30535e80750671072da00ff0dacb40b2e062d2 100644 (file)
@@ -3251,6 +3251,8 @@ for (; cb != NULL; cb = cb->next)
        break;
 
        case CONTROL_CUTTHROUGH_DELIVERY:
        break;
 
        case CONTROL_CUTTHROUGH_DELIVERY:
+       {
+       uschar * ignored = NULL;
 #ifndef DISABLE_PRDR
        if (prdr_requested)
 #else
 #ifndef DISABLE_PRDR
        if (prdr_requested)
 #else
@@ -3259,20 +3261,20 @@ for (; cb != NULL; cb = cb->next)
          /* Too hard to think about for now.  We might in future cutthrough
          the case where both sides handle prdr and this-node prdr acl
          is "accept" */
          /* Too hard to think about for now.  We might in future cutthrough
          the case where both sides handle prdr and this-node prdr acl
          is "accept" */
-         *log_msgptr = string_sprintf("PRDR on %s reception\n", arg);
+         ignored = US"PRDR active";
        else
          {
          if (deliver_freeze)
        else
          {
          if (deliver_freeze)
-           *log_msgptr = US"frozen";
+           ignored = US"frozen";
          else if (queue_only_policy)
          else if (queue_only_policy)
-           *log_msgptr = US"queue-only";
+           ignored = US"queue-only";
          else if (fake_response == FAIL)
          else if (fake_response == FAIL)
-           *log_msgptr = US"fakereject";
+           ignored = US"fakereject";
          else
            {
            if (rcpt_count == 1)
              {
          else
            {
            if (rcpt_count == 1)
              {
-             cutthrough.delivery = TRUE;
+             cutthrough.delivery = TRUE;       /* control accepted */
              while (*p == '/')
                {
                const uschar * pp = p+1;
              while (*p == '/')
                {
                const uschar * pp = p+1;
@@ -3288,13 +3290,13 @@ for (; cb != NULL; cb = cb->next)
                }
              }
            else
                }
              }
            else
-             DEBUG(D_acl) debug_printf(" cutthrough request ignored for nonfirst rcpt\n");
-           break;
+             ignored = US"nonfirst rcpt";
            }
            }
-         *log_msgptr = string_sprintf("\"control=%s\" on %s item",
-                                       arg, *log_msgptr);
          }
          }
-       return ERROR;
+       DEBUG(D_acl) if (ignored)
+         debug_printf(" cutthrough request ignored on %s item\n", ignored);
+       }
+       break;
 
 #ifdef SUPPORT_I18N
        case CONTROL_UTF8_DOWNCONVERT:
 
 #ifdef SUPPORT_I18N
        case CONTROL_UTF8_DOWNCONVERT: