]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Don't save empty Message-ID in replies module 3388/head
authorAnton Yuzhaninov <citrin+git@citrin.ru>
Wed, 3 Jun 2020 11:37:22 +0000 (12:37 +0100)
committerAnton Yuzhaninov <citrin+git@citrin.ru>
Wed, 3 Jun 2020 11:37:22 +0000 (12:37 +0100)
Skip messages with an empty or too short Message-ID (e. g. <>)
in replies module.

src/plugins/lua/replies.lua

index 66a36ff0018ec9c96f6cd957c7a1255a0536c833..30438c13f2b73e8dae0ca1c9dc106e98e69fd6c9 100644 (file)
@@ -150,7 +150,7 @@ local function replies_set(task)
   end
   -- If no message-id present return
   local msg_id = task:get_header_raw('message-id')
-  if msg_id == nil then
+  if msg_id == nil or msg_id:len() <= 2 then
     return
   end
   -- Create hash of message-id and store to redis