From 659b274e0f68e8c8f185a34e6df7695b9c095d23 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 3 Nov 2021 20:13:32 +0000 Subject: [PATCH] [Minor] Skip modifying headers for skipped tasks --- lualib/lua_mime.lua | 4 ++++ 1 file changed, 4 insertions(+) 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 {} -- 2.39.5