]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Redis script loading in DMARC; URL tags; URL reputation
authorAndrew Lewis <nerf@judo.za.org>
Fri, 25 Aug 2017 15:36:13 +0000 (17:36 +0200)
committerAndrew Lewis <nerf@judo.za.org>
Fri, 25 Aug 2017 15:40:37 +0000 (17:40 +0200)
 - Issue: #1716

src/plugins/lua/dmarc.lua
src/plugins/lua/url_reputation.lua
src/plugins/lua/url_tags.lua

index 3c2562b4cc7dbfecdbca2468850529e5e73fbbcd..14b7804dc62dc6fa49b6268b69a4ccdcb902e437 100644 (file)
@@ -625,7 +625,6 @@ if opts['reporting'] == true then
   elseif not opts['send_reports'] then
     dmarc_reporting = true
     rspamd_config:add_on_load(function(cfg, ev_base, worker)
-      if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end
       load_scripts(cfg, ev_base)
     end)
   else
@@ -642,9 +641,9 @@ if opts['reporting'] == true then
       end
     end
     rspamd_config:add_on_load(function(cfg, ev_base, worker)
+      load_scripts(cfg, ev_base)
       if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end
       local rresolver = rspamd_resolver.init(ev_base, rspamd_config)
-      load_scripts(cfg, ev_base)
       rspamd_config:register_finish_script(function ()
         local stamp = pool:get_variable(VAR_NAME, 'double')
         if not stamp then
index 73043aa4e520deb3163025119c7f168e9c599d8f..5c5dee14ec53e9d62ca35a7b70af658854a64dd6 100644 (file)
@@ -432,7 +432,6 @@ end
 
 whitelist = rspamd_map_add(N, 'whitelist', 'map', 'URL reputation whitelist')
 rspamd_config:add_on_load(function(cfg, ev_base, worker)
-  if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end
   load_scripts(cfg, ev_base)
 end)
 local id = rspamd_config:register_symbol({
index 3fe01054678c0e361d3e0590ab9f98998fd4faef..9aa64e1f4ab8de715b3aea36d3df8ecbdb25b6be 100644 (file)
@@ -378,7 +378,6 @@ end
 settings.ignore_tags = list_to_hash(settings.ignore_tags)
 
 rspamd_config:add_on_load(function(cfg, ev_base, worker)
-  if not (worker:get_name() == 'normal' and worker:get_index() == 0) then return end
   load_scripts(cfg, ev_base)
 end)
 rspamd_config:register_symbol({