IMAP subscriptions, correct sequence numbering, and a working cluster status.
feat(imap): implement folder subscriptions
Subscribe and Unsubscribe were no-ops and List read only ReturnStatus, so
LSUB returned every mailbox rather than the subscribed subset, \Subscribed
was never emitted, and unsubscribing a folder did not stick.
State lives on MailboxMeta as "unsubscribed", inverted deliberately. Every
mailbox already on disk has no such field and decodes as the zero value; with
"subscribed" that value is false, which would unsubscribe every folder for
every user on upgrade. Inverted, it means still-subscribed, so this release
changes nothing for existing mailboxes until someone explicitly
unsubscribes.
SUBSCRIBE applies through a synthetic Raft command rather than writing back a
whole MailboxMeta, which would race a delivery and reset uid_next, handing the
next message a duplicate UID.
fix(imap): number EXPUNGE and SEARCH from the client's view
Sequence numbers were computed from the server's message list. They are only
meaningful relative to what the client has been told, and the two diverge as
soon as another connection removes a message between the client's last update
and the command -- at which point EXPUNGE tells the client to drop the wrong
message.
fix(cmd): authenticate bongo-go cluster status
It called http.Get unsigned against an endpoint behind RequireInternalAuth, so
it returned 401 on every node with web.session_secret set. It worked only on a
dev node with no secret, which is where nobody needs it.