diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-03-20 19:58:00 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-04-04 00:19:00 +0100 |
commit | 27a79307f48631bbefe9abb6f399da0e8e4b46d1 (patch) | |
tree | 9e36c9ceccbb2e0410a9114457541837f5058262 | |
parent | d202d925afe3876b8f8f6e16b209ac89c09653e3 (diff) |
ARC: on the smtp transport option take empty or forced-fail to disable signing
-rw-r--r-- | doc/doc-txt/experimental-spec.txt | 1 | ||||
-rw-r--r-- | src/src/transports/smtp.c | 20 |
2 files changed, 14 insertions, 7 deletions
diff --git a/doc/doc-txt/experimental-spec.txt b/doc/doc-txt/experimental-spec.txt index 839200c6c..3389632a2 100644 --- a/doc/doc-txt/experimental-spec.txt +++ b/doc/doc-txt/experimental-spec.txt @@ -802,6 +802,7 @@ arc_sign = <admd-identifier> : <selector> : <privkey> An option on the smtp transport, which constructs and prepends to the message an ARC set of headers. The textually-first Authentication-Results: header is used as a basis (you must have added one on entry to the ADMD). +Expanded; if unset, empty or forced-failure then no signing is done. diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index bd1e20d7f..2dfb5b73a 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -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 |