]> source.dussan.org Git - rspamd.git/commitdiff
Use min_bytes setting in fuzzy_check for normal parts.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Nov 2013 22:10:29 +0000 (22:10 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sat, 16 Nov 2013 22:10:29 +0000 (22:10 +0000)
src/plugins/fuzzy_check.c

index 066d582723f9657c4ae13c0cf1dc7805b19b6e5b..de3fdb57b0895fa573e44d2d2ecc3a2224c791c5 100644 (file)
@@ -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) {