mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-09 11:15:55 +00:00
fix: deduplicate SPF/DKIM-rejected emails to stop log spam
This commit is contained in:
parent
375b1f0328
commit
74d314d3ef
@ -395,6 +395,10 @@ class EmailChannel(BaseChannel):
|
||||
"(no 'spf=pass' in Authentication-Results header)",
|
||||
sender,
|
||||
)
|
||||
if uid:
|
||||
cycle_uids.add(uid)
|
||||
if dedupe:
|
||||
self._processed_uids.add(uid)
|
||||
continue
|
||||
if self.config.verify_dkim and not dkim_pass:
|
||||
logger.warning(
|
||||
@ -402,6 +406,10 @@ class EmailChannel(BaseChannel):
|
||||
"(no 'dkim=pass' in Authentication-Results header)",
|
||||
sender,
|
||||
)
|
||||
if uid:
|
||||
cycle_uids.add(uid)
|
||||
if dedupe:
|
||||
self._processed_uids.add(uid)
|
||||
continue
|
||||
|
||||
subject = self._decode_header_value(parsed.get("Subject", ""))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user