mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-19 18:35:24 +00:00
6.1.1
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
6.1.1
|
||||
-----
|
||||
|
||||
- Fix aggregate report processing
|
||||
- Check for the existence of a configuration file if a path is supplied
|
||||
|
||||
6.1.0
|
||||
-----
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ from parsedmarc.utils import is_outlook_msg, convert_outlook_msg
|
||||
from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime
|
||||
from parsedmarc.utils import parse_email
|
||||
|
||||
__version__ = "6.1.0"
|
||||
__version__ = "6.1.1"
|
||||
|
||||
logging.basicConfig(
|
||||
format='%(levelname)8s:%(filename)s:%(lineno)d:'
|
||||
@@ -725,6 +725,8 @@ def parse_report_email(input_, nameservers=None, dns_timeout=2.0,
|
||||
dns_timeout=dns_timeout)
|
||||
result = OrderedDict([("report_type", "aggregate"),
|
||||
("report", aggregate_report)])
|
||||
return result
|
||||
|
||||
except (TypeError, ValueError, binascii.Error):
|
||||
pass
|
||||
|
||||
@@ -765,7 +767,6 @@ def parse_report_email(input_, nameservers=None, dns_timeout=2.0,
|
||||
'not a valid DMARC report'.format(subject)
|
||||
raise InvalidDMARCReport(error)
|
||||
|
||||
return result
|
||||
|
||||
|
||||
def parse_report_file(input_, nameservers=None, dns_timeout=2.0,
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
"""A CLI for parsing DMARC reports"""
|
||||
|
||||
from argparse import Namespace, ArgumentParser
|
||||
import os
|
||||
from configparser import ConfigParser
|
||||
from glob import glob
|
||||
import logging
|
||||
@@ -182,6 +183,10 @@ def _main():
|
||||
args = arg_parser.parse_args()
|
||||
|
||||
if args.config_file:
|
||||
abs_path = os.path.abspath(args.config_file)
|
||||
if not os.path.exists(abs_path):
|
||||
logger.error("A file does not exist at {0}".format(abs_path))
|
||||
exit(-1)
|
||||
opts.silent = True
|
||||
config = ConfigParser()
|
||||
config.read(args.config_file)
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import geoip2.errors
|
||||
import requests
|
||||
import publicsuffix
|
||||
|
||||
__version__ = "6.1.0"
|
||||
__version__ = "6.1.1"
|
||||
|
||||
USER_AGENT = "Mozilla/5.0 ((0 {1})) parsedmarc/{2}".format(
|
||||
platform.system(),
|
||||
|
||||
Reference in New Issue
Block a user