aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-12 16:23:01 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2017-04-12 16:23:01 +0100
commitd9808269124016d0092e08d296589da945ec4d8f (patch)
treee18a3648bf9437603c2116754b073e5fff943fbe
parentafa5ae306469b785eb11758eb6eecfbbd906b1f1 (diff)
downloadrspamd-d9808269124016d0092e08d296589da945ec4d8f.tar.gz
rspamd-d9808269124016d0092e08d296589da945ec4d8f.zip
[Minor] Slightly optimise maillist plugin
-rw-r--r--src/plugins/lua/maillist.lua34
1 files changed, 18 insertions, 16 deletions
diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua
index 6a22fd1bf..e63eba6dc 100644
--- a/src/plugins/lua/maillist.lua
+++ b/src/plugins/lua/maillist.lua
@@ -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