]> source.dussan.org Git - rspamd.git/commitdiff
Add broken headers flag
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 22 Jan 2016 16:47:51 +0000 (16:47 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 22 Jan 2016 16:47:51 +0000 (16:47 +0000)
src/libmime/message.c
src/libserver/task.h

index 854b9e5615bc11dc68150d5449156c4d29c3081f..da34ac9cabf97d682d1966beae6b3776834fd1ad 100644 (file)
@@ -598,6 +598,8 @@ process_raw_headers (struct rspamd_task *task, GHashTable *target,
                        break;
                case 100:
                        /* Fail state, skip line */
+                       task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS;
+
                        if (*p == '\r') {
                                if (*(p + 1) == '\n') {
                                        p++;
index 45e8826db083bac45d6f9bdb3afecb965a42825b..914bbe7b9f17ced9702f4af24d5bcd92913c0412 100644 (file)
@@ -116,6 +116,7 @@ enum rspamd_task_stage {
 #define RSPAMD_TASK_FLAG_LEARN_SPAM (1 << 16)
 #define RSPAMD_TASK_FLAG_LEARN_HAM (1 << 17)
 #define RSPAMD_TASK_FLAG_LEARN_AUTO (1 << 18)
+#define RSPAMD_TASK_FLAG_BROKEN_HEADERS (1 << 19)
 
 #define RSPAMD_TASK_IS_SKIPPED(task) (((task)->flags & RSPAMD_TASK_FLAG_SKIP))
 #define RSPAMD_TASK_IS_JSON(task) (((task)->flags & RSPAMD_TASK_FLAG_JSON))