]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] rbl: fix dependency registration when symbols_prefixes is used 4498/head
authorAndrew Lewis <nerf@judo.za.org>
Fri, 26 May 2023 13:08:23 +0000 (15:08 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 26 May 2023 13:08:23 +0000 (15:08 +0200)
src/plugins/lua/rbl.lua

index cc43346d3a51971b58b1a72b1a73d9a1b7388689..9d1097d94def413d779fdfb8923c6c23dfbc26d4 100644 (file)
@@ -1088,13 +1088,15 @@ local function add_rbl(key, rbl, global_opts)
     lua_util.debugm(N, rspamd_config, 'rule dump for %s: %s',
         rbl.symbol, rbl)
 
+    local check_sym = rbl.symbol_prefixes and rbl.symbol .. '_CHECK' or rbl.symbol
+
     if rbl.dkim then
-      rspamd_config:register_dependency(rbl.symbol, 'DKIM_CHECK')
+      rspamd_config:register_dependency(check_sym, 'DKIM_CHECK')
     end
 
     if rbl.require_symbols then
       for _,dep in ipairs(rbl.require_symbols) do
-        rspamd_config:register_dependency(rbl.symbol, dep)
+        rspamd_config:register_dependency(check_sym, dep)
       end
     end