if (task->message) {
PTR_ARRAY_FOREACH(MESSAGE_FIELD(task, text_parts), i, tp)
{
+ if (tp->mime_part && (tp->mime_part->flags & RSPAMD_MIME_PART_COMPUTED)) {
+ /* Injected parts do not affect hashes weights */
+ continue;
+ }
+
if (!IS_TEXT_PART_EMPTY(tp) && kv_size(tp->utf_words) > 0) {
seen_text_part = TRUE;
check_part = FALSE;
fuzzy_check = FALSE;
+ if (mime_part->flags & RSPAMD_MIME_PART_COMPUTED) {
+ /* Never learn or check injected (computed) parts */
+ msg_debug_fuzzy_check("skip injected part %ud", mime_part->part_number);
+ continue;
+ }
+
if (fuzzy_rule_check_mimepart(task, rule, mime_part, &check_part,
&fuzzy_check)) {
io = NULL;
{
struct rspamd_cached_shingles *cached;
+ if (mp->flags & RSPAMD_MIME_PART_COMPUTED) {
+ continue;
+ }
+
cached = fuzzy_cmd_get_cached(rule, task, mp);
if (cached) {