diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-27 13:39:49 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-07-27 13:39:49 +0100 |
commit | 874af6856f4362ab6077b37a5defa8f3aa13d395 (patch) | |
tree | 2c5c18ff0a3812e14385bedcd99397e63502725a /src/plugins | |
parent | 4f9da3c0bd6a69510aec9408bc756e9275eee86f (diff) | |
download | rspamd-874af6856f4362ab6077b37a5defa8f3aa13d395.tar.gz rspamd-874af6856f4362ab6077b37a5defa8f3aa13d395.zip |
[Feature] Allow regexps in the emails maps
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/lua/emails.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/plugins/lua/emails.lua b/src/plugins/lua/emails.lua index 232ca2655..862d82725 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') |