Problem
Three gaps blocking real IMAP client compatibility (part of #81):
- No STATUS command — every MUA polls STATUS before selecting; without it clients can't detect new mail without re-SELECTing.
- No SUBSCRIBE/UNSUBSCRIBE/LSUB — legacy clients (Thunderbird default, mutt, iOS Mail) rely on LSUB to enumerate mailboxes; LIST alone is insufficient.
- INTERNALDATE returns 1970-01-01 — clients use INTERNALDATE for message sort and display; the epoch placeholder breaks chronological ordering.
Fix
- STATUS handler computes MESSAGES, RECENT, UIDNEXT, UIDVALIDITY, UNSEEN from a snapshot without requiring selection.
- Subscriptions persisted to
accounts/<name>/.subscriptions. INBOX always subscribed.
- MessageRef stores file mtime; FETCH INTERNALDATE returns actual delivery time in RFC 3501 format.
Tests
status_reports_counts_for_inbox — counts correct before/after STORE
status_requires_authentication_and_existing_mailbox — auth + existence guards
subscribe_and_lsub_flow — subscribe/unsubscribe/lsub round-trip
internaldate_is_not_epoch — ensures epoch placeholder is gone
internaldate_format_sanity — verifies date arithmetic
Problem
Three gaps blocking real IMAP client compatibility (part of #81):
Fix
accounts/<name>/.subscriptions. INBOX always subscribed.Tests
status_reports_counts_for_inbox— counts correct before/after STOREstatus_requires_authentication_and_existing_mailbox— auth + existence guardssubscribe_and_lsub_flow— subscribe/unsubscribe/lsub round-tripinternaldate_is_not_epoch— ensures epoch placeholder is goneinternaldate_format_sanity— verifies date arithmetic