Re: [Extra] SEARCHRES / IMAP4rev2 clarifications

Alexey Melnikov <alexey.melnikov@isode.com> Fri, 13 March 2020 15:39 UTC

Return-Path: <alexey.melnikov@isode.com>
X-Original-To: extra@ietfa.amsl.com
Delivered-To: extra@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 39AD93A0A5F for <extra@ietfa.amsl.com>; Fri, 13 Mar 2020 08:39:14 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.098
X-Spam-Level:
X-Spam-Status: No, score=-2.098 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=isode.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id LI5-hM3un8VF for <extra@ietfa.amsl.com>; Fri, 13 Mar 2020 08:39:12 -0700 (PDT)
Received: from waldorf.isode.com (waldorf.isode.com [62.232.206.188]) by ietfa.amsl.com (Postfix) with ESMTP id C290C3A0A05 for <extra@ietf.org>; Fri, 13 Mar 2020 08:39:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1584113951; d=isode.com; s=june2016; i=@isode.com; bh=DZdZMD/5adqqTT4BH6ydv2KO8FAHDNcmztlK50osoUs=; 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=be0233lqAZXFJyXAp9r8ZX6+0xxSwiV/bimK0xriPFEuLYoiwNN0xKKyGImBg//Ea/5d+s 2OJ+mMcs8zyTPNnDVSzDYWhbDUV1vfAqMQ8lac5P3LWYMPjCjsbF+oQ2Gf9cjChx9+js6Q djLQH5b9jnMO0+BkD+WtO0fT5hrTjek=;
Received: from [172.20.1.215] (dhcp-215.isode.net [172.20.1.215]) by waldorf.isode.com (submission channel) via TCP with ESMTPSA id <XmupHwBtNWBU@waldorf.isode.com>; Fri, 13 Mar 2020 15:39:11 +0000
To: Timo Sirainen <timo@sirainen.com>
Cc: extra@ietf.org
References: <741FE532-1213-49E9-901F-46EECB7A223C@sirainen.com> <6805c44c-83ce-49f7-2f24-e5b9a97479b4@isode.com> <4F653ABF-8CBB-421B-AE09-DC2904C5DD56@sirainen.com>
From: Alexey Melnikov <alexey.melnikov@isode.com>
Message-ID: <ceba1199-c4a1-c69a-396f-7ceaa4a501f5@isode.com>
Date: Fri, 13 Mar 2020 15:38:42 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1
In-Reply-To: <4F653ABF-8CBB-421B-AE09-DC2904C5DD56@sirainen.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------91457AF121647BD669D43239"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/extra/BcRhsYwb61JHuEtRlcde9HQA5JE>
Subject: Re: [Extra] SEARCHRES / IMAP4rev2 clarifications
X-BeenThere: extra@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Email mailstore and eXtensions To Revise or Amend <extra.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/extra>, <mailto:extra-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/extra/>
List-Post: <mailto:extra@ietf.org>
List-Help: <mailto:extra-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/extra>, <mailto:extra-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Mar 2020 15:39:14 -0000

Hi Timo,

On 13/03/2020 14:09, Timo Sirainen wrote:
> On 13. Mar 2020, at 15.43, Alexey Melnikov <alexey.melnikov@isode.com 
> <mailto:alexey.melnikov@isode.com>> wrote:
>>
>>> 3) Interaction of CONTEXT and SEARCHRES:
>>>
>>> SEARCH RETURN (SAVE MIN PARTIAL 2:10) 1:100
>>>
>>> Is the $ value going to be 1 (MIN), 2:10 (PARTIAL), 1:10 
>>> (MIN+PARTIAL) or 1:100 (ALL)? I'm thinking 1:100 is the right answer 
>>> here.
>>
>> I think you found a real issue here. You are right that none of RFCs 
>> say anything about this case.
>>
>> I think my implementation is doing 2:10 (PARTIAL), but I need to 
>> double check. The intent of is for SAVE to use what is returned or 
>> what would have been returned. One can argue that "1:10 
>> (MIN+PARTIAL)" is also a valid choice here.
>>
>> I don't think setting $ to 1:100 (ALL) is right here, because this 
>> client only wants to know PARTIAL and MIN data. Data about ALL 
>> messages might not even be available in the server, depending on how 
>> PARTIAL is constructed.
>
> I guess this same question also applies to what happens even if MIN 
> isn't used. My current code is saving 1:100, but that's mainly because 
> of how the implementation happens to work right now (PARTIAL isn't 
> very optimized).
>
> I had also been thinking that maybe a client could work like:
>
> a SEARCH RETURN (SAVE PARTIAL 1:10) TEXT stuff
This means save the current partial segment into $, so I think it should 
be 1:10
> ..
> b SEARCH RETURN (PARTIAL 11:20) $
> ..
> c SEARCH RETURN (PARTIAL 21:30) $
>
> But I suppose that's not really something clients would do.
Probably not. And if they do, they better know what it means!
> Then again, if you do:
>
> a SEARCH RETURN (SAVE COUNT PARTIAL 1:10) 1:100
>
> COUNT would override PARTIAL here in any case, so $ would have to be 
> 1:100.
Yes. If this is surprising, then I think it should be clarified 
somewhere. If a client wants to retrieve COUNT, but save PARTIAL, it 
would have to do 2 commands.
> I wonder if we should just disallow SAVE+PARTIAL combination?

I would rather not. I think combination of SAVE and PARTIAL has a well 
specified semantics.

Best Regards,

Alexey