From: Vsevolod Stakhov Date: Sat, 16 Nov 2013 22:10:29 +0000 (+0000) Subject: Use min_bytes setting in fuzzy_check for normal parts. X-Git-Tag: 0.6.0~57 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=52d421b375e5193cf091c2e1329d99a4a80d40c3;p=rspamd.git Use min_bytes setting in fuzzy_check for normal parts. --- diff --git a/src/plugins/fuzzy_check.c b/src/plugins/fuzzy_check.c index 066d58272..de3fdb57b 100644 --- a/src/plugins/fuzzy_check.c +++ b/src/plugins/fuzzy_check.c @@ -718,6 +718,13 @@ fuzzy_symbol_callback (struct worker_task *task, void *unused) continue; } + /* Check length of part */ + if (fuzzy_module_ctx->min_bytes > part->content->len) { + msg_info ("<%s>, part is shorter than %d symbols, skip fuzzy check", + task->message_id, fuzzy_module_ctx->min_bytes); + cur = g_list_next (cur); + continue; + } /* Check length of hash */ hashlen = strlen (part->fuzzy->hash_pipe); if (hashlen == 0) {