From: Vsevolod Stakhov Date: Wed, 4 Apr 2018 15:40:31 +0000 (+0100) Subject: [Minor] Preserve more information in the artificial header X-Git-Tag: 1.7.3~31 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6d75049c12a18b1fb07cadcd4ca605debe203977;p=rspamd.git [Minor] Preserve more information in the artificial header Issue: #2143 --- diff --git a/src/libmime/message.c b/src/libmime/message.c index 37882aaf6..aaae40fa5 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -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;