Re: [Extra] Snippet Draft Submitted (was Re: RFC4466 and fetch responses)

Bron Gondwana <brong@fastmailteam.com> Tue, 17 April 2018 01:15 UTC

Return-Path: <brong@fastmailteam.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 3BAEE12D86B for <extra@ietfa.amsl.com>; Mon, 16 Apr 2018 18:15:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=fastmailteam.com header.b=IKq5VEbk; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=R83Sioz+
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 zdw_MP56pyOE for <extra@ietfa.amsl.com>; Mon, 16 Apr 2018 18:15:28 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id F2BCF12D7F2 for <extra@ietf.org>; Mon, 16 Apr 2018 18:15:27 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 5AEF321BF9; Mon, 16 Apr 2018 21:15:27 -0400 (EDT)
Received: from web5 ([10.202.2.215]) by compute6.internal (MEProxy); Mon, 16 Apr 2018 21:15:27 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6Dri0S NPE2XzQTRqfTWuHyPXSsXxKDPcz+Qa704yOCQ=; b=IKq5VEbkZsCnEnL29w2hk+ flzufVB/+WP2D99EL2gwrqJsYtKHJrkKky28nwqZ0asIYfO8JXdUrZkVEVcpUMV0 eN2UjpOCgT6UUsDtMbYWcw9Q/ceFIor/nd7GKZre2jIqsVJAtml+V1AYi0E+MqJQ t52knJOifSUCZlhAhLK2dvea2bwtxgWEi43MNMrN8e3guGTVczpEy/+sdBQ09/OK omaEnpbr/IEI4wGScM931VkVNSuNzLMJGnzTwTu1kuFLPW7ipKR4gkSZGIa7P+Ox Qcr43zmGSPi69meNxxurXxYddnf3RA3PVxiMnnbNIPkBwW9W/WDnbuqviaiaFUMQ ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=6Dri0S NPE2XzQTRqfTWuHyPXSsXxKDPcz+Qa704yOCQ=; b=R83Sioz+ykfuOKVy9iTVAz WFBpsGAzviIAeszLP3AHTOabR9BFbhBRAf2Gsp5/2RUOePVy19I0M4hdn3OXCr4C IGe/bmfVmSOmggHAimu9XVZaD4wYOoJLKdjjQtJvTd4A71ZL2d45Hne0+9OM7T2u /j+hvgjR8yFRn8WMOqOgw7vfq8/aEVMnGvewiXvia5zNEdoL1j/yWVJE0Jt8uz0+ NBI2Cg7tq1pZgfcWtvM8te+uDMA2p2x7FLM8Rzphu9R0/vAkczIqTba116/3Jpce rN9xtOWgRMy5t+kGGiK1WnSJ4uRwccQbNQtNz5ItUU1s6Ftt1taGiKBUXDENrCUA ==
X-ME-Sender: <xms:rkrVWuaE_HJSC15oijyUSBtanClSVwuhP4BN-jlzSx9OGtIH2JAmfQ>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id BF82E9E082; Mon, 16 Apr 2018 21:15:26 -0400 (EDT)
Message-Id: <1523927726.1785696.1340373400.706B566C@webmail.messagingengine.com>
From: Bron Gondwana <brong@fastmailteam.com>
To: Michael Slusarz <michael.slusarz@open-xchange.com>, extra@ietf.org
Cc: Neil Jenkins <neilj@fastmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_152392772617856962"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-f2937c11
In-Reply-To: <898227435.14512.1523907117338@appsuite.open-xchange.com>
Date: Tue, 17 Apr 2018 11:15:26 +1000
References: <1523509726.1282597.1335212568.19A9784F@webmail.messagingengine.com> <1936558829.9593.1523629686308@appsuite.open-xchange.com> <1523670892.1298344.1337561008.1F734022@webmail.messagingengine.com> <898227435.14512.1523907117338@appsuite.open-xchange.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/extra/JRHoqOgrDxdDXJM0aCFxmIp8hlY>
Subject: Re: [Extra] Snippet Draft Submitted (was Re: RFC4466 and fetch responses)
X-BeenThere: extra@ietf.org
X-Mailman-Version: 2.1.22
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: Tue, 17 Apr 2018 01:15:31 -0000

I've had a read through.  It looks like it could be used to implement
what we've called "preview" in JMAP.  The "preview" field in the JMAP
Email object is a close match to SNIPPET=FUZZY.  It's defined like this:
http://jmap.io/spec-mail.html#email/get

*preview*: String (immutable; server-set) Up to 256 characters of plain
text, summarising the message body. This is intended to be shown as a
preview line on a mailbox listing, and may be truncated when shown. The
server may choose which part of the message to include in the preview,
for example skipping quoted sections and salutations and collapsing white-
space can result in a more useful preview.
Is there a reason why you chose 100 and 200 characters specifically for
the lengths?  We should definitely agree on a matching length across the
two protocols.  I think that's the only inconsistency with FUZZY.
============

Meanwhile, JMAP also adds another type of snippet, the "SearchSnippet".
This is based on our experience with the XSNIPPETS command in Cyrus
IMAPd and the FastMail interface built on it, which looks like this: 

The JMAP version is documented here:

http://jmap.io/spec-mail.html#searchsnippet/get

This is really quite useful from a user perspective, having search-
related previews in a search!  The XSNIPPETS command in Cyrus is
basically a SEARCH, except it emits a matching SNIPPET response for each
message rather than just a list of IDs.
Cheers,

Bron.


On Tue, 17 Apr 2018, at 05:31, Michael Slusarz wrote:
> Hi Bron,


> Snippet Draft has been submitted to:


> https://datatracker.ietf.org/doc/draft-slusarz-imap-fetch-snippet/


> michael


> 


>> On April 13, 2018 at 7:54 PM Bron Gondwana
>> <brong@fastmailteam.com> wrote:>> 
>> Great. I've already updated my code and deployed it in our testing
>> infrastructure, so I'll update the spec to match.>> 
>> I'm interested in this snippet draft. We already do snippets in Cyrus
>> with a custom command, so making it match would be great.>> 
>> Cheers, 
>> 
>> Bron.
>> 
>> 
>> On Sat, 14 Apr 2018, at 00:28, Michael Slusarz wrote: 
>>>> On April 11, 2018 at 11:08 PM Bron Gondwana <
>>>> brong@fastmailteam.com> wrote:>>>> 
>>>> 
>>>> One thing I notice is that RFC4466 doesn't provide suggested
>>>> structure for fetch responses, but RFC4551 defined the fetch MODSEQ
>>>> response as:>>>>   
>>>> MODSEQ ( <permsg-modsequence> ) 
>>>>   
>>>> Which seems clearly to be that the intent at the time was that all
>>>> new FETCH responses would be wrapped, since that's nothing more
>>>> exciting than a string of digits, and FETCH responses have
>>>> unwrapped values that can be LITERAL like RFC822 or otherwise
>>>> complexly structured like BODYSTRUCTURE.>>> 
>>> In a (soon-to-be submitted for review) RFC we've been working on, I
>>> too followed the "new" MODSEQ approach of wrapping everything in the
>>> response after the FETCH attribute identifier in parentheses:>>> 
>>> msg-att-dynamic =/ "SNIPPET" SP "(" snippet-alg SP nstring ")" 
>>> 
>>> Granted, the response in question has more than one element so it
>>> logically should be grouped using parentheses, but there's also
>>> nothing inherently wrong with a one-element list either.>>> 
>>> This response decision has been implemented and exists in released
>>> versions of Dovecot, so we will not be changing the implementation.>>> 
>>>> So: 
>>>>   
>>>> C: 26 fetch 1:* (emailid threadid) 
>>>> S: * 1 FETCH (EMAILID M820545e479bbb58345c66b88 THREADID
>>>>    T13f69c0572d2be91)>>>> S: * 2 FETCH (EMAILID M50f1074ce64d74cfb5f194fa THREADID
>>>>    Tc102deaded247fdd)>>>> S: 26 OK Completed (0.000 sec) 
>>>>   
>>>> Should they be wrapped as well? 
>>>>   
>>>> C: 26 fetch 1:* (emailid threadid) 
>>>> S: * 1 FETCH (EMAILID (M820545e479bbb58345c66b88) THREADID
>>>>    (T13f69c0572d2be91))>>>> S: * 2 FETCH (EMAILID (M50f1074ce64d74cfb5f194fa) THREADID
>>>>    (Tc102deaded247fdd))>>>> S: 26 OK Completed (0.000 sec) 
>>>> 
>>>>   
>>>> --- 
>>>>   
>>>> Thoughts? 
>>> 
>>> I agree that the latter example is more correct - or at least
>>> consistent with the way that we added a new FETCH attribute.>>> 
>>> michael 
> 



--
  Bron Gondwana, CEO, FastMail Pty Ltd
  brong@fastmailteam.com