aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-12-13 20:54:22 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-12-13 20:54:22 +0300
commitdbc8bb8dbc278b80dd13e732da9647c9df856fa4 (patch)
tree2911a704485d5d31304985180e3b521f0ead15c9 /src/main.c
parent55ec0f5776109efcd191c1a91e5107ca52a41c83 (diff)
downloadrspamd-dbc8bb8dbc278b80dd13e732da9647c9df856fa4.tar.gz
rspamd-dbc8bb8dbc278b80dd13e732da9647c9df856fa4.zip
Implement checking options for modules
Implement checking for classifier options Fix redirector to handle timeouts and invalid replies properly Fix surbl module not to check each url
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index 0fcd4e89a..db8f6f276 100644
--- a/src/main.c
+++ b/src/main.c
@@ -819,6 +819,11 @@ main (gint argc, gchar **argv, gchar **env)
/* Init contextes */
init_workers_ctx (rspamd);
+ /* Init classifiers options */
+ register_classifier_opt ("bayes", "min_tokens");
+ register_classifier_opt ("winnow", "min_tokens");
+ register_classifier_opt ("winnow", "learn_threshold");
+
if (! load_rspamd_config (rspamd->cfg, TRUE)) {
exit (EXIT_FAILURE);
}
@@ -836,6 +841,9 @@ main (gint argc, gchar **argv, gchar **env)
/* Init events to test modules */
event_init ();
res = TRUE;
+ if (!check_modules_config (rspamd->cfg)) {
+ res = FALSE;
+ }
/* Perform modules configuring */
l = g_list_first (rspamd->cfg->filters);
@@ -871,6 +879,7 @@ main (gint argc, gchar **argv, gchar **env)
msg_info ("rspamd " RVERSION " is starting, build id: " RID);
rspamd->cfg->cfg_name = memory_pool_strdup (rspamd->cfg->cfg_pool, rspamd->cfg->cfg_name);
+ (void)check_modules_config (rspamd->cfg);
if (!rspamd->cfg->no_fork && daemon (0, 0) == -1) {
fprintf (stderr, "Cannot daemonize\n");