From: Vsevolod Stakhov Date: Wed, 27 Jul 2016 12:34:07 +0000 (+0100) Subject: [Fix] Fix emails module configuration X-Git-Tag: 1.3.1~50 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f9da3c0bd6a69510aec9408bc756e9275eee86f;p=thirdparty%2Frspamd.git [Fix] Fix emails module configuration --- diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 32dc001039..232ca26551 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'])