mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-28 12:31:15 +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)",
|
"(no 'spf=pass' in Authentication-Results header)",
|
||||||
sender,
|
sender,
|
||||||
)
|
)
|
||||||
if uid:
|
self._remember_processed_uid(uid, dedupe, cycle_uids)
|
||||||
cycle_uids.add(uid)
|
|
||||||
if dedupe:
|
|
||||||
self._processed_uids.add(uid)
|
|
||||||
continue
|
continue
|
||||||
if self.config.verify_dkim and not dkim_pass:
|
if self.config.verify_dkim and not dkim_pass:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
@ -406,10 +403,7 @@ class EmailChannel(BaseChannel):
|
|||||||
"(no 'dkim=pass' in Authentication-Results header)",
|
"(no 'dkim=pass' in Authentication-Results header)",
|
||||||
sender,
|
sender,
|
||||||
)
|
)
|
||||||
if uid:
|
self._remember_processed_uid(uid, dedupe, cycle_uids)
|
||||||
cycle_uids.add(uid)
|
|
||||||
if dedupe:
|
|
||||||
self._processed_uids.add(uid)
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
subject = self._decode_header_value(parsed.get("Subject", ""))
|
subject = self._decode_header_value(parsed.get("Subject", ""))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user