diff options
author | Timothy Allen <tim@treehouse.org.za> | 2018-03-06 20:57:28 +0200 |
---|---|---|
committer | Timothy Allen <tim@treehouse.org.za> | 2018-03-06 20:57:28 +0200 |
commit | 2c4bd500587f5f01c6458170d67e05d488535942 (patch) | |
tree | 7e53623cb12c758c66d33a899e4edda1e91a663e /src/plugins/lua/multimap.lua | |
parent | de0f27b5f39c5999cb8558cbc81188e12242c9de (diff) | |
download | rspamd-2c4bd500587f5f01c6458170d67e05d488535942.tar.gz rspamd-2c4bd500587f5f01c6458170d67e05d488535942.zip |
Allow the multimap header type to be a list of headers as well as a single header.
Diffstat (limited to 'src/plugins/lua/multimap.lua')
-rw-r--r-- | src/plugins/lua/multimap.lua | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 60324fac1..c89436dd1 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -708,8 +708,15 @@ local function multimap_callback(task, rule) end end, header = function() - local hv = task:get_header_full(rule['header']) - match_list(rule, hv, {'decoded'}) + if type(rule['header']) == 'table' then + for _,rh in ipairs(rule['header']) do + local hv = task:get_header_full(rh) + match_list(rule, hv, {'decoded'}) + end + else + local hv = task:get_header_full(rule['header']) + match_list(rule, hv, {'decoded'}) + end end, rcpt = function() if task:has_recipients('smtp') then |