From 2c4bd500587f5f01c6458170d67e05d488535942 Mon Sep 17 00:00:00 2001 From: Timothy Allen Date: Tue, 6 Mar 2018 20:57:28 +0200 Subject: [PATCH] Allow the multimap header type to be a list of headers as well as a single header. --- src/plugins/lua/multimap.lua | 11 +++++++++-- 1 file 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 -- 2.39.5