]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Use infromation about TLS in milter mode
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 4 Apr 2018 15:31:48 +0000 (16:31 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 4 Apr 2018 15:31:48 +0000 (16:31 +0100)
src/libserver/protocol.c
src/libserver/task.h

index f9e9b3051729e16d2f25483ebebe23afe5350c71..238e98a917179c87cf14a4f5c8ecb72572f10208 100644 (file)
@@ -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;
index b6ff2799073cfc640885205d52ff4b358d9573cd..e3c0492f6477f2f979bb65d31dbc86a1ddec461c 100644 (file)
@@ -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))