diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-21 12:59:43 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-06-21 12:59:43 +0100 |
commit | ca05da58d8333c40bf6164b82190eebe08e21b15 (patch) | |
tree | 139ab8f47bb5d00e7ec95f6e4476b1caa3866385 /src/libmime/mime_parser.c | |
parent | 08ca8ae9290d9ca7f35229d588ddd1b4776d1583 (diff) | |
download | rspamd-ca05da58d8333c40bf6164b82190eebe08e21b15.tar.gz rspamd-ca05da58d8333c40bf6164b82190eebe08e21b15.zip |
[Fix] Fix proxying of Exim connections
Diffstat (limited to 'src/libmime/mime_parser.c')
-rw-r--r-- | src/libmime/mime_parser.c | 34 |
1 files changed, 15 insertions, 19 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index d60a3fea2..0365a02b2 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1077,26 +1077,22 @@ rspamd_mime_parse_message (struct rspamd_task *task, * Exim somehow uses mailbox format for messages being scanned: * From x@x.com Fri May 13 19:08:48 2016 * - * So we check if a task has non-http format then we check for such a line - * at the beginning to avoid errors + * Need to check that for all inputs due to proxy */ - if (!(task->flags & RSPAMD_TASK_FLAG_JSON) || (task->flags & - RSPAMD_TASK_FLAG_LOCAL_CLIENT)) { - if (len > sizeof ("From ") - 1) { - if (memcmp (p, "From ", sizeof ("From ") - 1) == 0) { - /* Skip to CRLF */ - msg_info_task ("mailbox input detected, enable workaround"); - p += sizeof ("From ") - 1; - len -= sizeof ("From ") - 1; - - while (len > 0 && *p != '\n') { - p ++; - len --; - } - while (len > 0 && g_ascii_isspace (*p)) { - p ++; - len --; - } + if (len > sizeof ("From ") - 1) { + if (memcmp (p, "From ", sizeof ("From ") - 1) == 0) { + /* Skip to CRLF */ + msg_info_task ("mailbox input detected, enable workaround"); + p += sizeof ("From ") - 1; + len -= sizeof ("From ") - 1; + + while (len > 0 && *p != '\n') { + p ++; + len --; + } + while (len > 0 && g_ascii_isspace (*p)) { + p ++; + len --; } } } |