v0.20.2
Highlights
Email channel reliability overhaul — Fixed a family of bugs across IMAP and SMTP that could cause message corruption, silent reconnection failures, and broken email threads.
- IMAP sequence number invalidation — All IMAP operations now use UID commands instead of sequence numbers. When multiple emails queued during a poll cycle, deleting a message shifted subsequent sequence numbers, causing wrong messages to be deleted, duplicates to be re-processed, and
BAD Invalid messageseterrors. UIDs are stable across mailbox modifications and mandatory in IMAP4rev1. (#459) - IMAP error handling —
OSError(socket timeout, connection reset) indelete_message/mark_as_readnow correctly triggers reconnection instead of propagating as a raw exception.idle_doneno longer false-matches "OK" as a substring in words like BROKEN or TOKEN.IMAPConnectionErrorfrom per-message operations is now re-raised to trigger reconnection instead of being swallowed by a broad exception handler. (#460) - SMTP fixes — XOAUTH2 auth callback returns empty string on server error challenge per spec instead of re-sending credentials. Attachment MIME types now use correct Content-Type (
image/pnginstead ofapplication/png). Error replies maintain thread continuity with conversation ID tag and References chain. (#461)
Bug Fixes
- Security: cryptography upgrade — Upgraded
cryptography46.0.5 → 46.0.6 to fix GHSA-m959-cc7f-wv43. (#458)