summaryrefslogtreecommitdiffstats
path: root/src/plugins/lua
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-05 18:55:44 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2011-03-05 18:55:44 +0300
commit7487d02f1b3224a913e66d9940adcdaf9c966e7d (patch)
tree9a938f35588568fe5aa049df96e0a8bf37530712 /src/plugins/lua
parentc494636eedee963c4789fc7b8a0cd7d9acc80e18 (diff)
downloadrspamd-7487d02f1b3224a913e66d9940adcdaf9c966e7d.tar.gz
rspamd-7487d02f1b3224a913e66d9940adcdaf9c966e7d.zip
Make phishing checks working.
Diffstat (limited to 'src/plugins/lua')
-rw-r--r--src/plugins/lua/multimap.lua13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/plugins/lua/multimap.lua b/src/plugins/lua/multimap.lua
index 15c906657..a4ef3c0a5 100644
--- a/src/plugins/lua/multimap.lua
+++ b/src/plugins/lua/multimap.lua
@@ -214,10 +214,21 @@ local function add_multimap_rule(params)
end
if newrule['type'] == 'ip' then
newrule['ips'] = rspamd_config:add_radix_map (newrule['map'])
+ if newrule['ips'] then
+ table.insert(rules, newrule)
+ else
+ rspamd_logger.warn('Cannot add rule: map doesn\'t exists: ' .. newrule['map'])
+ end
elseif newrule['type'] == 'header' or newrule['type'] == 'rcpt' or newrule['type'] == 'from' then
newrule['hash'] = rspamd_config:add_hash_map (newrule['map'])
+ if newrule['hash'] then
+ table.insert(rules, newrule)
+ else
+ rspamd_logger.warn('Cannot add rule: map doesn\'t exists: ' .. newrule['map'])
+ end
+ else
+ table.insert(rules, newrule)
end
- table.insert(rules, newrule)
return newrule
end