[jira] [Created] (JAMES-4218) SEARCH issue with Roundcube
"Benoit Tellier (Jira)" <[email protected]>
| Newsgroups | gmane.comp.jakarta.james.devel |
|---|---|
| Message-ID | <[email protected]> |
Benoit Tellier created JAMES-4218:
-------------------------------------
Summary: SEARCH issue with Roundcube
Key: JAMES-4218
URL: https://issues.apache.org/jira/browse/JAMES-4218
Project: James Server
Issue Type: Improvement
Components: IMAPServer
Reporter: Benoit Tellier
Reported by Felix Audriger cf https://www.mail-archive.com/[email protected]/msg17270.html
{code:java}
I am currently testing the performance of IMAP search with the postgres
distribution of James to see whether it is sufficient for our relatively small
use case.
The following are two excerpts of the communication between our webmail client
Roundcube and the James IMAP service:
C: A0005 UID SEARCH RETURN (ALL) HEADER SUBJECT "Something completely unknown"
S: * ESEARCH (TAG "A0005") UID
S: * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded NonJunk)
S: * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded
NonJunk \*)] Limited
S: A0005 OK SEARCH completed.
C: A0005 UID SEARCH RETURN (ALL) HEADER SUBJECT DAB
S: * ESEARCH (TAG "A0005") UID ALL 285
S: * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded NonJunk)
S: * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded
NonJunk \*)] Limited
S: A0005 OK SEARCH completed.
I am a little bit surprised by the reply lines starting with `* FLAGS` and `*
OK`.
According to the ABNF in the IMAP RFC
(https://datatracker.ietf.org/doc/html/rfc3501#section-9), they are valid
versions of `response-data`.
However, I do not see any documentation for it in the SEARCH response
description (https://datatracker.ietf.org/doc/html/rfc3501#section-7.2.5) or
the UID command description
(https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.8).
I also don't see anything in the RFC regarding ESEARCH
(https://datatracker.ietf.org/doc/html/rfc4731).
Roundcube chokes on the line starting with `* FLAGS` if there is no result
(second communication) because it tries to parse the flags as message UIDs and
fails.
Roundcube should probably stop parsing at the end of the line. However, I do
not understand why James returns all the flags and I am unsure whether this is
standard-compliant behavior.
Does somebody know the meaning of those response lines or encountered a similar
problem?
As contrast, here are the same requests against a Dovecot IMAP server:
C: c UID SEARCH RETURN (ALL) HEADER SUBJECT "Something completely unknown"
S: * ESEARCH (TAG "c") UID
S: c OK Search completed (0.026 + 0.000 secs).
C: a UID SEARCH RETURN (ALL) HEADER SUBJECT DAB
S: * ESEARCH (TAG "a") UID ALL 7774
S: a OK Search completed (0.006 + 0.000 secs).
Both of them are parsed correctly by Roundcube.
Best regards,
Felix
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)