diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-03-19 14:48:55 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2022-03-19 14:48:55 +0000 |
commit | 89960ca4a4909451f83519cb5c16047246d2ae9e (patch) | |
tree | b0590a3ed788af45dec6933072f0ad3f117999ad /src/plugins/lua/rbl.lua | |
parent | b083a2a17f190d7e15ba0a80aa811746f974a8ed (diff) | |
download | rspamd-89960ca4a4909451f83519cb5c16047246d2ae9e.tar.gz rspamd-89960ca4a4909451f83519cb5c16047246d2ae9e.zip |
[Minor] Rbl: Do not check empty user/domain in rbl
Diffstat (limited to 'src/plugins/lua/rbl.lua')
-rw-r--r-- | src/plugins/lua/rbl.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/plugins/lua/rbl.lua b/src/plugins/lua/rbl.lua index 7d8a861ea..fa543e73d 100644 --- a/src/plugins/lua/rbl.lua +++ b/src/plugins/lua/rbl.lua @@ -662,6 +662,12 @@ local function gen_rbl_callback(rule) email_tbl.domain = email_tbl.domain:lower() email_tbl.user = email_tbl.user:lower() + if #email_tbl.domain == 0 or #email_tbl.user == 0 then + rspamd_logger.infox(task, "got empty/invalid email: '%s@%s'; skip it in the checks", + email_tbl.user, email_tbl.domain) + return + end + if rule.emails_domainonly then add_dns_request(task, email_tbl.domain, false, false, requests_table, what, whitelist) @@ -719,8 +725,8 @@ local function gen_rbl_callback(rule) end local email_tbl = { - domain = domain, - user = email:get_user(), + domain = domain or '', + user = email:get_user() or '', addr = tostring(email), } check_email_table(task, email_tbl, requests_table, whitelist, 'email') |