mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-07-05 16:25:09 +00:00
4.2.0 - Save each aggregate report record as a separate Splunk event
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
4.2.0
|
||||
------
|
||||
|
||||
- Save each aggregate report record as a separate Splunk event
|
||||
|
||||
4.1.9
|
||||
-----
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ import imapclient.exceptions
|
||||
import dateparser
|
||||
import mailparser
|
||||
|
||||
__version__ = "4.1.9"
|
||||
__version__ = "4.2.0"
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.setLevel(logging.ERROR)
|
||||
|
||||
@@ -93,11 +93,12 @@ class HECClient(object):
|
||||
new_report["spf_results"] = record["auth_results"][
|
||||
"spf"]
|
||||
|
||||
data["sourcetype"] = "dmarc:aggregate"
|
||||
timestamp = human_timestamp_to_timestamp(new_report["begin_date"])
|
||||
data["time"] = timestamp
|
||||
data["event"] = new_report.copy()
|
||||
json_str += "{0}\n".format(json.dumps(data))
|
||||
data["sourcetype"] = "dmarc:aggregate"
|
||||
timestamp = human_timestamp_to_timestamp(
|
||||
new_report["begin_date"])
|
||||
data["time"] = timestamp
|
||||
data["event"] = new_report.copy()
|
||||
json_str += "{0}\n".format(json.dumps(data))
|
||||
try:
|
||||
response = self.session.post(self.url, data=json_str).json()
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user