]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Treat bad SMTP from as broken header
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 28 Feb 2017 13:21:40 +0000 (13:21 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 28 Feb 2017 13:21:40 +0000 (13:21 +0000)
src/libserver/protocol.c

index a3f7f916767d752222e03ab4fe86e81ded822500..3a03c3b50457c1a79849c608748c243bca97e2dd 100644 (file)
@@ -327,6 +327,7 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
                                                        hv->len);
                                        if (!task->from_envelope) {
                                                msg_err_task ("bad from header: '%V'", hv);
+                                               task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS;
                                        }
                                }
                                else {
@@ -373,6 +374,7 @@ rspamd_protocol_handle_headers (struct rspamd_task *task,
                                        }
                                        else {
                                                msg_err_task ("bad from header: '%T'", h->value);
+                                               task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS;
                                        }
                                        debug_task ("read rcpt header, value: %V", hv);
                                }