commit 5540e29: Merge pull request #3363 from membero/fix/rbl-email-lowercase
GitHub
noreply at github.com
Sat May 16 19:14:08 UTC 2020
Author: Vsevolod Stakhov
Date: 2020-05-16 20:08:29 +0100
URL: https://github.com/rspamd/rspamd/commit/5540e295f8fbb2c4504396cdc2722e2e24f8f2bc (HEAD -> master)
Merge pull request #3363 from membero/fix/rbl-email-lowercase
[Fix] lowercase for emails checked on RBLs
src/plugins/lua/rbl.lua | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --combined src/plugins/lua/rbl.lua
index df25c9587,bfc2dcc6b..d299575ee
--- a/src/plugins/lua/rbl.lua
+++ b/src/plugins/lua/rbl.lua
@@@ -509,7 -509,6 +509,7 @@@ local function gen_rbl_callback(rule
ignore_ip = rule.no_ip,
need_images = rule.images,
need_emails = false,
+ need_content = rule.content_urls or false,
esld_limit = esld_lim,
no_cache = true,
}
@@@ -590,7 -589,8 +590,8 @@@
local function check_email_table(task, email_tbl, requests_table, whitelist, what)
lua_util.remove_email_aliases(email_tbl)
- email_tbl.addr = email_tbl.addr:lower()
+ email_tbl.domain = email_tbl.domain:lower()
+ email_tbl.user = email_tbl.user:lower()
if rule.emails_domainonly then
add_dns_request(task, email_tbl.domain, false, false, requests_table,
@@@ -1094,6 -1094,9 +1095,6 @@@ local default_options =
['default_exclude_private_ips'] = true,
['default_exclude_users'] = false,
['default_exclude_local'] = true,
- ['default_is_whitelist'] = false,
- ['default_ignore_whitelist'] = false,
- ['default_resolve_ip'] = false,
['default_no_ip'] = false,
['default_images'] = false,
['default_replyto'] = false,
@@@ -1153,12 -1156,6 +1154,12 @@@ local rule_schema_tbl =
process_script = ts.string:is_optional(),
emails_delimiter = ts.string:is_optional(),
ignore_defaults = ts.boolean:is_optional(),
+ ignore_default = ts.boolean:is_optional(), -- alias
+ ignore_whitelist = ts.boolean:is_optional(),
+ ignore_whitelists = ts.boolean:is_optional(), -- alias
+ is_whitelist = ts.boolean:is_optional(),
+ resolve_ip = ts.boolean:is_optional(),
+ content_urls = ts.boolean:is_optional(),
disable_monitoring = ts.boolean:is_optional(),
symbols_prefixes = ts.map_of(ts.string, ts.string):is_optional(),
}
@@@ -1173,13 -1170,6 +1174,13 @@@ for key,rbl in pairs(opts.rbls or opts.
if type(rbl) ~= 'table' or rbl.disabled == true or rbl.enabled == false then
rspamd_logger.infox(rspamd_config, 'disable rbl "%s"', key)
else
+ -- Aliases
+ if type(rbl.ignore_default) == 'boolean' then
+ rbl.ignore_defaults = rbl.ignore_default
+ end
+ if type(rbl.ignore_whitelists) == 'boolean' then
+ rbl.ignore_whitelist = rbl.ignore_whitelists
+ end
-- Propagate default options from opts to rule
if not rbl.ignore_defaults then
for default_opt_key,_ in pairs(default_options) do
More information about the Commits
mailing list