mirror of
https://github.com/domainaware/parsedmarc.git
synced 2026-03-28 17:32:48 +00:00
Compare commits
5 Commits
9.0.6
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1e76c8569 | ||
|
|
a5de313a57 | ||
|
|
3d74cd6ac0 | ||
|
|
d1ac59a016 | ||
|
|
7fdd53008f |
@@ -11,7 +11,7 @@
|
||||
### Improvements
|
||||
|
||||
- Improve type hints across the library (Pylance/Pyright friendliness) and reduce false-positive linter errors.
|
||||
- Emails in Microsoft 365 are now marked read as they are read. This provides constancy with other mailbox types, and gives you a indication of when emails are being read as they are processed in batches.
|
||||
- Emails in Microsoft 365 are now marked read as they are read. This provides constancy with other mailbox types, and gives you a indication of when emails are being read as they are processed in batches. (Close #625)
|
||||
|
||||
### Compatibility / Dependencies
|
||||
|
||||
|
||||
@@ -61,4 +61,4 @@ for RHEL or Debian.
|
||||
| 3.11 | ✅ | Actively maintained; supported until June 2028 (Debian 12) |
|
||||
| 3.12 | ✅ | Actively maintained; supported until May 2035 (RHEL 10) |
|
||||
| 3.13 | ✅ | Actively maintained; supported until June 2030 (Debian 13) |
|
||||
| 3.14 | ❌ | Not currently supported due to Not currently supported due to [this imapclient bug](https://github.com/mjs/imapclient/issues/618)|
|
||||
| 3.14 | ❌ | Not currently supported due to [this imapclient bug](https://github.com/mjs/imapclient/issues/618)|
|
||||
|
||||
@@ -595,9 +595,18 @@ def parsed_smtp_tls_reports_to_csv_rows(
|
||||
if "mx_host_patterns" in policy:
|
||||
record["mx_host_patterns"] = "|".join(policy["mx_host_patterns"])
|
||||
successful_record = record.copy()
|
||||
successful_record["policy_domain"] = policy[
|
||||
"policy_domain"
|
||||
]
|
||||
successful_record["policy_type"] = policy[
|
||||
"policy_type"
|
||||
]
|
||||
successful_record["successful_session_count"] = policy[
|
||||
"successful_session_count"
|
||||
]
|
||||
successful_record["failed_session_count"] = policy[
|
||||
"failed_session_count"
|
||||
]
|
||||
rows.append(successful_record)
|
||||
if "failure_details" in policy:
|
||||
for failure_details in policy["failure_details"]:
|
||||
@@ -1939,8 +1948,8 @@ def get_dmarc_reports_from_mailbox(
|
||||
"Only days and weeks values in 'since' option are \
|
||||
considered for IMAP connections. Examples: 2d or 1w"
|
||||
)
|
||||
since = (datetime.now(timezone.utc) - timedelta(minutes=_since)).date()
|
||||
current_time = datetime.now(timezone.utc).date()
|
||||
since = (datetime.now(timezone.utc) - timedelta(minutes=_since)).strftime("%d-%b-%Y")
|
||||
current_time = datetime.now(timezone.utc).strftime("%d-%b-%Y")
|
||||
elif isinstance(connection, MSGraphConnection):
|
||||
since = (
|
||||
datetime.now(timezone.utc) - timedelta(minutes=_since)
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import logging
|
||||
import logging.handlers
|
||||
import threading
|
||||
@@ -62,9 +61,11 @@ class GelfClient(object):
|
||||
def save_forensic_report_to_gelf(self, forensic_reports: list[dict[str, Any]]):
|
||||
rows = parsed_forensic_reports_to_csv_rows(forensic_reports)
|
||||
for row in rows:
|
||||
self.logger.info(json.dumps(row))
|
||||
log_context_data.parsedmarc = row
|
||||
self.logger.info("parsedmarc forensic report")
|
||||
|
||||
def save_smtp_tls_report_to_gelf(self, smtp_tls_reports: dict[str, Any]):
|
||||
rows = parsed_smtp_tls_reports_to_csv_rows(smtp_tls_reports)
|
||||
for row in rows:
|
||||
self.logger.info(json.dumps(row))
|
||||
log_context_data.parsedmarc = row
|
||||
self.logger.info("parsedmarc smtptls report")
|
||||
|
||||
Reference in New Issue
Block a user