Issue Description
Most of our (www.egroupware.org) code still uses IMAP, but I already use JMAP for push-notifications with Stalwart.
The code was developed with Stalwart v0.12 and I’m currently testing, why some of it is not working with v0.16.
One issue is, when I receive a change via push, I request the Message-ID header (JMAP messageId) and then use that to search for the IMAP uid.
For some reason this search always returns empty in Stalwart v0.16. Here’s the logged IMAP trafik:
C: 4 UID SEARCH RETURN (ALL COUNT) HEADER MESSAGE-ID [email protected]
S: * ESEARCH (TAG "4") UID COUNT 0
S: 4 OK UID SEARCH completed
I also tried search for the Message-ID wrapped with with angle brackets, as it’s used in the header, but not change.
Searching for other headers like Subject works.
Expected Behavior
Stalwart should return the UID of the message.
Actual Behavior
It does not find / return anything.
Reproduction Steps
- Pick a mail in your INBOX, and get it’s Message-ID
- run the IMAP commands in the log with your Message-ID
Relevant Log Output
>> Thu, 11 Jun 2026 09:56:47 +0000
>> Connection to: imap://mail:993/
>> Server connection took 0.0044 seconds.
S: * OK [CAPABILITY IMAP4rev2 IMAP4rev1 ENABLE SASL-IR LITERAL+ ID UTF8=ACCEPT JMAPACCESS AUTH=PLAIN AUTH=OAUTHBEARER AUTH=XOAUTH2] Stalwart IMAP4rev2 at your service.
C: 1 AUTHENTICATE PLAIN [INITIAL CLIENT RESPONSE (username: [email protected])]
S: 1 OK [CAPABILITY IMAP4rev2 IMAP4rev1 ENABLE SASL-IR LITERAL+ ID UTF8=ACCEPT JMAPACCESS IDLE NAMESPACE CHILDREN MULTIAPPEND BINARY UNSELECT ACL UIDPLUS ESEARCH WITHIN SEARCHRES SORT THREAD=REFERENCES LIST-EXTENDED LIST-STATUS ESORT SORT=DISPLAY SPECIAL-USE CREATE-SPECIAL-USE MOVE CONDSTORE QRESYNC UNAUTHENTICATE STATUS=SIZE OBJECTID PREVIEW RIGHTS=texk QUOTA QUOTA=RES-STORAGE] Authentication successful
>> Command 1 took 0.1883 seconds.
>> CACHE: Using the Horde_Imap_Client_Cache_Backend_Cache storage driver.
C: 2 ENABLE QRESYNC UTF8=ACCEPT
C: 3 EXAMINE INBOX (QRESYNC (2394666016 177 1:9))
S: * ENABLED QRESYNC UTF8=ACCEPT
S: 2 OK ENABLE successful.
>> Command 2 took 0.0011 seconds.
S: * 9 EXISTS
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
S: * 0 RECENT
S: * OK [PERMANENTFLAGS (\Deleted \Seen \Answered \Flagged \Draft \*)] All allowed
S: * OK [UIDVALIDITY 2394666016] UIDs valid
S: * OK [UIDNEXT 10] Next predicted UID
S: * OK [HIGHESTMODSEQ 177] Highest Modseq
S: * OK [MAILBOXID (eaaaaaa)] Unique Mailbox ID
S: 3 OK [READ-ONLY] EXAMINE completed
>> Command 3 took 0.0031 seconds.
>> SEARCH: Expired from cache [INBOX]
C: 4 UID SEARCH RETURN (ALL COUNT) HEADER MESSAGE-ID [email protected]
S: * ESEARCH (TAG "4") UID COUNT 0
S: 4 OK UID SEARCH completed
>> Command 4 took 0.0019 seconds.
Stalwart Version
v0.16.x
Installation Method
Docker
Database Backend
RocksDB
Blob Storage
Filesystem
Search Engine
Internal
Directory Backend
SQL
I have reviewed the documentation and FAQ and confirm that my issue is NOT addressed there.
on
I have searched this support forum (open and closed topics) and confirm this is not a duplicate.
on
I understand that topics in this category are triaged by a bot first but a human reply will follow up. If I’d prefer a human-only reply, I’ll add the no-ai tag to my topic.
on