summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 {}