commit 78a44ca: [Minor] Dmarc_report: Fix template

Vsevolod Stakhov vsevolod at highsecure.ru
Fri Sep 3 13:35:04 UTC 2021


Author: Vsevolod Stakhov
Date: 2021-09-03 14:33:36 +0100
URL: https://github.com/rspamd/rspamd/commit/78a44caf619fd293fcc097e77641b98e76c655fe (HEAD -> master)

[Minor] Dmarc_report: Fix template
Issue: #3877

---
 lualib/rspamadm/dmarc_report.lua | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lualib/rspamadm/dmarc_report.lua b/lualib/rspamadm/dmarc_report.lua
index 0b1a1983f..561ea599d 100644
--- a/lualib/rspamadm/dmarc_report.lua
+++ b/lualib/rspamadm/dmarc_report.lua
@@ -226,23 +226,23 @@ local function entry_to_xml(data)
       <disposition>{= data.disposition =}</disposition>
       <dkim>{= data.dkim_disposition =}</dkim>
       <spf>{= data.spf_disposition =}</spf>
-      {% if data.override and data.override ~= '' %}
+      {% if data.override and data.override ~= '' -%}
       <reason><type>{= data.override =}</type></reason>
-      {% endif %}
+      {%- endif %}
     </policy_evaluated>
   </row>
   <identifiers>
     <header_from>{= data.header_from =}</header_from>
   </identifiers>
   <auth_results>
-    {% if data.dkim_results[1] %}
-    {% for d in data.dkim_results[1] %}
+    {% if data.dkim_results[1] -%}
+    {% for d in data.dkim_results -%}
     <dkim>
       <domain>{= d.domain =}</domain>
       <result>{= d.result =}</result>
     </dkim>
-    {% endfor %}
-    {% endif %}
+    {%- endfor %}
+    {%- endif %}
     <spf>
       <domain>{= data.spf_domain =}</domain>
       <result>{= data.spf_result =}</result>


More information about the Commits mailing list