From: Vsevolod Stakhov Date: Wed, 4 Apr 2018 15:31:48 +0000 (+0100) Subject: [Minor] Use infromation about TLS in milter mode X-Git-Tag: 1.7.3~33 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf9fb84f7efecbdc4c1410ec8c28119a0b3799e5;p=rspamd.git [Minor] Use infromation about TLS in milter mode --- 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))