From: Vsevolod Stakhov Date: Thu, 14 Jan 2021 14:02:59 +0000 (+0000) Subject: [Minor] Replies: Add support of min_message_id X-Git-Tag: 3.0~766 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51781c159f926e95364070ba462a6186ac4d2d32;p=thirdparty%2Frspamd.git [Minor] Replies: Add support of min_message_id --- diff --git a/src/plugins/lua/replies.lua b/src/plugins/lua/replies.lua index e2783a0f9f..6b522ccbfe 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