Compare commits

...

9 Commits

Author SHA1 Message Date
Sean Whalen
f2133aacd4 Fix build dependencies 2024-12-25 18:52:42 -05:00
Sean Whalen
31917e58a9 Update build backend 2024-12-25 18:28:30 -05:00
Sean Whalen
bffb98d217 Get report ID correctly 2024-12-25 16:37:40 -05:00
Sean Whalen
1f93b3a7ea Set max_len to a value 2024-12-25 16:26:38 -05:00
Sean Whalen
88debb9729 Fix SEEN_AGGREGATE_REPORT_IDS 2024-12-25 16:21:07 -05:00
Sean Whalen
a8a5564780 Merge branch 'master' of https://github.com/domainaware/parsedmarc 2024-12-25 16:14:40 -05:00
Sean Whalen
1e26f95b7b 8.16.1
- Ignore aggregate DMARC reports seen within a period of one hour (#535)
2024-12-25 16:14:33 -05:00
ericericsw
82b48e4d01 Add files via upload (#578)
update new version dashbroad

panel model change list:
grafana-piechart-panel -> pie chart
Graph(old) -> time series
worldmap panel -> geomap

some table panel has change , be like overview add ARC Column

The problem cannot be solved at the moment: Multiple DKIM information will cause table display errors
2024-12-25 16:09:43 -05:00
Sean Whalen
617b7c5b4a Merge PR #527 2024-11-09 18:18:31 -05:00
6 changed files with 5924 additions and 4 deletions

1
.gitignore vendored
View File

@@ -136,3 +136,4 @@ samples/private
*.html
*.sqlite-journal
scratch.py

View File

@@ -1,6 +1,16 @@
Changelog
=========
8.16.1
------
- Ignore aggregate DMARC reports seen within a period of one hour (#535)
8.16.0
------
- Add a `since` option to only search for emails since a certain time (PR #527)
8.15.4
------

File diff suppressed because it is too large Load Diff

View File

@@ -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.15.4"
__version__ = "8.16.1"
logger.debug("parsedmarc v{0}".format(__version__))

View File

@@ -15,6 +15,7 @@ from ssl import CERT_NONE, create_default_context
from multiprocessing import Pipe, Process
import sys
from tqdm import tqdm
from expiringdict import ExpiringDict
from parsedmarc import (
get_dmarc_reports_from_mailbox,
@@ -55,6 +56,8 @@ handler = logging.StreamHandler()
handler.setFormatter(formatter)
logger.addHandler(handler)
SEEN_AGGREGATE_REPORT_IDS = ExpiringDict(max_len=100000000, max_age_seconds=3600)
def _str_to_list(s):
"""Converts a comma separated string to a list"""
@@ -1418,7 +1421,12 @@ def _main():
logger.error("Failed to parse {0} - {1}".format(result[1], result[0]))
else:
if result[0]["report_type"] == "aggregate":
aggregate_reports.append(result[0]["report"])
report_id = result[0]["report"]["report_metadata"]["report_id"]
if report_id not in SEEN_AGGREGATE_REPORT_IDS:
SEEN_AGGREGATE_REPORT_IDS[report_id] = report_id
aggregate_reports.append(result[0]["report"])
else:
logger.debug(f"Skipping duplicate report ID: {report_id}")
elif result[0]["report_type"] == "forensic":
forensic_reports.append(result[0]["report"])
elif result[0]["report_type"] == "smtp_tls":

View File

@@ -1,6 +1,6 @@
[build-system]
requires = [
"hatchling>=1.8.1",
"hatchling>=1.27.0",
]
build-backend = "hatchling.build"
@@ -59,7 +59,7 @@ dependencies = [
[project.optional-dependencies]
build = [
"hatch",
"hatch>=1.14.0",
"myst-parser[linkify]",
"nose",
"pytest",