summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2021-11-03 20:13:32 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2021-11-03 20:13:32 +0000
commit659b274e0f68e8c8f185a34e6df7695b9c095d23 (patch)
tree95f9758b15a301143ef23d6009920bf71e9fff0e
parentd793446a7bcf4ec5ab8697f0598fd4e5b1ac5960 (diff)
downloadrspamd-659b274e0f68e8c8f185a34e6df7695b9c095d23.tar.gz
rspamd-659b274e0f68e8c8f185a34e6df7695b9c095d23.zip
[Minor] Skip modifying headers for skipped tasks
-rw-r--r--lualib/lua_mime.lua4
1 files changed, 4 insertions, 0 deletions
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 {}