Closes issue #94
This commit is contained in:
Sean Whalen committed 2019-07-02 10:41:40 -04:00
1 parent 11cf6f8ba6
commit 2351590c4d
6 files changed
+20 -4

No files matched your search

+2
View File
@@ -127,3 +127,5 @@ tmp/
prod*.ini
stage*.ini
dev*.ini
*.mmdb
+9
View File
@@ -1,3 +1,12 @@
6.4.2
-----
- Do not attempt to convert `org_name` to a base domain if `org_name` contains
a space (closes issue #94)
- Always lowercase the `header_from`
- Provide a more helpful warning message when `GeoLite2-Country.mmdb` is
missing
6.4.1
-----
+1
View File
@@ -475,6 +475,7 @@ On Debian or Ubuntu systems, run:
.. code-block:: bash
sudo apt-get install -y python3-pip geoipupdate
sudo geoipupdate
On CentOS systems, run:
+4 -2
View File
@@ -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.4.1"
__version__ = "6.4.2"
logging.basicConfig(
format='%(levelname)8s:%(filename)s:%(lineno)d:'
@@ -145,6 +145,8 @@ def _parse_report_record(record, nameservers=None, dns_timeout=2.0,
new_record["policy_evaluated"] = new_policy_evaluated
new_record["identifiers"] = record["identifiers"].copy()
new_record["auth_results"] = OrderedDict([("dkim", []), ("spf", [])])
lowered_from = new_record["identifiers"]["header_from"].lower()
new_record["identifiers"]["header_from"] = lowered_from
if record["auth_results"] is not None:
auth_results = record["auth_results"].copy()
if "spf" not in auth_results:
@@ -248,7 +250,7 @@ def parse_aggregate_report_xml(xml, nameservers=None, timeout=2.0,
report_metadata["org_name"] = report_metadata[
"email"].split("@")[-1]
org_name = report_metadata["org_name"]
if org_name is not None:
if org_name is not None and " " not in org_name:
org_name = get_base_domain(org_name)
new_report_metadata["org_name"] = org_name
new_report_metadata["org_email"] = report_metadata["email"]
+3 -1
View File
@@ -276,7 +276,9 @@ def get_ip_address_country(ip_address, parallel=False):
location (str): Local location for the database file
"""
if parallel:
logging.warning("Cannot download GeoIP database in parallel mode")
logging.warning("GeoLite2-Country.mmdb is missing."
"please install and run geoipupdate as root to "
"get the latest version.")
return
url = "https://geolite.maxmind.com/download/geoip/database/" \
"GeoLite2-Country.tar.gz"
+1 -1
View File
@@ -14,7 +14,7 @@ from setuptools import setup
from codecs import open
from os import path
__version__ = "6.4.1"
__version__ = "6.4.2"
description = "A Python package and CLI for parsing aggregate and " \
"forensic DMARC reports"