aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/spf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-03-23 17:50:28 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-03-23 17:50:28 +0300
commitf4dfc1a11a29280e7a3202165b8f41d775f06c08 (patch)
tree7138f33d6bcd7d0fcac1e2df62a67db45914b84a /src/plugins/spf.c
parent788168c8e8c0b79e377a07c670b922a4eebe44fd (diff)
downloadrspamd-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/spf.c')
-rw-r--r--src/plugins/spf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index 57a6f4407..8f1e8a07e 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -24,6 +24,12 @@
/***MODULE:spf
* rspamd module that checks spf records of incoming email
+ *
+ * Allowed options:
+ * - metric (string): metric to insert symbol (default: 'default')
+ * - symbol_allow (string): symbol to insert (default: 'R_SPF_ALLOW')
+ * - symbol_fail (string): symbol to insert (default: 'R_SPF_FAIL')
+ * - symbol_softfail (string): symbol to insert (default: 'R_SPF_SOFTFAIL')
*/
#include "../config.h"
@@ -78,28 +84,24 @@ spf_module_config (struct config_file *cfg)
if ((value = get_module_opt (cfg, "spf", "metric")) != NULL) {
spf_module_ctx->metric = memory_pool_strdup (spf_module_ctx->spf_pool, value);
- g_free (value);
}
else {
spf_module_ctx->metric = DEFAULT_METRIC;
}
if ((value = get_module_opt (cfg, "spf", "symbol_fail")) != NULL) {
spf_module_ctx->symbol_fail = memory_pool_strdup (spf_module_ctx->spf_pool, value);
- g_free (value);
}
else {
spf_module_ctx->symbol_fail = DEFAULT_SYMBOL_FAIL;
}
if ((value = get_module_opt (cfg, "spf", "symbol_softfail")) != NULL) {
spf_module_ctx->symbol_softfail = memory_pool_strdup (spf_module_ctx->spf_pool, value);
- g_free (value);
}
else {
spf_module_ctx->symbol_softfail = DEFAULT_SYMBOL_SOFTFAIL;
}
if ((value = get_module_opt (cfg, "spf", "symbol_allow")) != NULL) {
spf_module_ctx->symbol_allow = memory_pool_strdup (spf_module_ctx->spf_pool, value);
- g_free (value);
}
else {
spf_module_ctx->symbol_allow = DEFAULT_SYMBOL_ALLOW;