]> source.dussan.org Git - rspamd.git/commitdiff
Allow the multimap header type to be a list of headers as well as a single header. 2063/head
authorTimothy Allen <tim@treehouse.org.za>
Tue, 6 Mar 2018 18:57:28 +0000 (20:57 +0200)
committerTimothy Allen <tim@treehouse.org.za>
Tue, 6 Mar 2018 18:57:28 +0000 (20:57 +0200)
src/plugins/lua/multimap.lua

index 60324fac1063fa13dcab763f6cc23aa837d5168d..c89436dd1360d83fa53d4dacfeba3f553a7c578e 100644 (file)
@@ -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