You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Wojtek Strzalka (JIRA)" <se...@james.apache.org> on 2011/08/18 20:10:28 UTC
[jira] [Reopened] (IMAP-292) SEARCH is not handled
correctly
[ https://issues.apache.org/jira/browse/IMAP-292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wojtek Strzalka reopened IMAP-292:
----------------------------------
Assignee: (was: Norman Maurer)
There are still cases where it doesn't work. Below sample iPhone <-> IMAP session:
-------------------------------------------------------------------
* OK JAMES IMAP4rev1 Server Server D620 is ready.
1 LOGIN <LOGIN> <PWD>
1 OK LOGIN completed.
2 CAPABILITY
* CAPABILITY IMAP4rev1 LITERAL+ CHILDREN I18NLEVEL=1 WITHIN ESEARCH SEARCHRES XLIST IDLE NAMESPACE UIDPLUS UNSELECT AUTH=PLAIN SASL-IR ENABLE
2 OK CAPABILITY completed.
3 SELECT "Deleted Items"
* FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 127] UIDs valid
* OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen)] Limited
* OK [UIDNEXT 2696] Predicted next UID
3 OK [READ-WRITE] SELECT completed.
4 UID SEARCH RETURN (COUNT) 1:* DELETED
4 BAD SEARCH failed. Invalid messageset.
5 NOOP
5 OK NOOP completed.
6 UID SEARCH RETURN (ALL) 1:* NOT DELETED
6 BAD SEARCH failed. Invalid messageset.
7 UID SEARCH RETURN (COUNT) 1:* DELETED
7 BAD SEARCH failed. Invalid messageset.
8 LIST "" ""
* LIST (\Noselect) "/" ""
8 OK LIST completed.
9 STATUS "Deleted Items" (UNSEEN)
* STATUS "Deleted Items" (UNSEEN 0)
9 OK STATUS completed.
10 NOOP
10 OK NOOP completed.
11 UID SEARCH RETURN (ALL) 2147483598:* NOT DELETED
11 BAD SEARCH failed. Invalid messageset.
12 STATUS "Deleted Items" (UNSEEN)
* STATUS "Deleted Items" (UNSEEN 0)
12 OK STATUS completed.
13 NOOP
13 OK NOOP completed.
14 UID SEARCH RETURN (ALL) 2147483598:* NOT DELETED
14 BAD SEARCH failed. Invalid messageset.
15 STATUS "Deleted Items" (UNSEEN)
* STATUS "Deleted Items" (UNSEEN 0)
15 OK STATUS completed.
--------------------------------------------------------------------------------
where we can see a lot of BAD answers.
The idea is to use the approach like it was implemented before (see the commit log for the issue) but instead of using:
------------
final int lowMsn = (int) lowVal;
lowUid = selected.uid(lowMsn);
if (lowUid == SelectedMailbox.NO_SUCH_MESSAGE) lowUid = selected.getFirstUid();
-------------
do smth like:
------------
final int lowMsn = (int) lowVal;
lowUid = selected.uid(lowMsn);
if (lowUid == SelectedMailbox.NO_SUCH_MESSAGE) lowUid = selected.getFirstUidAfter(lowMsn);
-------------
That would need to support both uid & msn requests this way.
WDYT?
> SEARCH <sequence-set> is not handled correctly
> ----------------------------------------------
>
> Key: IMAP-292
> URL: https://issues.apache.org/jira/browse/IMAP-292
> Project: JAMES Imap
> Issue Type: Bug
> Components: Protocol
> Affects Versions: 0.2-M1
> Reporter: Norman Maurer
> Fix For: 0.2
>
>
> SEARCH <sequence-set>... is not handled correctly in many cases
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org