aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/spf.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-12 17:22:33 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-08-12 17:22:33 +0100
commit9fb4a7f6e61d361b46eaae0c6b8dbe2805905e36 (patch)
treef68c936404bf6c5ab1e4e780dacb952f6882695c /src/plugins/spf.c
parentaef19db4a81bcc40db2047c1c540f09f07fc9fd1 (diff)
downloadrspamd-9fb4a7f6e61d361b46eaae0c6b8dbe2805905e36.tar.gz
rspamd-9fb4a7f6e61d361b46eaae0c6b8dbe2805905e36.zip
Rework symbols weights.
Diffstat (limited to 'src/plugins/spf.c')
-rw-r--r--src/plugins/spf.c28
1 files changed, 19 insertions, 9 deletions
diff --git a/src/plugins/spf.c b/src/plugins/spf.c
index caff118e4..51673bcba 100644
--- a/src/plugins/spf.c
+++ b/src/plugins/spf.c
@@ -167,17 +167,27 @@ spf_module_config (struct rspamd_config *cfg)
}
}
- cb_id = rspamd_symbols_cache_add_symbol_normal (cfg->cache,
+ cb_id = rspamd_symbols_cache_add_symbol (cfg->cache,
spf_module_ctx->symbol_fail,
- 1,
+ 0,
spf_symbol_callback,
- NULL);
- rspamd_symbols_cache_add_symbol_virtual (cfg->cache,
- spf_module_ctx->symbol_softfail, 1, cb_id);
- rspamd_symbols_cache_add_symbol_virtual (cfg->cache,
- spf_module_ctx->symbol_neutral, 1, cb_id);
- rspamd_symbols_cache_add_symbol_virtual (cfg->cache,
- spf_module_ctx->symbol_allow, 1, cb_id);
+ NULL,
+ SYMBOL_TYPE_NORMAL|SYMBOL_TYPE_FINE, -1);
+ rspamd_symbols_cache_add_symbol (cfg->cache,
+ spf_module_ctx->symbol_softfail, 0,
+ NULL, NULL,
+ SYMBOL_TYPE_VIRTUAL,
+ cb_id);
+ rspamd_symbols_cache_add_symbol (cfg->cache,
+ spf_module_ctx->symbol_neutral, 0,
+ NULL, NULL,
+ SYMBOL_TYPE_VIRTUAL,
+ cb_id);
+ rspamd_symbols_cache_add_symbol (cfg->cache,
+ spf_module_ctx->symbol_allow, 0,
+ NULL, NULL,
+ SYMBOL_TYPE_VIRTUAL,
+ cb_id);
spf_module_ctx->spf_hash = rspamd_lru_hash_new (
cache_size,