]> source.dussan.org Git - rspamd.git/commitdiff
Register symbols properly for received_rbl module.
authorVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 22 Dec 2010 14:32:30 +0000 (17:32 +0300)
committerVsevolod Stakhov <vsevolod@rambler-co.ru>
Wed, 22 Dec 2010 14:32:30 +0000 (17:32 +0300)
src/plugins/lua/received_rbl.lua

index df7ba3ace0885bc46f2977c6a3a9ee1a38ce2fb1..b98fbc2df8f5679f58b7297f9bfedd2137357732 100644 (file)
@@ -68,6 +68,12 @@ if opts then
         if opts['rbl'] then
             rbls = opts['rbl']
         end
+        for _,rbl in ipairs(rbls)
+               local s, _ = string.find(rbl, ':')
+                       if s then
+                               rspamd_config:register_virtual_symbol((string.sub(rbl, s + 1, -1), 1)
+                       end
+               end
         -- Register symbol's callback
         rspamd_config:register_symbol(symbol, 1.0, 'received_cb')
     end