diff options
Diffstat (limited to 'src/plugins/lua/emails.lua')
-rw-r--r-- | src/plugins/lua/emails.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 32dc00103..232ca2655 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -81,12 +81,15 @@ end local opts = rspamd_config:get_all_opt('emails', 'rule') if opts and type(opts) == 'table' then - for k,v in pairs(opts) do - if k == 'rule' and type(v) == 'table' then + local r = opts['rule'] + + if r then + for k,v in pairs(r) do local rule = v if not rule['symbol'] then rule['symbol'] = k end + if rule['map'] then rule['name'] = rule['map'] rule['map'] = rspamd_config:add_hash_map (rule['name']) |