diff options
author | Andrew Lewis <nerf@judo.za.org> | 2016-11-04 18:30:00 +0200 |
---|---|---|
committer | Andrew Lewis <nerf@judo.za.org> | 2016-11-04 18:30:00 +0200 |
commit | ef834351aeca4bf4c1755347692f559c6b0cc267 (patch) | |
tree | 38c379473bb712e6f5cb00e1a5d2356d43f62d41 /src/plugins/lua/whitelist.lua | |
parent | 057462c67dd333292ca70c5b4a2a31eeb04c735c (diff) | |
download | rspamd-ef834351aeca4bf4c1755347692f559c6b0cc267.tar.gz rspamd-ef834351aeca4bf4c1755347692f559c6b0cc267.zip |
[Minor] Remove more globals
Diffstat (limited to 'src/plugins/lua/whitelist.lua')
-rw-r--r-- | src/plugins/lua/whitelist.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/lua/whitelist.lua b/src/plugins/lua/whitelist.lua index 517b4e63b..55d995ee5 100644 --- a/src/plugins/lua/whitelist.lua +++ b/src/plugins/lua/whitelist.lua @@ -17,7 +17,7 @@ limitations under the License. local rspamd_logger = require "rspamd_logger" local rspamd_util = require "rspamd_util" local ucl = require "ucl" -require "fun" () +local fun = require "fun" local options = { dmarc_allow_symbol = 'DMARC_POLICY_ALLOW', @@ -106,7 +106,7 @@ local function whitelist_cb(symbol, rule, task) local dkim_opts = sym[1]['options'] if dkim_opts then - each(function(val) + fun.each(function(val) if not found then local tld = rspamd_util.get_tld(val) @@ -194,7 +194,7 @@ local configure_whitelist_module = function() end if options['rules'] then - each(function(symbol, rule) + fun.each(function(symbol, rule) if rule['domains'] then if type(rule['domains']) == 'string' then rule['map'] = rspamd_config:add_kv_map(rule['domains'], @@ -202,7 +202,7 @@ local configure_whitelist_module = function() elseif type(rule['domains']) == 'table' then -- Transform ['domain1', 'domain2' ...] to indexes: -- {'domain1' = 1, 'domain2' = 1 ...] - rule['domains'] = tomap(map(function(d) + rule['domains'] = fun.tomap(fun.map(function(d) local name = d local value = 1 |