aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-15 15:19:52 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-04-15 15:19:52 +0100
commitc6822d66ed9825d317f6e59526d35974ccdaa1b2 (patch)
treea03f1af5fa790d3c68eac8b7322e388979ba4baa /src/libmime/message.c
parent4068f84ca27fef18cd6d34bb271a7a3ee4ef89b2 (diff)
downloadrspamd-c6822d66ed9825d317f6e59526d35974ccdaa1b2.tar.gz
rspamd-c6822d66ed9825d317f6e59526d35974ccdaa1b2.zip
[Minor] Try to process images before text part heuristic
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r--src/libmime/message.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 4847c4046..4b00d2dd0 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1464,6 +1464,10 @@ rspamd_message_process (struct rspamd_task *task)
lua_settop (L, funcs_top);
}
+ /* Try to detect image before checking for text */
+ rspamd_images_process_mime_part_maybe (task, part);
+
+ /* Still no content detected, try text heuristic */
if (part->part_type == RSPAMD_MIME_PART_UNDEFINED) {
rspamd_message_process_text_part_maybe (task, part);
}
@@ -1601,7 +1605,6 @@ rspamd_message_process (struct rspamd_task *task)
}
}
- rspamd_images_process (task);
rspamd_images_link (task);
rspamd_tokenize_meta_words (task);