From e9fec3409a40bc89000d97130239a5867a1d6eb7 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 3 Apr 2023 21:24:00 +0100 Subject: [PATCH] [Minor] Do not propagate broken headers flag for attached messages --- src/libmime/mime_headers.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index f4001d640..e75a61366 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -237,7 +237,10 @@ rspamd_mime_headers_process (struct rspamd_task *task, } else if (g_ascii_isspace (*p)) { /* Not header but some garbage */ - task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS; + if (target == MESSAGE_FIELD (task, raw_headers)) { + /* Do not propagate flag from the attachments */ + task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS; + } state = 100; next_state = 0; } -- 2.39.5