mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-05-20 02:45:24 +00:00
Actually save source_tye and source_name to Elasticsearch and Opensearch
This commit is contained in:
@@ -413,7 +413,7 @@ def parse_aggregate_report_xml(
|
||||
Args:
|
||||
xml (str): A string of DMARC aggregate report XML
|
||||
ip_db_path (str): Path to a MMDB file from MaxMind or DBIP
|
||||
always_use_local_files (bool): Do not download files
|
||||
always_use_local_files (bool): Do not download files
|
||||
reverse_dns_map_path (str): Path to a reverse DNS map file
|
||||
reverse_dns_map_url (str): URL to a reverse DNS map file
|
||||
offline (bool): Do not query online for geolocation or DNS
|
||||
|
||||
@@ -60,7 +60,7 @@ class _AggregateReportDoc(Document):
|
||||
source_ip_address = Ip()
|
||||
source_country = Text()
|
||||
source_reverse_dns = Text()
|
||||
source_Base_domain = Text()
|
||||
source_base_domain = Text()
|
||||
source_type = Text()
|
||||
source_name = Text()
|
||||
message_count = Integer
|
||||
@@ -442,6 +442,8 @@ def save_aggregate_report_to_elasticsearch(aggregate_report,
|
||||
source_country=record["source"]["country"],
|
||||
source_reverse_dns=record["source"]["reverse_dns"],
|
||||
source_base_domain=record["source"]["base_domain"],
|
||||
source_type=record["source"]["type"],
|
||||
source_name=record["source"]["name"],
|
||||
message_count=record["count"],
|
||||
disposition=record["policy_evaluated"]["disposition"],
|
||||
dkim_aligned=record["policy_evaluated"]["dkim"] is not None and
|
||||
|
||||
@@ -59,7 +59,7 @@ class _AggregateReportDoc(Document):
|
||||
source_ip_address = Ip()
|
||||
source_country = Text()
|
||||
source_reverse_dns = Text()
|
||||
source_Base_domain = Text()
|
||||
source_base_domain = Text()
|
||||
source_type = Text()
|
||||
source_name = Text()
|
||||
message_count = Integer
|
||||
@@ -438,6 +438,8 @@ def save_aggregate_report_to_opensearch(aggregate_report,
|
||||
source_country=record["source"]["country"],
|
||||
source_reverse_dns=record["source"]["reverse_dns"],
|
||||
source_base_domain=record["source"]["base_domain"],
|
||||
source_type=record["source"]["type"],
|
||||
source_name=record["source"]["name"],
|
||||
message_count=record["count"],
|
||||
disposition=record["policy_evaluated"]["disposition"],
|
||||
dkim_aligned=record["policy_evaluated"]["dkim"] is not None and
|
||||
|
||||
Reference in New Issue
Block a user