diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-27 13:43:32 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2015-11-27 13:43:32 +0000 |
commit | 085b3707cbddc9601b3dd8f5953c74d299cac2d4 (patch) | |
tree | f85522079cee2d08885ee9c02b8bed0135fe80ef /src/plugins | |
parent | 86bb48e4453122a2f62c8381d227daf721657845 (diff) | |
download | rspamd-085b3707cbddc9601b3dd8f5953c74d299cac2d4.tar.gz rspamd-085b3707cbddc9601b3dd8f5953c74d299cac2d4.zip |
Add informational messages about modules initialization
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/chartable.c | 2 | ||||
-rw-r--r-- | src/plugins/dkim_check.c | 2 | ||||
-rw-r--r-- | src/plugins/fuzzy_check.c | 6 | ||||
-rw-r--r-- | src/plugins/regexp.c | 5 | ||||
-rw-r--r-- | src/plugins/spf.c | 2 | ||||
-rw-r--r-- | src/plugins/surbl.c | 6 |
6 files changed, 19 insertions, 4 deletions
diff --git a/src/plugins/chartable.c b/src/plugins/chartable.c index b704e9238..5bb40b28d 100644 --- a/src/plugins/chartable.c +++ b/src/plugins/chartable.c @@ -111,6 +111,8 @@ chartable_module_config (struct rspamd_config *cfg) SYMBOL_TYPE_NORMAL, -1); + msg_info_config ("init internal chartable module"); + return res; } diff --git a/src/plugins/dkim_check.c b/src/plugins/dkim_check.c index 494c458ea..8aabe666e 100644 --- a/src/plugins/dkim_check.c +++ b/src/plugins/dkim_check.c @@ -253,7 +253,7 @@ dkim_module_config (struct rspamd_config *cfg) g_free, (GDestroyNotify)rspamd_dkim_key_free); - + msg_info_config ("init internal dkim module"); #ifndef HAVE_OPENSSL msg_warn_config ( "openssl is not found so dkim rsa check is disabled, only check body hash, it is NOT safe to trust these results"); diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 59b36a4e5..1a9c9e0ed 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -501,7 +501,7 @@ gint fuzzy_check_module_config (struct rspamd_config *cfg) { const ucl_object_t *value, *cur; - gint res = TRUE, cb_id; + gint res = TRUE, cb_id, nrules = 0; if (!rspamd_config_is_module_enabled (cfg, "fuzzy_check")) { return TRUE; @@ -590,6 +590,7 @@ fuzzy_check_module_config (struct rspamd_config *cfg) LL_FOREACH (value, cur) { fuzzy_parse_rule (cfg, cur, cb_id); + nrules ++; } } @@ -597,6 +598,9 @@ fuzzy_check_module_config (struct rspamd_config *cfg) msg_warn_config ("fuzzy module is enabled but no rules are defined"); } + msg_info_config ("init internal fuzzy_check module, %d rules loaded", + nrules); + return res; } diff --git a/src/plugins/regexp.c b/src/plugins/regexp.c index 819bc762e..9535ab1e6 100644 --- a/src/plugins/regexp.c +++ b/src/plugins/regexp.c @@ -111,7 +111,7 @@ regexp_module_config (struct rspamd_config *cfg) struct regexp_module_item *cur_item; const ucl_object_t *sec, *value, *elt; ucl_object_iter_t it = NULL; - gint res = TRUE, id; + gint res = TRUE, id, nrules = 0; if (!rspamd_config_is_module_enabled (cfg, "regexp")) { return TRUE; @@ -215,6 +215,7 @@ regexp_module_config (struct rspamd_config *cfg) process_regexp_item, cur_item, SYMBOL_TYPE_NORMAL, -1); + nrules ++; elt = ucl_object_find_key (value, "condition"); @@ -266,6 +267,8 @@ regexp_module_config (struct rspamd_config *cfg) } } + msg_info_config ("init internal regexp module, %d regexp rules loaded", nrules); + return res; } diff --git a/src/plugins/spf.c b/src/plugins/spf.c index 8780d8aa7..362ab6c53 100644 --- a/src/plugins/spf.c +++ b/src/plugins/spf.c @@ -195,6 +195,8 @@ spf_module_config (struct rspamd_config *cfg) NULL, (GDestroyNotify)spf_record_unref); + msg_info_config ("init internal spf module"); + return res; } diff --git a/src/plugins/surbl.c b/src/plugins/surbl.c index e624ce6dd..efb61fd89 100644 --- a/src/plugins/surbl.c +++ b/src/plugins/surbl.c @@ -341,7 +341,7 @@ surbl_module_config (struct rspamd_config *cfg) ucl_object_iter_t it = NULL; const gchar *redir_val, *ip_val; guint32 bit; - gint cb_id; + gint cb_id, nrules = 0; gboolean has_subsymbols; if (!rspamd_config_is_module_enabled (cfg, "surbl")) { @@ -580,6 +580,7 @@ surbl_module_config (struct rspamd_config *cfg) NULL, NULL, SYMBOL_TYPE_VIRTUAL, cb_id); + nrules ++; } surbl_module_ctx->suffixes = g_list_prepend ( surbl_module_ctx->suffixes, @@ -608,6 +609,9 @@ surbl_module_config (struct rspamd_config *cfg) cur_opt = g_list_next (cur_opt); } + msg_info_config ("init internal surbls module, %d uribl rules loaded", + nrules); + return TRUE; } |