From cf9fb84f7efecbdc4c1410ec8c28119a0b3799e5 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Wed, 4 Apr 2018 16:31:48 +0100 Subject: [PATCH] [Minor] Use infromation about TLS in milter mode --- src/libserver/protocol.c | 7 +++++++ src/libserver/task.h | 1 + 2 files changed, 8 insertions(+) diff --git a/src/libserver/protocol.c b/src/libserver/protocol.c index f9e9b3051..238e98a91 100644 --- a/src/libserver/protocol.c +++ b/src/libserver/protocol.c @@ -450,6 +450,13 @@ rspamd_protocol_handle_headers (struct rspamd_task *task, debug_task ("read Milter header, value: %V", hv); } break; + case 't': + case 'T': + IF_HEADER (TLS_CIPHER_HEADER) { + task->flags |= RSPAMD_TASK_FLAG_SSL; + debug_task ("read TLS cipher header, value: %V", hv); + } + break; default: debug_task ("unknown header: %V", hn); break; diff --git a/src/libserver/task.h b/src/libserver/task.h index b6ff27990..e3c0492f6 100644 --- a/src/libserver/task.h +++ b/src/libserver/task.h @@ -112,6 +112,7 @@ enum rspamd_task_stage { #define RSPAMD_TASK_FLAG_GREYLISTED (1 << 26) #define RSPAMD_TASK_FLAG_OWN_POOL (1 << 27) #define RSPAMD_TASK_FLAG_MILTER (1 << 28) +#define RSPAMD_TASK_FLAG_SSL (1 << 29) #define RSPAMD_TASK_IS_SKIPPED(task) (((task)->flags & RSPAMD_TASK_FLAG_SKIP)) #define RSPAMD_TASK_IS_JSON(task) (((task)->flags & RSPAMD_TASK_FLAG_JSON)) -- 2.39.5