diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-03-07 20:48:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-07 20:48:55 +0000 |
commit | 460323a1cbbb66faa43a60e83d7541fb4ab43a27 (patch) | |
tree | c7950ec0ac2b4df6afbc396c24a45e21b8329e7f | |
parent | 1b74022f78e233c8f832b6aa06cd5375cc798ba5 (diff) | |
parent | 2c4bd500587f5f01c6458170d67e05d488535942 (diff) | |
download | rspamd-460323a1cbbb66faa43a60e83d7541fb4ab43a27.tar.gz rspamd-460323a1cbbb66faa43a60e83d7541fb4ab43a27.zip |
Merge pull request #2063 from trallen/master
Allow the multimap header type to be a list of headers as well as a single header
-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 |