This is an aggregate report from %s.
------=_NextPart_000_024E_01CC9B0A.AFE54C00
-Content-Type: text/xml
+Content-Type: application/gzip
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
- filename="%s!%s!%s!%s.xml"
+ filename="%s!%s!%s!%s.xml.gz"
]]
local report_footer = [[
for k in pairs(reporting_addr) do
table.insert(tmp_addr, k)
end
- local encoded = rspamd_util.encode_base64(table.concat(
+ local encoded = rspamd_util.encode_base64(rspamd_util.gzip_compress(
+ table.concat(
{xmlf('header'),
xmlf('entries'),
- xmlf('footer')}), 78)
+ xmlf('footer')})), 78)
local function mail_cb(err, data, conn)
local function no_error(merr, mdata, wantcode)
wantcode = wantcode or '2'
table.insert(atmp, k)
end
local addr_string = table.concat(atmp, ', ')
- local rhead = string.format(report_template, report_settings.email, addr_string,
- reporting_domain, report_settings.domain, report_id, rspamd_util.time_to_string(rspamd_util.get_time()),
- rspamd_util.random_hex(12) .. '@rspamd', report_settings.domain, report_settings.domain, reporting_domain,
- report_start, report_end)
- conn:add_write(pre_quit_cb, {rhead, encoded, report_footer, '\r\n.\r\n'})
+ local rhead = string.format(report_template,
+ report_settings.email,
+ addr_string,
+ reporting_domain,
+ report_settings.domain,
+ report_id,
+ rspamd_util.time_to_string(rspamd_util.get_time()),
+ rspamd_util.random_hex(12) .. '@rspamd',
+ report_settings.domain,
+ report_settings.domain,
+ reporting_domain,
+ report_start, report_end)
+ conn:add_write(pre_quit_cb, {rhead,
+ encoded,
+ report_footer,
+ '\r\n.\r\n'})
end
end
local function data_cb(merr, mdata)