From 66468690e6caa0ada83d1d6707d3c58b1487ea87 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 21 Oct 2019 15:31:15 +0100 Subject: [Minor] Do not try to parse non-trivial parts as text parts --- src/libmime/message.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libmime/message.c b/src/libmime/message.c index 0785a3570..cfa8cf97d 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -1433,7 +1433,8 @@ rspamd_message_process (struct rspamd_task *task) lua_settop (L, func_pos); } - if (!(part->flags & (RSPAMD_MIME_PART_IMAGE|RSPAMD_MIME_PART_ARCHIVE))) { + if (!(part->flags & (RSPAMD_MIME_PART_IMAGE|RSPAMD_MIME_PART_ARCHIVE)) && + (!part->ct || !(part->ct->flags & (RSPAMD_CONTENT_TYPE_MULTIPART|RSPAMD_CONTENT_TYPE_MESSAGE)))) { rspamd_message_process_text_part_maybe (task, part); } } -- cgit v1.2.3