From f1d528aafbd690b95a23b684ba0be69f3c5f781c Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 13 Nov 2015 16:50:50 +0000 Subject: [PATCH] Allow the same keys in the configuration --- src/plugins/lua/spamassassin.lua | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua index a343be875..53a1fc6cf 100644 --- a/src/plugins/lua/spamassassin.lua +++ b/src/plugins/lua/spamassassin.lua @@ -520,9 +520,19 @@ if type(section) == "table" then elseif k == 'match_limit' and type(fn) == 'number' then match_limit = fn else - f = io.open(fn, "r") - if f then - process_sa_conf(f) + if type(fn) == 'table' then + for k,elt in ipairs(fn) do + f = io.open(elt, "r") + if f then + process_sa_conf(f) + end + end + else + -- assume string + f = io.open(fn, "r") + if f then + process_sa_conf(f) + end end end end -- 2.39.5