Re: [imapext] CONDSTORE interaction with SORT/THREAD

Alexey Melnikov <alexey.melnikov@isode.com> Wed, 21 August 2013 14:04 UTC

Return-Path: <alexey.melnikov@isode.com>
X-Original-To: imapext@ietfa.amsl.com
Delivered-To: imapext@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id CF55C11E80FB for <imapext@ietfa.amsl.com>; Wed, 21 Aug 2013 07:04:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -102.524
X-Spam-Level:
X-Spam-Status: No, score=-102.524 tagged_above=-999 required=5 tests=[AWL=0.075, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JD9F2z7u-TGX for <imapext@ietfa.amsl.com>; Wed, 21 Aug 2013 07:04:02 -0700 (PDT)
Received: from statler.isode.com (statler.isode.com [62.3.217.254]) by ietfa.amsl.com (Postfix) with ESMTP id DE42411E839D for <imapext@ietf.org>; Wed, 21 Aug 2013 07:04:01 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1377093840; d=isode.com; s=selector; i=@isode.com; bh=Homp+umgTmA5ALeL1Ew03xUppp1+uvA/kO0xNjqFtIw=; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version: In-Reply-To:References:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description; b=CgD8QlLmXQxJJhO7kD+29yuB2n3Dz0nLDKhgFRJ8rQP6nSzYHd6OlpfiEnpJ98PIUcCXQz YyPr+925keH/UY8W3auPXmdQIBvn1wlF+/16Si9RMXm3aNj9e/DpmmxGvEaGVgFNXHTstX 4yEIa1aLBJq4ccD64QKgr6q1YAkJIVQ=;
Received: from [172.16.1.29] (shiny.isode.com [62.3.217.250]) by statler.isode.com (submission channel) via TCP with ESMTPA id <UhTI0AB9niFn@statler.isode.com>; Wed, 21 Aug 2013 15:04:00 +0100
Message-ID: <5214C8ED.4070602@isode.com>
Date: Wed, 21 Aug 2013 15:04:29 +0100
From: Alexey Melnikov <alexey.melnikov@isode.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:17.0) Gecko/20130801 Thunderbird/17.0.8
To: Timo Sirainen <tss@iki.fi>
References: <5208CD61.3070100@isode.com> <A5B18FEC-1792-4470-B5C0-A320AB6E95A2@iki.fi> <520A658D.10409@isode.com> <E1BF0E00-042D-410F-975D-90CEA4A64447@iki.fi>
In-Reply-To: <E1BF0E00-042D-410F-975D-90CEA4A64447@iki.fi>
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: "imapext@ietf.org" <imapext@ietf.org>
Subject: Re: [imapext] CONDSTORE interaction with SORT/THREAD
X-BeenThere: imapext@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Discussion of IMAP extensions <imapext.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/imapext>, <mailto:imapext-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/imapext>
List-Post: <mailto:imapext@ietf.org>
List-Help: <mailto:imapext-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/imapext>, <mailto:imapext-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 21 Aug 2013 14:04:07 -0000

On 13/08/2013 20:14, Timo Sirainen wrote:
> On 13.8.2013, at 19.57, Alexey Melnikov<alexey.melnikov@isode.com>  wrote:
>>>> 1). Use ESEARCH response (RFC 4731) to return MODSEQ for all matching messages and also extend it to return sorted results. (This can be potentially be used for SEARCH with MODSEQ search criterion as well). For example:
>>>>
>>>> * ESEARCH (TAG "A001") SORTED 3,4,1,2 MODSEQ 175
>>> One possibility would be to return #1, but only if some other new parameter is used. That parameter could then also be used without MODSEQ. It also wouldn't break with the existing Dovecot installations.
>> Right. For example RESMODSEQ (it has the same semantics as MODSEQ SEARCH/SORT item, but causes ESEARCH response to be returned).
> I was thinking ESORT compatibility, but then of course ESORT would have to be implemented also by the server. But if we're talking about using ESEARCH anyway, it should be a minor job for servers to add support for ESORT. This actually already works:
>
> a SORT RETURN (ALL) (DATE) UTF-8 MODSEQ 1234
> * ESEARCH (TAG "a") ALL 5,3,2,1 MODSEQ 1236
Ok. I've added this example to the draft.

>>>> Similarly, for THREAD:
>>>>
>>>> 1). Use ESEARCH response (RFC 4731) to return MODSEQ for all matching messages and also extend it to return threaded results. For example:
>>>>
>>>> * ESEARCH (TAG "A002") THREAD ((2)(3 6 (4 23)(44 7 96))) MODSEQ 909240921
>>>>
>>>> Here again, I prefer choices #1/#3.
>>> With THREAD Dovecot doesn't return MODSEQ in any way.
>> Ok. Which option you prefer for THREAD+CONDSTORE?
> Something similar to the ESORT example I think (so #1 reply with some parameter to switch on ESEARCH reply mode).
For now I added sentence that THREAD+CONDSTORE don't return MODSEQ for 
matching messages, as at least 2 server implementations didn't implement 
this (yours and mine). If people object, I can change that.