commit 51781c1: [Minor] Replies: Add support of min_message_id

Vsevolod Stakhov vsevolod at highsecure.ru
Thu Jan 14 14:07:06 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-01-14 14:02:59 +0000
URL: https://github.com/rspamd/rspamd/commit/51781c159f926e95364070ba462a6186ac4d2d32

[Minor] Replies: Add support of min_message_id

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

diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua
index e2783a0f9..6b522ccbf 100644
--- a/src/plugins/lua/replies.lua
+++ b/src/plugins/lua/replies.lua
@@ -43,6 +43,7 @@ local settings = {
   cookie_key = nil,
   cookie_is_pattern = false,
   cookie_valid_time = '2w', -- 2 weeks by default
+  min_message_id = 2, -- minimum length of the message-id header
 }
 
 local N = "replies"
@@ -150,7 +151,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 or msg_id:len() <= 2 then
+  if msg_id == nil or msg_id:len() <= (settings.min_message_id or 2) then
     return
   end
   -- Create hash of message-id and store to redis


More information about the Commits mailing list