From: Vsevolod Stakhov Date: Tue, 23 Oct 2018 15:08:24 +0000 (+0100) Subject: [Feature] Fold b= value when doing arc sealing X-Git-Tag: 1.8.2~154 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=01036d24ca7794ac7ad7be407798806f4eac54ce;p=rspamd.git [Feature] Fold b= value when doing arc sealing --- diff --git a/src/plugins/lua/arc.lua b/src/plugins/lua/arc.lua index e066613e9..d5ee1b514 100644 --- a/src/plugins/lua/arc.lua +++ b/src/plugins/lua/arc.lua @@ -483,9 +483,15 @@ local function arc_sign_seal(task, params, header) sha_ctx:update(s) lua_util.debugm(N, task, 'initial update signature with header: %s', s) + local nl_type = 'crlf' + if task:has_flag("milter") then + nl_type = "lf" + else + nl_type = task:get_newlines_type() + end local sig = rspamd_rsa.sign_memory(privkey, sha_ctx:bin()) cur_arc_seal = string.format('%s%s', cur_arc_seal, - sig:base64()) + sig:base64(70, nl_type)) task:set_milter_reply({ add_headers = {