imapserver: implement "inprogress" response code (RFC 9585) for keepalive during long search

For long searches in big mailboxes, without any matches, we would previously
keep working and not say anything. Clients could interpret this silence as a
broken connection at some point. We now send a "we're still searching" untagged
OK responses with code INPROGRESS every 10 seconds while we're still searching,
to prevent the client from closing the connection. We also send how many
messages we've processed, and usually also how many we need to process in grand
total. Clients can use this to show a progress bar.
This commit is contained in:
Mechiel Lukkien
2025-03-30 10:29:15 +02:00
parent 3e128d744e
commit cc5e3165ea
6 changed files with 112 additions and 4 deletions

View File

@ -237,10 +237,12 @@ https://www.iana.org/assignments/message-headers/message-headers.xhtml
8970 Yes - IMAP4 Extension: Message Preview Generation
9208 Partial - IMAP QUOTA Extension
9394 Roadmap - IMAP PARTIAL Extension for Paged SEARCH and FETCH
9585 ? - IMAP Response Code for Command Progress Notifications
9585 Yes - IMAP Response Code for Command Progress Notifications
9586 Roadmap - IMAP Extension for Using and Returning Unique Identifiers (UIDs) Only
9590 Yes - IMAP Extension for Returning Mailbox METADATA in Extended LIST
9698 ? - The JMAPACCESS Extension for IMAP
9738 No - IMAP MESSAGELIMIT Extension
9755 Roadmap - IMAP Support for UTF-8
5198 -? - Unicode Format for Network Interchange