matcha
matcha copied to clipboard
BUG: FetchFolders uses the LIST-STATUS extension without checking for support
Describe the bug
Whenever I open my inbox, I see this message:
Folder fetch failed for 1 account(s): ****@*****.***: imap: BAD LIST failed. Illegal arguments.
When I enabled IMAP logging, I see this in the logs:
* OK PM IMAP ready
* OK PM IMAP ready
T1 LOGIN "USER" "PASSWORD"
T1 LOGIN "USER" "PASSWORD"
T2 CAPABILITY
T2 CAPABILITY
T1 OK LOGIN completed.
* CAPABILITY IMAP4rev1 LITERAL+ CHILDREN I18NLEVEL=1 NAMESPACE IDLE ENABLE CONDSTORE QRESYNC ANNOTATION AUTH=PLAIN SASL-IR RIGHTS= WITHIN ESEARCH ESORT SEARCHRES SORT MOVE UIDPLUS UNSELECT COMPRESS=DEFLATE
T2 OK CAPABILITY completed.
T3 SELECT INBOX
T4 CAPABILITY
T1 OK LOGIN completed.
* CAPABILITY IMAP4rev1 LITERAL+ CHILDREN I18NLEVEL=1 NAMESPACE IDLE ENABLE CONDSTORE QRESYNC ANNOTATION AUTH=PLAIN SASL-IR RIGHTS= WITHIN ESEARCH ESORT SEARCHRES SORT MOVE UIDPLUS UNSELECT COMPRESS=DEFLATE
T2 OK CAPABILITY completed.
T3 LIST "" "*" RETURN (STATUS (UNSEEN))
T4 CAPABILITY
* 16 EXISTS
* 0 RECENT
* OK [UIDNEXT 25] Predicted next UID
* OK [HIGHESTMODSEQ 87] Highest
* OK [UIDVALIDITY 93075833] UIDs valid
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
T3 BAD LIST failed. Illegal arguments.
ETURN BAD failed. Unknown command.
From what I can tell, this is because the LIST command tries to use the LIST-STATUS extension without checking that the server supports it, leading to that error message.
To reproduce
- Configure a server that doesn't support LIST-STATUS.
- Open matcha
- Open inbox
Expected behavior
Inbox loads without issue
Screenshots
No response
Matcha version
0.40.1
Go version
No response
OS
macOS
OS version
macOS 26.5
Architecture
arm64 (aarch64 / Apple Silicon)
Terminal
Ghostty
Additional context
No response
Ah, this is already reported.