diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-27 13:34:07 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-27 13:34:07 +0100 |
commit | 4f9da3c0bd6a69510aec9408bc756e9275eee86f (patch) | |
tree | 6eda3bf6a5d1c491ac1377a776ced35e240bd612 /src/plugins/lua/emails.lua | |
parent | 37832e030102a1cef9c678d5b50308c548694f41 (diff) | |
download | rspamd-4f9da3c0bd6a69510aec9408bc756e9275eee86f.tar.gz rspamd-4f9da3c0bd6a69510aec9408bc756e9275eee86f.zip |
[Fix] Fix emails module configuration
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']) |