diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-14 14:02:59 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-01-14 14:02:59 +0000 |
commit | 51781c159f926e95364070ba462a6186ac4d2d32 (patch) | |
tree | 881dbbb223f00aaa2d3ce0003bd53d61673beb1a /src | |
parent | 5f7e2d6ad83aaf1246fa83be2f4a0438323d1abc (diff) | |
download | rspamd-51781c159f926e95364070ba462a6186ac4d2d32.tar.gz rspamd-51781c159f926e95364070ba462a6186ac4d2d32.zip |
[Minor] Replies: Add support of min_message_id
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/lua/replies.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 |