]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Write errors about missing SA conf files
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Dec 2015 13:23:06 +0000 (13:23 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 10 Dec 2015 13:23:06 +0000 (13:23 +0000)
src/plugins/lua/spamassassin.lua

index 10457d2d7a51db38895b1b87945d507a6a47ff7c..d714ecc5b724a2197052f87a1312be5497967c1f 100644 (file)
@@ -651,7 +651,6 @@ local function process_sa_conf(f)
       end
 
       cur_rule['symbol'] = words[2]
-
       if words[3] and (string.sub(words[3], 1, 1) == '/'
           or string.sub(words[3], 1, 1) == 'm') then
         cur_rule['type'] = 'part'
@@ -787,6 +786,8 @@ if type(section) == "table" then
           f = io.open(elt, "r")
           if f then
             process_sa_conf(f)
+          else
+            rspamd_logger.errx(rspamd_config, "cannot open %s", elt)
           end
         end
       else
@@ -794,6 +795,8 @@ if type(section) == "table" then
         f = io.open(fn, "r")
         if f then
           process_sa_conf(f)
+        else
+          rspamd_logger.errx(rspamd_config, "cannot open %s", fn)
         end
       end
     end