diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2018-03-20 19:58:00 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2018-03-21 09:07:00 +0000 |
commit | 587d831d9428c40f108ac91c1e061096b17a7a3e (patch) | |
tree | 80a44a30ee34b5bda034d844efd8a73b67f5a0c3 | |
parent | ab3b76ceb6e8c6609df5169f814976c6c8d16da8 (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 ce140c553..149598ee8 100644 --- a/doc/doc-txt/experimental-spec.txt +++ b/doc/doc-txt/experimental-spec.txt @@ -799,6 +799,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 c4a6c0283..23083f5d8 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -2999,15 +2999,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 |