From f5956ccd5bbbcc7d47719f84edea66dd4b896862 Mon Sep 17 00:00:00 2001 From: Sean Whalen Date: Sun, 18 Nov 2018 18:55:42 -0500 Subject: [PATCH] Fix crash when Arrival-Date header is missing in a forensic report --- CHANGELOG.md | 2 ++ parsedmarc/__init__.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3f0476..fb7e4bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ as `text` instead of `long` (Closes issue #31) - Bugfix: IDLE email processing in Gmail/G-Suite accounts (closes issue #33) - Bugfix: Fix inaccurate DNS timeout in CLI documentation (closes issue #34) +- Bugfix: Crash when `Arrival-Date` header is missing in a +forensic/fialure/ruf report - IMAP reliability improvements - Save data in separate indexes each day to make managing data retention easier - Cache DNS queries in memory diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index f30aa07..19108ae 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -527,7 +527,7 @@ def parse_forensic_report(feedback_report, sample, msg_date, parsed_report[key] = report_value[1] if "arrival_date" not in parsed_report: - parsed_report["arrival_date"] = msg_date + parsed_report["arrival_date"] = msg_date.isoformat() if "version" not in parsed_report: parsed_report["version"] = 1