aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-14 18:48:42 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-14 18:48:42 +0100
commita21fb8ed5b1642031c2b612cac45d176e9fc00f8 (patch)
tree357b4cd6043da7bb12a0641c5f327118af1ac847 /src/plugins
parent02b6117a397bb5cba27ca63a7e2df1c5dbfd0125 (diff)
downloadrspamd-a21fb8ed5b1642031c2b612cac45d176e9fc00f8.tar.gz
rspamd-a21fb8ed5b1642031c2b612cac45d176e9fc00f8.zip
Start removing of old fuzzy algorithm.
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/fuzzy_check.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c
index 088a31979..ec849da54 100644
--- a/src/plugins/fuzzy_check.c
+++ b/src/plugins/fuzzy_check.c
@@ -978,18 +978,15 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
task->message_id, fuzzy_module_ctx->min_bytes);
continue;
}
- /* Check length of hash */
- hashlen = strlen (part->fuzzy->hash_pipe);
- if (hashlen == 0) {
+ if (part->words == NULL || part->words->len == 0) {
msg_info ("<%s>, part hash empty, skip fuzzy check",
task->message_id, fuzzy_module_ctx->min_hash_len);
continue;
}
if (fuzzy_module_ctx->min_hash_len != 0 &&
- hashlen * part->fuzzy->block_size <
- fuzzy_module_ctx->min_hash_len) {
+ part->words->len < fuzzy_module_ctx->min_hash_len) {
msg_info (
"<%s>, part hash is shorter than %d symbols, skip fuzzy check",
task->message_id,
@@ -997,14 +994,6 @@ fuzzy_generate_commands (struct rspamd_task *task, struct fuzzy_rule *rule,
continue;
}
- /*
- * Try legacy first
- */
- cmd = fuzzy_cmd_from_text_part (rule, c, flag, value, task->task_pool,
- part, TRUE, NULL);
- if (cmd) {
- g_ptr_array_add (res, cmd);
- }
cmd = fuzzy_cmd_from_text_part (rule, c, flag, value, task->task_pool,
part, FALSE, NULL);
if (cmd) {