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:
@@ -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", ""))
|
||||
|
||||
Reference in New Issue
Block a user