diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-23 16:16:21 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-12-23 16:16:21 +0000 |
commit | a763b9c316a2b9add0de247a456a71ca495310f8 (patch) | |
tree | b88953d344eec4cf52bf20cbb32d47d27764cd03 /src/plugins/lua/dmarc.lua | |
parent | 51b39f712d38cb69ede71d62e84c9079234cdb70 (diff) | |
download | rspamd-a763b9c316a2b9add0de247a456a71ca495310f8.tar.gz rspamd-a763b9c316a2b9add0de247a456a71ca495310f8.zip |
[Minor] Remove too long strings in Lua code
Diffstat (limited to 'src/plugins/lua/dmarc.lua')
-rw-r--r-- | src/plugins/lua/dmarc.lua | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua index 1bac6fb29..4638ef0ac 100644 --- a/src/plugins/lua/dmarc.lua +++ b/src/plugins/lua/dmarc.lua @@ -401,7 +401,8 @@ local function dmarc_validate_policy(task, policy, hdrfromdom, dmarc_esld) table.insert(reason, "No valid DKIM") end - lua_util.debugm(N, task, "validated dmarc policy for %s: %s; dkim_ok=%s, dkim_tempfail=%s, spf_ok=%s, spf_tempfail=%s", + lua_util.debugm(N, task, + "validated dmarc policy for %s: %s; dkim_ok=%s, dkim_tempfail=%s, spf_ok=%s, spf_tempfail=%s", policy.domain, policy.dmarc_policy, dkim_ok, dkim_tmpfail, spf_ok, spf_tmpfail) @@ -1041,7 +1042,8 @@ if opts['reporting'] == true then if type(report_settings.additional_address) == 'string' then reporting_addr[report_settings.additional_address] = true end - rspamd_logger.infox(ev_base, 'sending report for %s <%s>', reporting_domain, table.concat(reporting_addr, ',')) + rspamd_logger.infox(ev_base, 'sending report for %s <%s>', + reporting_domain, table.concat(reporting_addr, ',')) local dmarc_xml = dmarc_report_xml() local dmarc_push_cb dmarc_push_cb = function(err, data) @@ -1197,7 +1199,8 @@ if opts['reporting'] == true then callback = check_addr_cb, }) else - rspamd_logger.errx(rspamd_config, "Couldn't get reporting address for %s: retries exceeded", reporting_domain) + rspamd_logger.errx(rspamd_config, "Couldn't get reporting address for %s: retries exceeded", + reporting_domain) delete_reports() end end @@ -1316,8 +1319,16 @@ if opts['reporting'] == true then pool:set_variable(VAR_NAME, time) local yesterday = os.date('!*t', rspamd_util.get_time() - INTERVAL) local today = os.date('!*t', rspamd_util.get_time()) - report_start = os.time({year = yesterday.year, month = yesterday.month, day = yesterday.day, hour = 0}) + tz_offset - report_end = os.time({year = today.year, month = today.month, day = today.day, hour = 0}) + tz_offset + report_start = os.time({ + year = yesterday.year, + month = yesterday.month, + day = yesterday.day, + hour = 0}) + tz_offset + report_end = os.time({ + year = today.year, + month = today.month, + day = today.day, + hour = 0}) + tz_offset want_period = table.concat({ yesterday.year, string.format('%02d', yesterday.month), |