summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua/maillist.lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-16 20:43:26 +0400
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2010-06-16 20:43:26 +0400
commita639bf512e3df778fa33c49d83c3996c9fe60d77 (patch)
tree072c4167dae82382b1c8eef93e0270339635e389 /src/plugins/lua/maillist.lua
parentc4aab3053d2839e6d3b99f8a542b0a4f54f2b856 (diff)
downloadrspamd-a639bf512e3df778fa33c49d83c3996c9fe60d77.tar.gz
rspamd-a639bf512e3df778fa33c49d83c3996c9fe60d77.zip
* Change metric logic
* Completely remove lex/yacc readers for config * Make common sense of metric/action and symbols * Sync changes with all plugins TODO: add this to documentation
Diffstat (limited to 'src/plugins/lua/maillist.lua')
-rw-r--r--src/plugins/lua/maillist.lua14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/plugins/lua/maillist.lua b/src/plugins/lua/maillist.lua
index 18514aa86..098c512a4 100644
--- a/src/plugins/lua/maillist.lua
+++ b/src/plugins/lua/maillist.lua
@@ -1,7 +1,5 @@
-- Module for checking mail list headers
-
-local metric = 'default'
local symbol = 'MAILLIST'
-- EZMLM
@@ -157,11 +155,11 @@ end
function check_maillist(task)
if check_ml_ezmlm(task) then
- task:insert_result(metric, symbol, 1, 'ezmlm')
+ task:insert_result(symbol, 1, 'ezmlm')
elseif check_ml_mailman(task) then
- task:insert_result(metric, symbol, 1, 'mailman')
+ task:insert_result(symbol, 1, 'mailman')
elseif check_ml_subscriberu(task) then
- task:insert_result(metric, symbol, 1, 'subscribe.ru')
+ task:insert_result(symbol, 1, 'subscribe.ru')
end
end
@@ -169,11 +167,7 @@ end
local opts = rspamd_config:get_all_opt('maillist')
if opts then
if opts['symbol'] then
- if opts['metric'] then
- metric = opts['metric']
- end
symbol = opts['symbol']
- local m = rspamd_config:get_metric(metric)
- m:register_symbol(symbol, 1.0, 'check_maillist')
+ rspamd_config:register_symbol(symbol, 1.0, 'check_maillist')
end
end