diff --git a/parsedmarc/utils.py b/parsedmarc/utils.py index 62745343..994fbb0d 100644 --- a/parsedmarc/utils.py +++ b/parsedmarc/utils.py @@ -403,16 +403,17 @@ def get_ip_address_info(ip_address, info["type"] = None if reverse_dns is not None: base_domain = get_base_domain(reverse_dns) - service = get_service_from_reverse_dns_base_domain( - base_domain, - offline=offline, - local_file_path=reverse_dns_map_path, - url=reverse_dns_map_url, - always_use_local_file=always_use_local_files, - reverse_dns_map=reverse_dns_map) - info["base_domain"] = base_domain - info["type"] = service["type"] - info["name"] = service["name"] + if base_domain is not None: + service = get_service_from_reverse_dns_base_domain( + base_domain, + offline=offline, + local_file_path=reverse_dns_map_path, + url=reverse_dns_map_url, + always_use_local_file=always_use_local_files, + reverse_dns_map=reverse_dns_map) + info["base_domain"] = base_domain + info["type"] = service["type"] + info["name"] = service["name"] if cache is not None: cache[ip_address] = info diff --git a/samples/aggregate/protection.outlook.com!example.com!1711756800!1711843200.xml b/samples/aggregate/protection.outlook.com!example.com!1711756800!1711843200.xml new file mode 100644 index 00000000..ccb2e40f --- /dev/null +++ b/samples/aggregate/protection.outlook.com!example.com!1711756800!1711843200.xml @@ -0,0 +1,45 @@ + + + 1.0 + + Outlook.com + dmarcreport@microsoft.com + cfeafefe4129445e8c81018bd9177197 + + 1711756800 + 1711843200 + + + + example.com + r + r +

none

+ none + 100 + 0 +
+ + + 100.24.188.149 + 1 + + none + fail + fail + + + + hotmail.com + example.com + example.com + + + + example.com + mfrom + fail + + + +