diff options
author | Andrew Lewis <nerf@judo.za.org> | 2024-06-04 11:38:46 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2024-06-04 11:38:46 +0200 |
commit | b8eb9a516b8314d71b2c7a9117a76044d068e485 (patch) | |
tree | 6a9c34a373c174f976683a63e7e08c982029cf55 /lualib/lua_mime.lua | |
parent | b8f807353115ca0f99e2ca20de42ff9f32fa234a (diff) | |
download | rspamd-b8eb9a516b8314d71b2c7a9117a76044d068e485.tar.gz rspamd-b8eb9a516b8314d71b2c7a9117a76044d068e485.zip |
[Feature] milter_headers: support not removing headers
Diffstat (limited to 'lualib/lua_mime.lua')
-rw-r--r-- | lualib/lua_mime.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lualib/lua_mime.lua b/lualib/lua_mime.lua index 0f5aa75c0..ea6bf5125 100644 --- a/lualib/lua_mime.lua +++ b/lualib/lua_mime.lua @@ -582,8 +582,11 @@ exports.modify_headers = function(task, hdr_alterations, mode) hdr_flattened[hname].remove = {} end local remove_tbl = hdr_flattened[hname].remove - if type(hdr) == 'number' then + local t_hdr = type(hdr) + if t_hdr == 'number' then table.insert(remove_tbl, hdr) + elseif t_hdr == 'userdata' then + hdr_alterations.remove[hname] = nil else for _, num in ipairs(hdr) do table.insert(remove_tbl, num) |