Same issue here, now confirmed with event-level logging on v0.16.26 (FoundationDB, 2 nodes, Docker/K8s). We upgraded from 0.16.20 because thread 1462 reported 0.16.21 as fixed — it isn’t for us.
Microsoft’s hosted sync for the new Outlook (52.98.221.205 / 52.98.222.229, EHLO *.prod.exchangelabs.com) does, in 3 of 3 sessions:
IMAP ENABLE command (imap.enable) ... details = ["CondStore", "UidOnly"]
IMAP error occurred (imap.error) ... details = "Message numbers are not allowed once UIDONLY is enabled.", code = "UIDREQUIRED", type = "BAD", id = "WIR00007"
After that it disconnects and retries roughly every 30 minutes; the Inbox never syncs, and mail composed in Outlook is never submitted (SMTP 587 STARTTLS + AUTH succeed at account setup, but no submission follows).
UIDONLY is advertised unconditionally to authenticated sessions (imap-proto/src/protocol/capability.rs) and ENABLE UIDONLY is accepted (imap/src/op/enable.rs), unchanged up to 0.16.26. Strict enforcement is RFC-correct, but in practice it makes the new Outlook unusable with Stalwart. Could you add an option to not advertise/accept UIDONLY (globally or per listener), or degrade gracefully instead of returning BAD? Happy to test a build.