commit a4e6812: Fix maillist checks to catch Google Groups which don't have List-Subscribe header.

Reio Remma reio at mrstuudio.ee
Wed Oct 16 22:56:07 UTC 2019


Author: Reio Remma
Date: 2019-10-16 23:41:39 +0300
URL: https://github.com/rspamd/rspamd/commit/a4e68122abcb9d9dbbf676d252790f62bae1246f (refs/pull/3094/head)

Fix maillist checks to catch Google Groups which don't have List-Subscribe header.

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

diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua
index 54d46a79c..005909a02 100644
--- a/src/plugins/lua/maillist.lua
+++ b/src/plugins/lua/maillist.lua
@@ -256,7 +256,9 @@ local function check_generic_list_headers(task)
 
   if has_subscribe and has_unsubscribe then
     score = score + 0.25
-  elseif (has_subscribe or has_unsubscribe) then
+  elseif (has_unsubscribe) then
+    score = score - 0.25
+  elseif (has_subscribe) then
     score = score - 0.75
   end
 


More information about the Commits mailing list