blob: 1f7ee743f305902c4c20fe6a3faa0346573c6462 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#ifndef RSPAMD_SETTINGS_H
#define RSPAMD_SETTINGS_H
#include "config.h"
#include "main.h"
struct rspamd_settings {
GHashTable *metric_scores; /**< hash table of metric require scores for this setting */
GHashTable *reject_scores; /**< hash table of metric reject scores for this setting */
GHashTable *factors; /**< hash table of new factors for this setting */
GHashTable *whitelist; /**< hash table of whitelist for this setting */
char *statfile_alias; /**< alias for statfile used */
gboolean want_spam; /**< if true disable rspamd checks */
};
gboolean read_settings (const char *path, struct config_file *cfg, GHashTable *table);
void init_settings (struct config_file *cfg);
gboolean check_metric_settings (struct worker_task *task, struct metric *metric, double *score, double *rscore);
gboolean check_factor_settings (struct worker_task *task, const char *symbol, double *factor);
gboolean check_want_spam (struct worker_task *task);
#endif
|