commit b5c8d4d: [Minor] Don't save empty Message-ID in replies module

Anton Yuzhaninov citrin+git at citrin.ru
Wed Jun 3 18:56:11 UTC 2020


Author: Anton Yuzhaninov
Date: 2020-06-03 12:37:22 +0100
URL: https://github.com/rspamd/rspamd/commit/b5c8d4dfab500a42112de274a4d6a4453010f533 (refs/pull/3388/head)

[Minor] Don't save empty Message-ID in replies module
Skip messages with an empty or too short Message-ID (e. g. <>)
in replies module.

---
 src/plugins/lua/replies.lua | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua
index 66a36ff00..30438c13f 100644
--- a/src/plugins/lua/replies.lua
+++ b/src/plugins/lua/replies.lua
@@ -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


More information about the Commits mailing list