fix: add _processing_uids to prevent re-fetching emails being processed

This commit is contained in:
2026-07-13 07:12:43 +08:00
parent ae140df3fb
commit 02cf4b88b6
2 changed files with 6 additions and 4 deletions

View File

@@ -163,9 +163,6 @@ def fetch_unseen_emails(account: EmailAccount) -> list[Email]:
emails.append(Email(uid=uid, subject=subject, sender=sender, recipient=recipient,
body=body, date=date_str, reply_to=reply_to, account_email=account.username,
folder=folder))
# FETCH 可能被服务器自动标已读,立即标回未读
conn.uid("STORE", uid, "-FLAGS", "\\Seen")
except Exception as e:
logger.error(" UID %s FETCH 失败,跳过: %s", uid, e)
continue