From: Vsevolod Stakhov Date: Wed, 27 Jul 2016 12:39:49 +0000 (+0100) Subject: [Feature] Allow regexps in the emails maps X-Git-Tag: 1.3.1~49 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=874af6856f4362ab6077b37a5defa8f3aa13d395;p=thirdparty%2Frspamd.git [Feature] Allow regexps in the emails maps --- diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 232ca26551..862d827259 100644 --- a/src/plugins/lua/emails.lua +++ b/src/plugins/lua/emails.lua @@ -92,7 +92,11 @@ if opts and type(opts) == 'table' then if rule['map'] then rule['name'] = rule['map'] - rule['map'] = rspamd_config:add_hash_map (rule['name']) + rule['map'] = rspamd_config:add_map({ + url = rule['name'], + description = string.format('Emails rule %s', rule['symbol']), + type = 'regexp' + }) end if not rule['symbol'] or (not rule['map'] and not rule['dnsbl']) then logger.errx(rspamd_config, 'incomplete rule')