commit 9b05467: [Minor] Add more fields to the DMARC reports

Vsevolod Stakhov vsevolod at highsecure.ru
Sat Apr 20 20:56:06 UTC 2019


Author: Vsevolod Stakhov
Date: 2019-04-20 21:51:53 +0100
URL: https://github.com/rspamd/rspamd/commit/9b054676f05cbad1ab1b50e17cb49523c31280fb (HEAD -> master)

[Minor] Add more fields to the DMARC reports
Issue: #2847

---
 src/plugins/lua/dmarc.lua | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

diff --git a/src/plugins/lua/dmarc.lua b/src/plugins/lua/dmarc.lua
index a8de73567..7f6296bdc 100644
--- a/src/plugins/lua/dmarc.lua
+++ b/src/plugins/lua/dmarc.lua
@@ -66,6 +66,10 @@ Content-Transfer-Encoding: 7bit
 
 This is an aggregate report from %s.
 
+Report domain: %s
+Submitter: %s
+Report ID: %s
+
 ------=_NextPart_000_024E_01CC9B0A.AFE54C00
 Content-Type: application/gzip
 Content-Transfer-Encoding: base64
@@ -962,16 +966,20 @@ if opts['reporting'] == true then
                 table.insert(atmp, k)
               end
               local addr_string = table.concat(atmp, ', ')
+              -- TODO: migrate to templates and remove this shit
               local rhead = string.format(report_template:gsub("\n", "\r\n"),
-		  report_settings.from_name,
+                  report_settings.from_name,
                   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,
+                  rspamd_util.random_hex(12) .. '@rspamd', -- Message-id
+                  report_settings.domain, -- Plain text part
+                  reporting_domain,
+                  addr_string,
+                  report_id,
                   report_settings.domain,
                   reporting_domain,
                   report_start, report_end)


More information about the Commits mailing list