]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Slightly optimise maillist plugin
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Apr 2017 15:23:01 +0000 (16:23 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Wed, 12 Apr 2017 15:23:01 +0000 (16:23 +0100)
src/plugins/lua/maillist.lua

index 6a22fd1bfc689e76e6d0e0a6501a7a23e1e8eafa..e63eba6dc64a9eb7c0a3ca5c4d773252b5201444 100644 (file)
@@ -204,7 +204,7 @@ local function check_ml_googlegroup(task)
     end
   end
 
-  return check_rfc2919(task)
+  return true
 end
 
 -- Majordomo detector
@@ -237,7 +237,7 @@ local function check_ml_cgp(task)
     return false
   end
 
-  return check_rfc2919(task)
+  return true
 end
 
 local function check_ml_generic(task)
@@ -250,20 +250,22 @@ local function check_ml_generic(task)
 end
 
 local function check_maillist(task)
-  if check_ml_ezmlm(task) then
-    task:insert_result(symbol, 1, 'ezmlm')
-  elseif check_ml_mailman(task) then
-    task:insert_result(symbol, 1, 'mailman')
-  elseif check_ml_subscriberu(task) then
-    task:insert_result(symbol, 1, 'subscribe.ru')
-  elseif check_ml_googlegroup(task) then
-    task:insert_result(symbol, 1, 'googlegroups')
-  elseif check_ml_majordomo(task) then
-    task:insert_result(symbol, 1, 'majordomo')
-  elseif check_ml_cgp(task) then
-    task:insert_result(symbol, 1, 'cgp')
-  elseif check_ml_generic(task) then
-    task:insert_result(symbol, 0.5, 'generic')
+  if check_ml_generic(task) then
+    if check_ml_ezmlm(task) then
+      task:insert_result(symbol, 1, 'ezmlm')
+    elseif check_ml_mailman(task) then
+      task:insert_result(symbol, 1, 'mailman')
+    elseif check_ml_subscriberu(task) then
+      task:insert_result(symbol, 1, 'subscribe.ru')
+    elseif check_ml_googlegroup(task) then
+      task:insert_result(symbol, 1, 'googlegroups')
+    elseif check_ml_majordomo(task) then
+      task:insert_result(symbol, 1, 'majordomo')
+    elseif check_ml_cgp(task) then
+      task:insert_result(symbol, 1, 'cgp')
+    else
+      task:insert_result(symbol, 0.5, 'generic')
+    end
   end
 end