From: Vsevolod Stakhov Date: Wed, 3 Nov 2021 20:13:32 +0000 (+0000) Subject: [Minor] Skip modifying headers for skipped tasks X-Git-Tag: 3.2~300 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=659b274e0f68e8c8f185a34e6df7695b9c095d23;p=rspamd.git [Minor] Skip modifying headers for skipped tasks --- diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index a57c2181e..a09ef84f8 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -515,6 +515,10 @@ end -- Adds/removes headers both internal and in the milter reply --]] exports.modify_headers = function(task, hdr_alterations) + if task:has_flag('skip') then + -- Cannot set flags for skipped (and unprocessed) task + return + end local add = hdr_alterations.add or {} local remove = hdr_alterations.remove or {}