diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-11-20 00:29:31 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2013-11-20 00:29:31 +0000 |
commit | c45b52f62853d8854151693663a59fbabbf475e8 (patch) | |
tree | 21458df26b54cfc223e3dd6c1c89d16b01974329 | |
parent | cb062bf2f46a5906bc1f9a0c65f1978d97e7b35c (diff) | |
download | rspamd-c45b52f62853d8854151693663a59fbabbf475e8.tar.gz rspamd-c45b52f62853d8854151693663a59fbabbf475e8.zip |
Emails and multimap configuration fixes.
-rw-r--r-- | src/plugins/lua/emails.lua | 8 | ||||
-rw-r--r-- | src/plugins/lua/multimap.lua | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 0e7705c5f..8b4ba5970 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -88,7 +88,7 @@ local function add_emails_rule(key, obj) dnsbl = nil, map = nil, domain_only = false, - symbol = k + symbol = key } for name,value in pairs(obj) do if name == 'dnsbl' then @@ -100,9 +100,7 @@ local function add_emails_rule(key, obj) elseif name == 'symbol' then newrule['symbol'] = value elseif name == 'domain_only' then - if value == 'yes' or value == 'true' or value == '1' then - newrule['domain_only'] = true - end + newrule['domain_only'] = value else rspamd_logger.err('invalid rule option: '.. name) return nil @@ -138,7 +136,7 @@ if opts then rspamd_logger.err('cannot add rule: "'..k..'"') else if type(rspamd_config.get_api_version) ~= 'nil' then - rspamd_config:register_virtual_symbol(m['symbol'], 1.0) + rspamd_config:register_virtual_symbol(rule['symbol'], 1.0) end end end diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua index 33ad35a2c..f3d3ef205 100644 --- a/src/plugins/lua/multimap.lua +++ b/src/plugins/lua/multimap.lua @@ -288,7 +288,7 @@ if opts and type(opts) == 'table' then rspamd_logger.err('cannot add rule: "'..k..'"') else if type(rspamd_config.get_api_version) ~= 'nil' then - rspamd_config:register_virtual_symbol(m['symbol'], 1.0) + rspamd_config:register_virtual_symbol(rule['symbol'], 1.0) end end else @@ -303,5 +303,4 @@ if opts and type(opts) == 'table' then rspamd_config:register_callback_symbol('MULTIMAP', 1.0, check_multimap) end end - rspamd_config:register_symbol('MULTIMAP', 1.0, check_multimap) end |