Updated to pass nameserver arguments to all occurances of parse_report_record(). This significantly speeds up processing long reports from the inbox in my testing.

This commit is contained in:
Mike Siegel
2018-08-30 12:02:44 -04:00
parent 22c2e8799a
commit ff8aa4fc32
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -492,7 +492,8 @@ def parse_aggregate_report_xml(xml, nameservers=None, timeout=6.0):
timeout=timeout))
else:
records.append(_parse_report_record(report["record"]))
records.append(_parse_report_record(report["record"]),
nameservers=nameservers)
new_report["records"] = records
+2
View File
@@ -163,12 +163,14 @@ def _main():
rf = args.reports_folder
af = args.archive_folder
ns = args.nameservers
reports = get_dmarc_reports_from_inbox(args.host,
args.user,
args.password,
reports_folder=rf,
archive_folder=af,
delete=args.delete,
nameservers=ns,
test=args.test)
aggregate_reports += reports["aggregate_reports"]