Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/techsneeze/dmarcts-report-parser.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Karall-Ahlborn <wolfgangkarall@users.noreply.github.com>2021-03-18 22:53:28 +0300
committerWolfgang Karall-Ahlborn <wolfgangkarall@users.noreply.github.com>2021-03-18 22:53:28 +0300
commitfc66074daf7f22b9f0bfc1129a90551adfe918c7 (patch)
tree7b5d37fd28bc888a6c989577200c253ef14aa4ad
parenta2945aadc612383554f374721bef508965de0efb (diff)
Force disposition to be 'unknown' too if it doesn't match the enum values.
Rather there's 'unknown' in the DB column than empty strings.
-rwxr-xr-xdmarcts-report-parser.pl3
1 files changed, 3 insertions, 0 deletions
diff --git a/dmarcts-report-parser.pl b/dmarcts-report-parser.pl
index e140ce4..6b473fc 100755
--- a/dmarcts-report-parser.pl
+++ b/dmarcts-report-parser.pl
@@ -867,6 +867,9 @@ sub storeXMLInDatabase {
#print "ip $ip\n";
my $count = $r{'row'}->{'count'};
my $disp = $r{'row'}->{'policy_evaluated'}->{'disposition'};
+ if ( ! grep { $_ eq $disp } ALLOWED_DISPOSITION ) {
+ $disp = 'unknown';
+ };
# some reports don't have dkim/spf, "unknown" is default for these
my $dkim_align = $r{'row'}->{'policy_evaluated'}->{'dkim'};
if ( ! grep { $_ eq $dkim_align } ALLOWED_DKIM_ALIGN ) {