]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Preserve more information in the artificial header
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 4 Apr 2018 15:40:31 +0000 (16:40 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 4 Apr 2018 15:40:31 +0000 (16:40 +0100)
Issue: #2143

src/libmime/message.c

index 37882aaf601853978a79f8d33be942003d765e60..aaae40fa567a692046f6345a1efc8fc6623f607f 100644 (file)
@@ -1042,6 +1042,15 @@ rspamd_message_parse (struct rspamd_task *task)
                        trecv = rspamd_mempool_alloc0 (task->task_pool,
                                        sizeof (struct received_header));
                        trecv->flags |= RSPAMD_RECEIVED_FLAG_ARTIFICIAL;
+
+                       if (task->flags & RSPAMD_TASK_FLAG_SSL) {
+                               trecv->flags |= RSPAMD_RECEIVED_FLAG_SSL;
+                       }
+
+                       if (task->user) {
+                               trecv->flags |= RSPAMD_RECEIVED_FLAG_AUTHENTICATED;
+                       }
+
                        trecv->real_ip = rspamd_mempool_strdup (task->task_pool,
                                        rspamd_inet_address_to_string (task->from_addr));
                        trecv->from_ip = trecv->real_ip;