]> source.dussan.org Git - rspamd.git/commitdiff
Allow the same keys in the configuration
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Nov 2015 16:50:50 +0000 (16:50 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 13 Nov 2015 16:50:50 +0000 (16:50 +0000)
src/plugins/lua/spamassassin.lua

index a343be8750e98746aab9c8823c2d224de061ecaa..53a1fc6cf20e2add2bac915c3d01d9690ccfc962 100644 (file)
@@ -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