]> source.dussan.org Git - rspamd.git/commitdiff
Fix use of RBL name as symbol; ignore RBL names that would not be yielded 316/head
authorAndrew Lewis <nerf@judo.za.org>
Tue, 30 Jun 2015 12:34:27 +0000 (14:34 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 30 Jun 2015 12:35:18 +0000 (14:35 +0200)
src/plugins/lua/rbl.lua

index c2ec6ae3d498595255c05cd49445380ed7faed10..32e3af27af68aa5f7e3b541e76e2244687accd27 100644 (file)
@@ -381,8 +381,10 @@ for key,rbl in pairs(opts['rbls']) do
       end
     end
   end
-  if not rbl['symbol'] and type(rbl['returncodes']) ~= 'nil' and not rbl['unknown'] then
-    rbl['symbol'] = key
+  if not rbl['symbol'] and
+    ((rbl['returncodes'] and rbl['unknown']) or
+    (not rbl['returncodes'])) then
+      rbl['symbol'] = key
   end
   if type(rspamd_config.get_api_version) ~= 'nil' and rbl['symbol'] then
     rspamd_config:register_virtual_symbol(rbl['symbol'], 1, id)