mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-28 04:21:17 +00:00
refactor(email): use _remember_processed_uid in SPF/DKIM reject paths
Replaces inline dedup logic with the existing helper to match the style of _is_self_address and other reject branches, and to keep the _processed_uids eviction logic in one place.
This commit is contained in:
parent
ffac8d3b0a
commit
ecfbb0ed4f
@ -395,10 +395,7 @@ class EmailChannel(BaseChannel):
|
||||
"(no 'spf=pass' in Authentication-Results header)",
|
||||
sender,
|
||||
)
|
||||
if uid:
|
||||
cycle_uids.add(uid)
|
||||
if dedupe:
|
||||
self._processed_uids.add(uid)
|
||||
self._remember_processed_uid(uid, dedupe, cycle_uids)
|
||||
continue
|
||||
if self.config.verify_dkim and not dkim_pass:
|
||||
logger.warning(
|
||||
@ -406,10 +403,7 @@ class EmailChannel(BaseChannel):
|
||||
"(no 'dkim=pass' in Authentication-Results header)",
|
||||
sender,
|
||||
)
|
||||
if uid:
|
||||
cycle_uids.add(uid)
|
||||
if dedupe:
|
||||
self._processed_uids.add(uid)
|
||||
self._remember_processed_uid(uid, dedupe, cycle_uids)
|
||||
continue
|
||||
|
||||
subject = self._decode_header_value(parsed.get("Subject", ""))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user