slackbuilds_ponce/network/opendmarc/patches/ticket153.patch

36 lines
1 KiB
Diff
Raw Normal View History

Description: do not report same dkim result multiple times
in the same record object
URL: https://sf.net/p/opendmarc/tickets/153/
Author: Tomki
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: opendmarc-1.3.2/reports/opendmarc-reports.in
===================================================================
--- opendmarc-1.3.2.orig/reports/opendmarc-reports.in 2017-03-13 19:01:56.496961757 -0400
+++ opendmarc-1.3.2/reports/opendmarc-reports.in 2017-03-13 19:01:56.492961756 -0400
@@ -703,6 +703,7 @@
exit(1);
}
+ my %dkim_domain_result_cache = ();
while ($dbi_a = $dbi_d->fetchrow_arrayref())
{
undef $dkimdomain;
@@ -716,11 +717,15 @@
$dkimresult = $dbi_a->[1];
}
-
if (!defined($dkimdomain))
{
next;
}
+ if (defined($dkim_domain_result_cache{$dkimdomain}{$dkimresult}))
+ {
+ next; # no duplicate per-record auth_result dkim sections
+ }
+ $dkim_domain_result_cache{$dkimdomain}{$dkimresult}++;
switch ($dkimresult)
{