aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2022-09-19 13:46:26 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2022-09-19 13:46:26 +0100
commit1171b24a822280d0b04b7a5ed952c83034e19664 (patch)
treedb986908835d6331991ee549a4df5e84d1512ba0 /lualib
parent5bae837e5fb282e055a9d80d9d6aaf7eaed9a2d5 (diff)
downloadrspamd-1171b24a822280d0b04b7a5ed952c83034e19664.tar.gz
rspamd-1171b24a822280d0b04b7a5ed952c83034e19664.zip
[Minor] Slightly improve readability
Diffstat (limited to 'lualib')
-rw-r--r--lualib/rspamadm/dmarc_report.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/lualib/rspamadm/dmarc_report.lua b/lualib/rspamadm/dmarc_report.lua
index 85c905130..c81be13cf 100644
--- a/lualib/rspamadm/dmarc_report.lua
+++ b/lualib/rspamadm/dmarc_report.lua
@@ -291,8 +291,8 @@ local function process_rua(dmarc_domain, rua)
-- Remove size limitation, as we don't care about them
local addrs = {}
- for _,a in ipairs(parts) do
- local u = rspamd_url.create(pool, a:gsub('!%d+[kmg]?$', ''))
+ for _, rua_part in ipairs(parts) do
+ local u = rspamd_url.create(pool, rua_part:gsub('!%d+[kmg]?$', ''))
if u and (u:get_protocol() or '') == 'mailto' and u:get_user() then
-- Check each address for sanity
if dmarc_domain == u:get_tld() or dmarc_domain == u:get_host() then
@@ -310,7 +310,7 @@ local function process_rua(dmarc_domain, rua)
})
if not is_ok then
- logger.errx('cannot resolve %s: %s; exclude %s', resolve_str, results, a)
+ logger.errx('cannot resolve %s: %s; exclude %s', resolve_str, results, rua_part)
else
local found = false
for _,t in ipairs(results) do
@@ -440,7 +440,7 @@ local function send_reports_by_smtp(opts, reports, finish_cb)
}
for i=cur_batch,next_start-1 do
local report = reports[i]
- lua_smtp.sendmail({
+ local send_opts = {
ev_base = rspamadm_ev_base,
session = rspamadm_session,
config = rspamd_config,
@@ -450,7 +450,9 @@ local function send_reports_by_smtp(opts, reports, finish_cb)
from = report_settings.email,
recipients = report.rcpts,
helo = report_settings.helo or 'rspamd.localhost',
- },
+ }
+
+ lua_smtp.sendmail(send_opts,
report.message,
gen_sendmail_cb(report, gen_args))
end