diff --git a/CHANGELOG.md b/CHANGELOG.md index 8cafe46..753c69e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,19 @@ Changelog ========= +8.18.2 +------ + +- Merged PR #603 + - Fixes issue #595 - CI test fails for Elasticsearch + - Moved Elasticsearch to a separate Docker service container for CI testing + - Dropped Python 3.8 from CI testing + - Fixes lookup and saving of DMARC forensic reports in Elasticsearch and OpenSearch +- Updated fallback `base_reverse_dns_map.csv`, which now includes over 1,400 lines +- Updated included `dbip-country-lite.mmdb` to the June 2025 release +- Automatically fall back to the internal `base_reverse_dns_map.csv` if the received file is not valid (Fixes #602) + - Print the received data to the debug log + 8.18.1 ------ diff --git a/parsedmarc/__init__.py b/parsedmarc/__init__.py index 8a44e1d..faa1f56 100644 --- a/parsedmarc/__init__.py +++ b/parsedmarc/__init__.py @@ -39,7 +39,7 @@ from parsedmarc.utils import is_outlook_msg, convert_outlook_msg from parsedmarc.utils import parse_email from parsedmarc.utils import timestamp_to_human, human_timestamp_to_datetime -__version__ = "8.18.1" +__version__ = "8.18.2" logger.debug("parsedmarc v{0}".format(__version__)) diff --git a/parsedmarc/resources/dbip/README.md b/parsedmarc/resources/dbip/README.md index 7542290..85f222f 100644 --- a/parsedmarc/resources/dbip/README.md +++ b/parsedmarc/resources/dbip/README.md @@ -1,7 +1,7 @@ # About `dbip-country-lite.mmdb` is provided by [dbip][dbip] under a -[ Creative Commons Attribution 4.0 International License][cc]. +[Creative Commons Attribution 4.0 International License][cc]. [dbip]: https://db-ip.com/db/download/ip-to-country-lite [cc]: http://creativecommons.org/licenses/by/4.0/ diff --git a/parsedmarc/utils.py b/parsedmarc/utils.py index 473e406..60c7071 100644 --- a/parsedmarc/utils.py +++ b/parsedmarc/utils.py @@ -352,6 +352,11 @@ def get_service_from_reverse_dns_base_domain( load_csv(csv_file) except requests.exceptions.RequestException as e: logger.warning(f"Failed to fetch reverse DNS map: {e}") + except Exception: + logger.warning("Not a valid CSV file") + csv_file.seek(0) + logger.debug(csv_file.read()) + if len(reverse_dns_map) == 0: logger.info("Loading included reverse DNS map...") path = str(