diff options
-rw-r--r-- | src/plugins/lua/antivirus.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/asn.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/dcc.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/dmarc.lua | 5 | ||||
-rw-r--r-- | src/plugins/lua/emails.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/fann_scores.lua | 5 | ||||
-rw-r--r-- | src/plugins/lua/forged_recipients.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/greylist.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/hfilter.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/ip_score.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/maillist.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/mime_types.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/multimap.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/once_received.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/phishing.lua | 8 | ||||
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/rbl.lua | 4 | ||||
-rw-r--r-- | src/plugins/lua/replies.lua | 11 | ||||
-rw-r--r-- | src/plugins/lua/rspamd_update.lua | 6 | ||||
-rw-r--r-- | src/plugins/lua/settings.lua | 5 | ||||
-rw-r--r-- | src/plugins/lua/spamassassin.lua | 5 | ||||
-rw-r--r-- | src/plugins/lua/trie.lua | 6 | ||||
-rw-r--r-- | src/plugins/lua/whitelist.lua | 4 |
23 files changed, 11 insertions, 100 deletions
diff --git a/src/plugins/lua/antivirus.lua b/src/plugins/lua/antivirus.lua index 19466678e..96a723fe0 100644 --- a/src/plugins/lua/antivirus.lua +++ b/src/plugins/lua/antivirus.lua @@ -273,10 +273,6 @@ end -- Registration local opts = rspamd_config:get_all_opt('antivirus') if opts and type(opts) == 'table' then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end redis_params = rspamd_parse_redis_server('antivirus') for k, m in pairs(opts) do if type(m) == 'table' and m['type'] then diff --git a/src/plugins/lua/asn.lua b/src/plugins/lua/asn.lua index 74672af27..25b684dc4 100644 --- a/src/plugins/lua/asn.lua +++ b/src/plugins/lua/asn.lua @@ -74,10 +74,6 @@ end local configure_asn_module = function() local opts = rspamd_config:get_all_opt('asn') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end for k,v in pairs(opts) do options[k] = v end diff --git a/src/plugins/lua/dcc.lua b/src/plugins/lua/dcc.lua index 7c3616073..216139fab 100644 --- a/src/plugins/lua/dcc.lua +++ b/src/plugins/lua/dcc.lua @@ -116,10 +116,6 @@ end -- Configuration if opts and opts['host'] then - if opts['enabled'] == false then - logger.infox(rspamd_config, 'module is disabled') - return - end rspamd_config:register_symbol({ name = symbol_bulk, callback = check_dcc diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index f2faef89f..fc85c4766 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -328,11 +328,6 @@ if not opts or type(opts) ~= 'table' then return end -if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return -end - if opts['symbols'] then for k,_ in pairs(dmarc_symbols) do if opts['symbols'][k] then diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 3d0fddd6a..9d9a54d03 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -81,10 +81,6 @@ end local opts = rspamd_config:get_all_opt('emails', 'rule') if opts and type(opts) == 'table' then - if opts['enabled'] == false then - logger.infox(rspamd_config, 'module is disabled') - return - end local r = opts['rule'] if r then diff --git a/src/plugins/lua/fann_scores.lua b/src/plugins/lua/fann_scores.lua index cafa5befa..fc9ea59c9 100644 --- a/src/plugins/lua/fann_scores.lua +++ b/src/plugins/lua/fann_scores.lua @@ -39,10 +39,7 @@ local max_epoch = 100 local use_settings = false local opts = rspamd_config:get_all_opt("fann_scores") if not (opts and type(opts) == 'table') then - rspamd_logger.infox('Module is unconfigured') - return -elseif opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'Module is unconfigured') return end diff --git a/src/plugins/lua/forged_recipients.lua b/src/plugins/lua/forged_recipients.lua index 4c52295b9..957491a56 100644 --- a/src/plugins/lua/forged_recipients.lua +++ b/src/plugins/lua/forged_recipients.lua @@ -72,10 +72,6 @@ end -- Configuration local opts = rspamd_config:get_all_opt('forged_recipients') if opts then - if opts['enabled'] == false then - logger.infox(rspamd_config, 'Module is disabled') - return - end if opts['symbol_rcpt'] or opts['symbol_sender'] then local id = rspamd_config:register_symbol({ callback = check_forged_headers, diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua index 71a8a86ca..05afaeab6 100644 --- a/src/plugins/lua/greylist.lua +++ b/src/plugins/lua/greylist.lua @@ -321,10 +321,6 @@ end local opts = rspamd_config:get_all_opt('greylist') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end if opts['whitelisted_ip'] then whitelisted_ip = rspamd_config:add_radix_map(opts['whitelisted_ip'], 'Greylist whitelist ip map') diff --git a/src/plugins/lua/hfilter.lua b/src/plugins/lua/hfilter.lua index b11b567b7..34a679641 100644 --- a/src/plugins/lua/hfilter.lua +++ b/src/plugins/lua/hfilter.lua @@ -481,10 +481,6 @@ local symbols_from = { local opts = rspamd_config:get_all_opt('hfilter') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end for k,v in pairs(opts) do config[k] = v end diff --git a/src/plugins/lua/ip_score.lua b/src/plugins/lua/ip_score.lua index bb6119bda..6b6ac900a 100644 --- a/src/plugins/lua/ip_score.lua +++ b/src/plugins/lua/ip_score.lua @@ -317,10 +317,6 @@ end local configure_ip_score_module = function() local opts = rspamd_config:get_all_opt('ip_score') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end for k,v in pairs(opts) do options[k] = v end diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua index 4ec0a41f1..1e4c104de 100644 --- a/src/plugins/lua/maillist.lua +++ b/src/plugins/lua/maillist.lua @@ -272,10 +272,6 @@ end -- Configuration local opts = rspamd_config:get_all_opt('maillist') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end if opts['symbol'] then symbol = opts['symbol'] rspamd_config:register_symbol({ diff --git a/src/plugins/lua/mime_types.lua b/src/plugins/lua/mime_types.lua index ad725820b..e1b2123f4 100644 --- a/src/plugins/lua/mime_types.lua +++ b/src/plugins/lua/mime_types.lua @@ -200,10 +200,6 @@ end local opts = rspamd_config:get_all_opt('mime_types') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end for k,v in pairs(opts) do settings[k] = v end diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index a1333d7d9..f21bc5b11 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -774,10 +774,6 @@ end -- Registration local opts = rspamd_config:get_all_opt('multimap') if opts and type(opts) == 'table' then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end redis_params = rspamd_parse_redis_server('multimap') for k,m in pairs(opts) do if type(m) == 'table' and m['type'] then diff --git a/src/plugins/lua/once_received.lua b/src/plugins/lua/once_received.lua index 84b0e48b4..63de22776 100644 --- a/src/plugins/lua/once_received.lua +++ b/src/plugins/lua/once_received.lua @@ -142,10 +142,6 @@ end -- Configuration local opts = rspamd_config:get_all_opt('once_received') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end if opts['symbol'] then local symbol = opts['symbol'] diff --git a/src/plugins/lua/phishing.lua b/src/plugins/lua/phishing.lua index e38ceeac9..adddce255 100644 --- a/src/plugins/lua/phishing.lua +++ b/src/plugins/lua/phishing.lua @@ -36,10 +36,7 @@ local rspamd_logger = require "rspamd_logger" local util = require "rspamd_util" local opts = rspamd_config:get_all_opt('phishing') if not (opts and type(opts) == 'table') then - rspamd_logger.info('Module is unconfigured') - return -elseif opts['enabled'] == false then - rspamd_logger.info('Module is disabled') + rspamd_logger.infox(rspamd_config, 'Module is unconfigured') return end @@ -334,9 +331,6 @@ local function phishtank_json_cb(string) end if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - end if opts['symbol'] then symbol = opts['symbol'] -- Register symbol's callback diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index 2e67a5524..48052502f 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -442,10 +442,6 @@ end local opts = rspamd_config:get_all_opt('ratelimit') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end local rates = opts['limit'] if rates and type(rates) == 'table' then fun.each(parse_limit, rates) diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index f22199b63..50a49adcd 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -386,9 +386,7 @@ end -- Configuration local opts = rspamd_config:get_all_opt('rbl') if not (opts and type(opts) == 'table') then - rspamd_logger.info('Module is unconfigured') -elseif opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') + rspamd_logger.infox(rspamd_config, 'Module is unconfigured') return end diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua index d6793a3d8..9916dc3cf 100644 --- a/src/plugins/lua/replies.lua +++ b/src/plugins/lua/replies.lua @@ -108,14 +108,11 @@ local function replies_set(task) end local opts = rspamd_config:get_all_opt('replies') +if not (opts and type(opts) == 'table') then + rspamd_logger.infox(rspamd_config, 'module is unconfigured') + return +end if opts then - if not (opts and type(opts) == 'table') then - rspamd_logger.infox(rspamd_config, 'module is unconfigured') - return - elseif opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end redis_params = rspamd_parse_redis_server('replies') if not redis_params then rspamd_logger.infox(rspamd_config, 'no servers are specified, disabling module') diff --git a/src/plugins/lua/rspamd_update.lua b/src/plugins/lua/rspamd_update.lua index 779cec2dd..19e481019 100644 --- a/src/plugins/lua/rspamd_update.lua +++ b/src/plugins/lua/rspamd_update.lua @@ -125,10 +125,6 @@ end -- Configuration part local section = rspamd_config:get_all_opt("rspamd_update") if section then - if section['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end local trusted_key each(function(k, elt) if k == 'priority' then @@ -158,5 +154,5 @@ if section then end end, maps) else - rspamd_logger.infox('Module is unconfigured') + rspamd_logger.infox(rspamd_config, 'Module is unconfigured') end diff --git a/src/plugins/lua/settings.lua b/src/plugins/lua/settings.lua index e857d7f8e..b25698f27 100644 --- a/src/plugins/lua/settings.lua +++ b/src/plugins/lua/settings.lua @@ -21,10 +21,7 @@ limitations under the License. local rspamd_logger = require "rspamd_logger" local set_section = rspamd_config:get_all_opt("settings") if not (set_section and type(set_section) == 'table') then - rspamd_logger.infox('Module is unconfigured') -elseif set_section['enabled'] == false then - rspamd_logger.infox('Module is disabled') - return + rspamd_logger.infox(rspamd_config, 'Module is unconfigured') end local settings = { diff --git a/src/plugins/lua/spamassassin.lua b/src/plugins/lua/spamassassin.lua index 533b83864..a752f67a5 100644 --- a/src/plugins/lua/spamassassin.lua +++ b/src/plugins/lua/spamassassin.lua @@ -115,10 +115,7 @@ local sa_lists = { local func_cache = {} local section = rspamd_config:get_all_opt("spamassassin") if not (section and type(section) == 'table') then - rspamd_logger.info('Module is unconfigured') -elseif section['enabled'] == false then - rspamd_logger.info('Module is disabled') - return + rspamd_logger.infox(rspamd_config, 'Module is unconfigured') end -- Minimum score to treat symbols as meta diff --git a/src/plugins/lua/trie.lua b/src/plugins/lua/trie.lua index 927efbc26..ebc4e2a7e 100644 --- a/src/plugins/lua/trie.lua +++ b/src/plugins/lua/trie.lua @@ -130,10 +130,6 @@ end local opts = rspamd_config:get_all_opt("trie") if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end for sym, opt in pairs(opts) do process_trie_conf(sym, opt) end @@ -173,5 +169,5 @@ if opts then end end else - rspamd_logger.info("Module is unconfigured") + rspamd_logger.infox(rspamd_config, "Module is unconfigured") end diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua index 7344a1d67..517b4e63b 100644 --- a/src/plugins/lua/whitelist.lua +++ b/src/plugins/lua/whitelist.lua @@ -185,10 +185,6 @@ end local configure_whitelist_module = function() local opts = rspamd_config:get_all_opt('whitelist') if opts then - if opts['enabled'] == false then - rspamd_logger.infox(rspamd_config, 'module is disabled') - return - end for k,v in pairs(opts) do options[k] = v end |