aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-04 16:40:31 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-04-04 16:40:31 +0100
commit6d75049c12a18b1fb07cadcd4ca605debe203977 (patch)
tree9b66afe6c1da69d048a83fa7d5fef972fac999cd /src/libmime/message.c
parent3cf2ddb03945b794da8f18021d9e9744bff2edcb (diff)
downloadrspamd-6d75049c12a18b1fb07cadcd4ca605debe203977.tar.gz
rspamd-6d75049c12a18b1fb07cadcd4ca605debe203977.zip
[Minor] Preserve more information in the artificial header
Issue: #2143
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r--src/libmime/message.c9
1 files changed, 9 insertions, 0 deletions
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;