process_regexp (struct rspamd_regexp *re, struct worker_task *task)
{
char *headerv, *c, t;
- struct mime_text_part *part;
+ struct mime_text_part *part, *tmp;
GList *cur, *headerlist;
GRegex *regexp;
struct uri *url;
task_cache_add (task, re, 1);
return 1;
}
- cur = g_list_next (cur);
+ /* Skip identical parts */
+ while (cur) {
+ cur = g_list_next (cur);
+ if (cur) {
+ tmp = (struct mime_text_part *)cur->data;
+ if (fuzzy_compare_hashes (tmp->fuzzy, part->fuzzy) > 70) {
+ break;
+ }
+ }
+ }
}
task_cache_add (task, re, 0);
return 0;