diff options
author | Jean-Louis Dupond <jean-louis@dupond.be> | 2017-07-17 21:54:28 +0200 |
---|---|---|
committer | Jean-Louis Dupond <jean-louis@dupond.be> | 2017-07-17 21:54:28 +0200 |
commit | 99622333184c5524595144f3cd3f6f39721b200d (patch) | |
tree | 26513026dd74ce6f9efad639c1b7e4212fc5b00e | |
parent | 660d3e9967cee74a642daec7525a67e2f74bcdc1 (diff) | |
download | rspamd-99622333184c5524595144f3cd3f6f39721b200d.tar.gz rspamd-99622333184c5524595144f3cd3f6f39721b200d.zip |
[Fix] Don't use whitelist/greylist maps as regexp, but as map
In whitelist & greylist module, the domain files (like spf_dkim_whitelist.inc, etc) were read as regexp map.
This caused the following false whitelists:
WHITELIST_SPF_DKIM(-3)[onmicrosoft.com]
this while only 'microsoft.com' was in the list!
Reading the maps as 'map'/'hash' instead of 'regexp' fixes the issue.
-rw-r--r-- | src/plugins/lua/greylist.lua | 2 | ||||
-rw-r--r-- | src/plugins/lua/whitelist.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/lua/greylist.lua b/src/plugins/lua/greylist.lua index 586661d44..719ba9270 100644 --- a/src/plugins/lua/greylist.lua +++ b/src/plugins/lua/greylist.lua @@ -413,7 +413,7 @@ if opts then whitelisted_ip = rspamd_map_add('greylist', 'whitelisted_ip', 'radix', 'Greylist whitelist ip map') whitelist_domains_map = rspamd_map_add('greylist', 'whitelist_domains_url', - 'regexp', 'Greylist whitelist domains map') + 'map', 'Greylist whitelist domains map') redis_params = rspamd_parse_redis_server('greylist') if not redis_params then diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua index 634591e03..5677bd415 100644 --- a/src/plugins/lua/whitelist.lua +++ b/src/plugins/lua/whitelist.lua @@ -208,7 +208,7 @@ local configure_whitelist_module = function() rule['map'] = rspamd_config:add_map{ url = rule['domains'], description = "Whitelist map for " .. symbol, - type = 'regexp' + type = 'map' } elseif type(rule['domains']) == 'table' then -- Transform ['domain1', 'domain2' ...] to indexes: @@ -236,7 +236,7 @@ local configure_whitelist_module = function() rule['map'] = rspamd_config:add_map{ url = rule['domains'], description = "Whitelist map for " .. symbol, - type = 'regexp' + type = 'map' } end else |