diff --git a/CHANGELOG.md b/CHANGELOG.md index 3cbe7ae..71166d9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ Changelog - Fix double count of messages in the Grafana dashboard (PR #182) - Add begin and end date fields for aggregate DMARC reports in Elasticsearch (PR #183 fixes issue #162) - Fix crash on IMAP timeout (PR #186 fixes issue #163) +- Fix IMAP debugging output +- Fix `User-Agent` string 6.10.0 diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index c299f3e..e5a6d62 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -606,7 +606,7 @@ def parse_forensic_report(feedback_report, sample, msg_date, arrival_utc = arrival_utc.strftime("%Y-%m-%d %H:%M:%S") parsed_report["arrival_date_utc"] = arrival_utc - ip_address = re.split('\s', parsed_report["source_ip"]).pop(0) + ip_address = re.split(r'\s', parsed_report["source_ip"]).pop(0) parsed_report_source = get_ip_address_info(ip_address, offline=offline, nameservers=nameservers, @@ -1150,7 +1150,7 @@ def get_dmarc_reports_from_inbox(connection=None, for i in range(number_of_forensic_msgs): msg_uid = forensic_report_msg_uids[i] message = "Moving message" - logger.debug("{0} {1} of {2}: UID {2}".format( + logger.debug("{0} {1} of {2}: UID {3}".format( message, i + 1, number_of_forensic_msgs, msg_uid)) try: diff --git a/parsedmarc/utils.py b/parsedmarc/utils.py index 4273b87..de42e7c 100644 --- a/parsedmarc/utils.py +++ b/parsedmarc/utils.py @@ -26,7 +26,7 @@ import geoip2.errors import requests import publicsuffix2 -USER_AGENT = "Mozilla/5.0 ((0 {1})) parsedmarc".format( +USER_AGENT = "Mozilla/5.0 (({0} {1})) parsedmarc".format( platform.system(), platform.release(), )