diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-03-23 17:50:28 +0300 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-03-23 17:50:28 +0300 |
commit | f4dfc1a11a29280e7a3202165b8f41d775f06c08 (patch) | |
tree | 7138f33d6bcd7d0fcac1e2df62a67db45914b84a /src/plugins/emails.c | |
parent | 788168c8e8c0b79e377a07c670b922a4eebe44fd (diff) | |
download | rspamd-f4dfc1a11a29280e7a3202165b8f41d775f06c08.tar.gz rspamd-f4dfc1a11a29280e7a3202165b8f41d775f06c08.zip |
* Fix freeing of module parameters (they should NOT be freed)
* Add minimum hash length to check with fuzzy module as well as whitelisting for fuzzy checks:
min_length = "300"; <- messages with more than 300 characters would be checked with fuzzy check
whitelist = "http://somehost/somefile"; <- ip addresses whitelisted
* Extend comments about module options for comfortable usage
Diffstat (limited to 'src/plugins/emails.c')
-rw-r--r-- | src/plugins/emails.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/emails.c b/src/plugins/emails.c index 88ea34b8b..37d0b8d33 100644 --- a/src/plugins/emails.c +++ b/src/plugins/emails.c @@ -24,6 +24,11 @@ /***MODULE:email * rspamd module that extracts emails from messages and check them via blacklist + * + * Allowed options: + * - metric (string): metric to insert symbol (default: 'default') + * - symbol (string): symbol to insert (default: 'R_BAD_EMAIL') + * - blacklist (map string): map that contains list of bad emails */ #include "../config.h" @@ -89,14 +94,12 @@ emails_module_config (struct config_file *cfg) if ((value = get_module_opt (cfg, "emails", "metric")) != NULL) { email_module_ctx->metric = memory_pool_strdup (email_module_ctx->email_pool, value); - g_free (value); } else { email_module_ctx->metric = DEFAULT_METRIC; } if ((value = get_module_opt (cfg, "emails", "symbol")) != NULL) { email_module_ctx->symbol = memory_pool_strdup (email_module_ctx->email_pool, value); - g_free (value); } else { email_module_ctx->symbol = DEFAULT_SYMBOL; |