ARC: on the smtp transport option take empty or forced-fail to disable signing
[exim.git] / src / src / transports / smtp.c
index bd1e20d7fc3a35667af2e79d9a71a71fc09ac1a2..2dfb5b73af4ad31e9f192db1d82d648207f70100 100644 (file)
@@ -3004,15 +3004,21 @@ else
     uschar * s = sx.ob->arc_sign;
     if (s)
       {
-      if (!(sx.ob->dkim.arc_signspec = expand_string(s)))
+      if (!(sx.ob->dkim.arc_signspec = s = expand_string(s)))
        {
-       message = US"failed to expand arc_sign";
-       sx.ok = FALSE;
-       goto SEND_FAILED;
+       if (!expand_string_forcedfail)
+         {
+         message = US"failed to expand arc_sign";
+         sx.ok = FALSE;
+         goto SEND_FAILED;
+         }
+       }
+      else if (*s)
+       {
+       /* Ask dkim code to hash the body for ARC */
+       (void) arc_ams_setup_sign_bodyhash();
+       sx.ob->dkim.force_bodyhash = TRUE;
        }
-      /* Ask dkim code to hash the body for ARC */
-      (void) arc_ams_setup_sign_bodyhash();
-      sx.ob->dkim.force_bodyhash = TRUE;
       }
     }
 # endif