
From nobody Sun Oct  1 16:50:17 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1E58A1342CA for <jmap@ietfa.amsl.com>; Sun,  1 Oct 2017 16:50:16 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level: 
X-Spam-Status: No, score=-2.72 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=k176FC+x; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=IRw3DPdp
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 Uo2NQ5qep55Y for <jmap@ietfa.amsl.com>; Sun,  1 Oct 2017 16:50:13 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9142D1321A0 for <jmap@ietf.org>; Sun,  1 Oct 2017 16:50:13 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id C331920C90 for <jmap@ietf.org>; Sun,  1 Oct 2017 19:50:12 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Sun, 01 Oct 2017 19:50:12 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=content-transfer-encoding:content-type:date :from:message-id:mime-version:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=O/2UM5IaDv02LlvwGG/wO3rhi1jjJCdmJR6Oq9RM7 /E=; b=k176FC+xwoCVbZfJPy5bMnMyVHg/m605A5bKzzXoGgjDCXm/npyZuyxXp jWdCDvA69wSam57wkXOtaaD86MaWfrk9X45P/vqqGsP+rzAaMrsf35i6aSCgSLAo fBB9WNH6RFfzEGNMxUNzNaESApyHmrVDr8JRVws1WIUjYMUH8cqTrkfWaqiIdBRU W04BLzQInv6pHs9PC2uRDPK8Z3whE6suN+F1mt1GjVHBTgfHL/xNHOtS9q42zQWg 2v0PjESXNC0uH4Nsx9tsnpDTGaps0fP9cZA9x9vwIliKEe1Am71C872xAF02Mbiy iZldnkKnOZT3bCWAe2P8AZcRM8ZTw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=O/2UM5IaDv02LlvwGG/wO3rhi1jjJ CdmJR6Oq9RM7/E=; b=IRw3DPdpO6kDS/PQlWyUeQ8Cdk9R+66BLG9LvJZGfPQi1 fbHRwXVXzbeVpQAEx4+ct4hmyUy66t7icKFnKC+tNZjUIuH8JTbMV+Zvz3NvjZEz 2JA5RUz9I1KBBYqBmSSEEMaRgJgf3cJG61vlG5IHD5kO0PKjrZo5GAPy7SzBlbEh YsSYYLd7WhnPDLwoSj+w76EsBonyiLXRYsxrl/Kmu554y4qPlOA/I8YG2/AJ8YpW 4H+eUJPZ9yc91i42T1KZYzULspwJoD74yYSamBJ3ByWuab2DUO+i+eTwp8Bp+2wf 4JLbA14x1H5R3+rvdoewwRwTeUmEHKgqSu+TtxDMQ==
X-ME-Sender: <xms:NH_RWZcOgRQySeI2MFQrTrT2wAu3sT6jU3Bc62uR6RTDHsjKLJYcFQ>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 20DA8E254E; Sun,  1 Oct 2017 19:50:12 -0400 (EDT)
Message-Id: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_15069018126760091"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-5f0bf376
Date: Mon, 02 Oct 2017 10:50:11 +1100
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/ZHTg7RcvqK_2Ze69JYPwUpXnSIY>
Subject: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 01 Oct 2017 23:50:16 -0000

This is a multi-part message in MIME format.

--_----------=_15069018126760091
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

Hi all,
This week I have been doing a lot of copy editing to remove a huge
amount of duplicative text, which made the spec harder to read, and more
likely to contain inconsistencies between methods. My goal is that the
JMAP Mail spec should just be:


 1. The data type definitions
 2. Which standard method types can be used with each data type (e.g.
    the Thread object is not mutable directly by the client so there is
    no setThreads method).
 3. Any changes to the standard method for that particular type (extra
    arguments etc.)This makes the spec *much* shorter, more understandable =
and easier to
implement. Doing this also makes it easier to see where methods for a
particular type deviate from the =E2=80=9Cstandard=E2=80=9D JMAP get/set ca=
lls. As I
looked at this, I realised most of the inconsistencies were in the
=E2=80=9CfetchRecords=E2=80=9D type arguments, used to reduce round trips.I=
f instead we had a generic way to refer to the result of a previous
method call in the arguments of a subsequent request, we can eliminate
the special cases, and provide more power. Much like the unix composable-sm=
all-
things philosophy.Here=E2=80=99s a proposal of how this could work:


Any argument name may be prefixed with a =E2=80=98#=E2=80=99. This means th=
e argument
value is a back-reference to the output of a previous method call rather
than the real value. The value is a *ResultReference* object as
described below. When processing a method call, the server MUST first
check the arguments object for any names beginning with =E2=80=9C#=E2=80=9D=
. If found,
the back reference should be resolved and the value used as the =E2=80=9Cre=
al=E2=80=9D
argument. The method is then processed as normal.A *ResultReference* object=
 has the following properties:


 * *resultOf*: String The client id of the method call to get the
   result from (the string given as the third item in the array for a
   method call).
 * *path*: String A pointer into the arguments. This is an RFC6901 JSON
   Pointer, except it also allows the use of * to map through an array
   (see description below).To resolve:


 1. Find the first response with a client id identical to the *resultOf*
    property of the *ResultReference* in the array of outputs from
    previously processed  method calls in the same request. If none,
    evaluation fails.


 2. If the response name is =E2=80=9Cerror=E2=80=9D, evaluation fails.


 3. Apply the *path* to the arguments object of the response (the second
    item in the response array) following the RFC6901 JSON pointer
    algorithm, except with the following addition in Section 4
    (Evaluation):


If the currently referenced value is a JSON array, the reference token
may be exactly the single character *, making the new referenced value
the result of applying the rest of the JSON pointer tokens to every item
in the array and returning the results in the same order in a new array.
If the result of applying the rest of the pointer tokens to a value was
itself an array, the items should be included individually in the output
array rather than including the array itself (i.e. the result is
flattened).
 4. If the type of the result is X, and the expected type of the
    argument is an array of type X, wrap the result in an array with a
    single item.As a simple example, suppose we have the following API requ=
est:


[[ "getMessageUpdates", { "sinceState": "abcdef" }, "t0" ], [
"getMessages", { "#ids": { "resultOf": "t0", "path": "/changed" }
}, "t1" ]]Now after executing the first method call the response array is:


[[ "messageUpdates", { "accountId": "1", "oldState": "abcdef",
"newState": "123456", "hasMoreUpdates": false, "changed": [ "msg1",
"msg4" ], "removed": [] }, "t0" ]]So to execute the getMessages call, we lo=
ok through the arguments and
find there is one with a # prefix. To resolve this, we apply the
algorithm above:


 1. Find the first response with client id =E2=80=9Ct0=E2=80=9D. The =E2=80=
=9CmessageUpdates=E2=80=9D
    response fulfils this criterion.
 2. Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=99s me=
ssageUpdates=E2=80=9D, so
    this is fine.
 3. Apply the *path* as a JSON pointer to the arguments object. This
    simply selects the =E2=80=9Cchanged=E2=80=9D property, so the result of=
 evaluating
    is: [ "msg1", "msg4" ]The JMAP server now continues to process the getM=
essages call as though
the arguments were:


{ "ids": [ "msg1", "msg4" ] }Now a more complicated example: fetch the =E2=
=80=9Cfrom=E2=80=9D/=E2=80=9Ddate=E2=80=9D/=E2=80=9Dsubject=E2=80=9D
for every message in the first 10 threads in the Inbox (sorted
newest first):


[[ "getMessageList", { "filter": { inMailbox: "id_of_inbox" }, "sort": [
"date desc" ], "collapseThreads": true, "position": 0, "limit": 10 },
"t0" ], [ "getMessages", { "#ids": { "resultOf": "t0", "path": "/ids" },
"properties": [ "threadId" ] }, "t1" ], [ "getThreads", { "#ids": {
"resultOf": "t1", "path": "/list/*/threadId" } }, "t2" ], [
"getMessages", { "#ids": { "resultOf": "t2" "path": "/list/*/messageIds"
},  "properties": [ "from", "date", "subject" ] }, "t3" ]]After executing t=
he first 3 method calls the response array is:


[[ "messageList", { "accountId": "1", "filter": { inMailbox:
"id_of_inbox" }, "sort": [ "date desc" ], "collapseThreads": true,
"state": "abcdefg", "canCalculateUpdates": true, "position": 0, "total":
101, "ids": [ "msg1023", "msg223", "msg110", "msg93", "msg91", "msg38",
"msg36", "msg33", "msg11", "msg1" ] }, "t0" ], [ "messages", {
"accountId": "1", "state": "123456", "list": [{ "id": "msg1023",
"threadId": "trd194", }, { "id": "msg223", "threadId": "trd114" }, ...
etc... ], "notFound": null }, "t1" ], [ "threads", { "accountId": "1",
"state": "123456", "list": [{ "id: "trd194", "messageIds": [ "msg1020",
"msg1021", "msg1023" ] }, { "id: "trd114", "messageIds": [ "msg201",
"msg223" ] }, ... etc... ], "notFound": null }, "t2" ]]So to execute the fi=
nal getMessages call, we look through the arguments
and find there is one with a # prefix. To resolve this, we apply the
algorithm:


 1. Find the first response with client id =E2=80=9Ct2=E2=80=9D. The =E2=80=
=9Cthreads=E2=80=9D response
    fulfils this criterion.
 2. Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=99s th=
reads=E2=80=9D, so
    this is fine.
 3. Apply the *path* as a JSON pointer to the arguments object.
    Token-by-token:
   1. *list* =E2=80=93 get the array of thread objects
   2. *** =E2=80=93 for each of the items in the array:
     1. *messsageIds* =E2=80=93 get the array of message ids
     2. Concatenate these into a single array of all the ids in
        the result.The JMAP server now continues to process the getMessages=
 call as though
the arguments were:


{ "ids": [ "msg1020", "msg1021", "msg1023", "msg201", "msg223", etc...
],    "properties": [ "from", "date", "subject" ] }For reference, in case i=
t=E2=80=99s clearer than my description, here=E2=80=99s a
JavaScript implementation of the pointer resolution algorithm, with the
addition to RFC6901 clearly marked:


function evaluatePointer ( value, pointer ) { if ( !pointer ) { return
value; } if ( pointer.charAt( 0 ) !=3D=3D '/' ) { throw new Error( 'Invalid
pointer' ); } let token; let next =3D pointer.indexOf( '/', 1 ); if ( next
!=3D=3D -1 ) { token =3D pointer.slice( 1, next ); pointer =3D pointer.slic=
e(
next ); } else { token =3D pointer.slice( 1 ); pointer =3D ''; } token =3D
token.replace( /~1/g, '/' ).replace( /~0/g, '~' ); if ( Array.isArray(
value ) ) { if ( /^(?:0|[1-9][0-9]*)$/.test( token ) ) { return
evaluatePointer( value[ parseInt( token, 10 ) ], pointer ); }  /* start:
the only bit that differs from RFC6901 */ if ( token =3D=3D=3D '*' ) { /* M=
ap
values to pointer */ value =3D value.map( item =3D> evaluatePointer( item,
pointer ) ); /* Flatten output */ return value.reduce( ( output, item )
=3D> { if ( !Array.isArray( item ) ) { item =3D [ item ]; } return
output.concat( item ); }, [] ); } /* end */ } else if ( value !=3D=3D null
&& typeof value =3D=3D=3D 'object' ) { return evaluatePointer( value[ token=
 ],
pointer ); } throw new Error( 'Evaluation failed' ); }So:
 * What do people think of the result-reference concept to replace the
   fetchRecords etc. arguments and reduce the amount of special-casing?
 * Presuming agreement this is a good idea, is this syntax good? If not,
   please suggest an alternative! (I've tried to reuse RFC6901 as much
   as possible as the only relevant standard I'm aware of, but if you
   know of another standard that's more suitable please let me know).
The full change proposal can be seen in the pull request at
https://github.com/jmapio/jmap/pull/148.
Cheers,
Neil.

--_----------=_15069018126760091
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Hi all,<br></div>
<p>This week I have been doing a lot of copy editing to remove a huge amoun=
t of duplicative text, which made the spec harder to read, and more likely =
to contain inconsistencies between methods. My goal is that the JMAP Mail s=
pec should just be:<br></p><ol><li>The data type definitions<br></li><li><d=
iv>Which standard method types can be used with each data type (e.g. the Th=
read<br></div>
<div>object is not mutable directly by the client so there is no setThreads=
 method).<br></div>
</li><li><div>Any changes to the standard method for that particular type (=
extra arguments<br></div>
<div>etc.)<br></div>
</li></ol><p>This makes the spec <i>much</i> shorter, more understandable a=
nd easier to implement. Doing this also makes it easier to see where method=
s for a particular type deviate from the =E2=80=9Cstandard=E2=80=9D JMAP ge=
t/set calls. As I looked at this, I realised most of the inconsistencies we=
re in the =E2=80=9CfetchRecords=E2=80=9D type arguments, used to reduce rou=
nd trips.<br></p><p>If instead we had a generic way to refer to the result =
of a previous method call in the arguments of a subsequent request, we can =
eliminate the special cases, and provide more power. Much like the unix com=
posable-small-things philosophy.<br></p><p>Here=E2=80=99s a proposal of how=
 this could work:<br></p><p>Any argument name may be prefixed with a =E2=80=
=98#=E2=80=99. This means the argument value is a back-reference to the out=
put of a previous method call rather than the real value. The value is a <i=
>ResultReference</i> object as described below. When processing a method ca=
ll, the server MUST first check the arguments object for any names beginnin=
g with =E2=80=9C#=E2=80=9D. If found, the back reference should be resolved=
 and the value used as the =E2=80=9Creal=E2=80=9D argument. The method is t=
hen processed as normal.<br></p><p>A <b>ResultReference</b> object has the =
following properties:<br></p><ul><li><div><b>resultOf</b>: <code>String</co=
de><br></div>
<div>The client id of the method call to get the result from (the string gi=
ven as the third item in the array for a method call).<br></div>
</li><li><div><b>path</b>: <code>String</code><br></div>
<div>A pointer into the arguments. This is an RFC6901 JSON Pointer, except =
it also allows the use of <code>*</code> to map through an array (see descr=
iption below).<br></div>
</li></ul><p>To resolve:<br></p><ol><li><p>Find the first response with a c=
lient id identical to the <i>resultOf</i>&nbsp;<span class=3D"font" style=
=3D"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Ro=
boto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&qu=
ot;, &quot;Helvetica Neue&quot;, Arial, sans-serif">property of the </span>=
<i style=3D"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&=
quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droi=
d Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; letter-spacing=
: -0.1px;">ResultReference</i><span class=3D"font" style=3D"font-family:-ap=
ple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubunt=
u, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetic=
a Neue&quot;, Arial, sans-serif"> in the array of outputs from previously p=
rocessed  method calls in the same request. If none, evaluation fails.</spa=
n><br></p></li><li><p>If the response name is =E2=80=9Cerror=E2=80=9D, eval=
uation fails.<br></p></li><li><p>Apply the <i>path</i> to the arguments obj=
ect of the response (the second item in&nbsp;<span class=3D"font" style=3D"=
font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto=
, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;,=
 &quot;Helvetica Neue&quot;, Arial, sans-serif">the response array) followi=
ng the RFC6901 JSON pointer algorithm, except with the following addition i=
n Section 4 (Evaluation):<br></span></p><div>If the currently referenced va=
lue is a JSON array, the reference token may&nbsp;<span class=3D"font" styl=
e=3D"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, R=
oboto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&q=
uot;, &quot;Helvetica Neue&quot;, Arial, sans-serif">be exactly the single =
character </span><code style=3D"color: rgb(31, 31, 31); font-size: 13px; le=
tter-spacing: -0.1px; font-style: normal; font-variant-ligatures: normal; f=
ont-variant-caps: normal; font-weight: normal;">*</code><span class=3D"font=
" style=3D"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&qu=
ot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid =
Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif">, making the new=
 referenced value the result of applying the rest of the JSON pointer token=
s to every item in the array and returning the results in the same order in=
 a new array. If the result of applying the rest of the pointer tokens to a=
 value was itself an array, the items should be included individually in th=
e output array rather than including the array itself (i.e. the result is f=
lattened).</span><br></div>
</li><li><p>If the type of the result is X, and the expected type of the ar=
gument is an&nbsp;<span class=3D"font" style=3D"font-family:-apple-system, =
BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell=
, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;=
, Arial, sans-serif">array of type X, wrap the result in an array with a si=
ngle item.</span><br></p></li></ol><p>As a simple example, suppose we have =
the following API request:<br></p><pre><code>[[ "getMessageUpdates", {
    "sinceState": "abcdef"
}, "t0" ],
[ "getMessages", {
    "#ids": {
        "resultOf": "t0",
        "path": "/changed"
    }
}, "t1" ]]</code><br></pre><p>Now after executing the first method call the=
 response array is:<br></p><pre><code>[[ "messageUpdates", {
    "accountId": "1",
    "oldState": "abcdef",
    "newState": "123456",
    "hasMoreUpdates": false,
    "changed": [ "msg1", "msg4" ],
    "removed": []
}, "t0" ]]</code><br></pre><p>So to execute the getMessages call, we look t=
hrough the arguments and find there is one with a <code>#</code> prefix. To=
 resolve this, we apply the algorithm above:<br></p><ol><li><div>Find the f=
irst response with client id =E2=80=9Ct0=E2=80=9D. The =E2=80=9CmessageUpda=
tes=E2=80=9D response <br></div>
<div>fulfils this criterion.<br></div>
</li><li><div>Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=
=80=99s messageUpdates=E2=80=9D, so this is <br></div>
<div>fine.<br></div>
</li><li><div>Apply the <i>path</i> as a JSON pointer to the arguments obje=
ct. This simply <br></div>
<div>selects the =E2=80=9Cchanged=E2=80=9D property, so the result of evalu=
ating is:<br></div>
<div><code>[ "msg1", "msg4" ]</code><br></div>
</li></ol><p>The JMAP server now continues to process the getMessages call =
as though the arguments were:<br></p><pre><code>{
    "ids": [ "msg1", "msg4" ]
}
</code><br></pre><p>Now a more complicated example: fetch the =E2=80=9Cfrom=
=E2=80=9D/=E2=80=9Ddate=E2=80=9D/=E2=80=9Dsubject=E2=80=9D for every messag=
e in the first 10 threads in the Inbox (sorted newest first):<br></p><pre><=
code>[[ "getMessageList", {
  "filter": { inMailbox: "id_of_inbox" },
  "sort": [ "date desc" ],
  "collapseThreads": true,
  "position": 0,
  "limit": 10
}, "t0" ],
[ "getMessages", {
  "#ids": {
    "resultOf": "t0",
    "path": "/ids"
  },
  "properties": [ "threadId" ]
}, "t1" ],
[ "getThreads", {
  "#ids": {
    "resultOf": "t1",
    "path": "/list/*/threadId"
  }
}, "t2" ],
[ "getMessages", {
  "#ids": {
    "resultOf": "t2"
    "path": "/list/*/messageIds"
  },</code><br></pre><pre><code>  "properties": [ "from", "date", "subject"=
 ]
}, "t3" ]]</code><br></pre><p>After executing the first 3 method calls the =
response array is:<br></p><pre><code>[[ "messageList", {
    "accountId": "1",
    "filter": { inMailbox: "id_of_inbox" },
    "sort": [ "date desc" ],
    "collapseThreads": true,
    "state": "abcdefg",
    "canCalculateUpdates": true,
    "position": 0,
    "total": 101,
    "ids": [ "msg1023", "msg223", "msg110", "msg93", "msg91", "msg38", "msg=
36", "msg33", "msg11", "msg1" ]
}, "t0" ],
[ "messages", {
    "accountId": "1",
    "state": "123456",
    "list": [{
        "id": "msg1023",
        "threadId": "trd194",
    }, {
        "id": "msg223",
        "threadId": "trd114"
    },=20
    ... etc...=20
    ],
    "notFound": null
}, "t1" ],
[ "threads", {
    "accountId": "1",
    "state": "123456",
    "list": [{
        "id: "trd194",
        "messageIds": [ "msg1020", "msg1021", "msg1023" ]
    }, {
        "id: "trd114",
        "messageIds": [ "msg201", "msg223" ]
    },=20
    ... etc...=20
    ],
    "notFound": null
}, "t2" ]]
</code><br></pre><p>So to execute the final getMessages call, we look throu=
gh the arguments and find there is one with a <code>#</code> prefix. To res=
olve this, we apply the algorithm:<br></p><ol><li><div>Find the first respo=
nse with client id =E2=80=9Ct2=E2=80=9D. The =E2=80=9Cthreads=E2=80=9D resp=
onse <br></div>
<div>fulfils this criterion.<br></div>
</li><li>Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=
=99s threads=E2=80=9D, so this is fine.<br></li><li><div>Apply the <i>path<=
/i> as a JSON pointer to the arguments object. Token-by-token: <br></div>
</li><ol><li><div><code><b>list</b></code>&nbsp;=E2=80=93 get the array of =
thread objects<br></div>
</li><li><div><b>*</b>&nbsp;=E2=80=93 for each of the items in the array:<b=
r></div>
</li><ol><li><div><code><b>messsageIds</b></code>&nbsp;=E2=80=93 get the ar=
ray of message ids<br></div>
</li><li><div>Concatenate these into a single array of all the ids in the r=
esult.<br></div>
</li></ol></ol></ol><p>The JMAP server now continues to process the getMess=
ages call as though the arguments were:<br></p><pre><code>{
    "ids": [ "msg1020", "msg1021", "msg1023", "msg201", "msg223", etc... ],=
</code><br></pre><pre><code>    </code>"properties": [ "from", "date", "sub=
ject" ]<code>
}</code><br></pre><p>For reference, in case it=E2=80=99s clearer than my de=
scription, here=E2=80=99s a JavaScript implementation of the pointer resolu=
tion algorithm, with the addition to RFC6901 clearly marked:<br></p><pre><c=
ode>function evaluatePointer ( value, pointer ) {
    if ( !pointer ) {
        return value;
    }
    if ( pointer.charAt( 0 ) !=3D=3D '/' ) {
        throw new Error( 'Invalid pointer' );
    }
    let token;
    let next =3D pointer.indexOf( '/', 1 );
    if ( next !=3D=3D -1 ) {
        token =3D pointer.slice( 1, next );
        pointer =3D pointer.slice( next );
    } else {
        token =3D pointer.slice( 1 );
        pointer =3D '';
    }
    token =3D token.replace( /~1/g, '/' ).replace( /~0/g, '~' );
    if ( Array.isArray( value ) ) {
        if ( /^(?:0|[1-9][0-9]*)$/.test( token ) ) {
            return evaluatePointer( value[ parseInt( token, 10 ) ], pointer=
 );
        }
        <span class=3D"colour" style=3D"color:#000000"><span class=3D"highl=
ight" style=3D"background-color:#ffffe0">/* start: the only bit that differ=
s from RFC6901 */
        if ( token =3D=3D=3D '*' ) {
            /* Map values to pointer */
            value =3D value.map( item =3D&gt; evaluatePointer( item, pointe=
r ) );
            /* Flatten output */
            return value.reduce( ( output, item ) =3D&gt; {
                if ( !Array.isArray( item ) ) {
                    item =3D [ item ];
                }
                return output.concat( item );
            }, [] );
        }
        /* end */</span></span>
    } else if ( value !=3D=3D null &amp;&amp; typeof value =3D=3D=3D 'objec=
t' ) {
        return evaluatePointer( value[ token ], pointer );
    }
    throw new Error( 'Evaluation failed' );
}
</code><br></pre><div>So:<br></div>
<ul><li>What do people think of the result-reference concept to replace the=
 fetchRecords etc. arguments and reduce the amount of special-casing?<br></=
li><li>Presuming agreement this is a good idea, is this syntax good? If not=
, please suggest an alternative! (I've tried to reuse RFC6901 as much as po=
ssible as the only relevant standard I'm aware of, but if you know of anoth=
er standard that's more suitable please let me know).<br></li></ul><div><br=
></div>
<div>The full change proposal can be seen in the pull request at&nbsp;<a hr=
ef=3D"https://github.com/jmapio/jmap/pull/148">https://github.com/jmapio/jm=
ap/pull/148</a>.<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.<br></div>
</body>
</html>

--_----------=_15069018126760091--


From nobody Sun Oct  1 18:19:07 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 05D02134BD4 for <jmap@ietfa.amsl.com>; Sun,  1 Oct 2017 18:19:05 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.319
X-Spam-Level: 
X-Spam-Status: No, score=-1.319 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=EfsfLNlf; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=qa6jdOCs
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 F-Uno9dD2bGN for <jmap@ietfa.amsl.com>; Sun,  1 Oct 2017 18:19:03 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9EFFD13307D for <jmap@ietf.org>; Sun,  1 Oct 2017 18:19:03 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id E2E12209F8 for <jmap@ietf.org>; Sun,  1 Oct 2017 21:19:02 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Sun, 01 Oct 2017 21:19:02 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=dJiMYnMnC8YRK4kPp SCvY8l6vfJUn/+rUSdibX56ZMI=; b=EfsfLNlf3D7I458w3uXBX6hzksw/SPN2w XrbIl00tRCJbBGd5DwGf/5/usKD22pQOq4fvHspw2da9n0Yq/fqq6baILvivbsbR n3I0CEDLVJI0NM3+wOVlYc1bSzC4GfvW/isIZ56W0VmJrImE6qpSNDQybNpEugW+ Hm+ZcJUxuKgzCSt0pourGigUVmNAGojMwDQGoF9MIQXJsIBWweDzabRV7s3Jgx4g JZ9mR1AS9rrZ8wdt2cDAMUTHi+5rMJcuqX4ulrSqMK8IrARyGE2Cx7o7j1/CzapT xGR/4QziEZyRmiPX5kK3J01y6doCxU+onqzYx7zDxkZ6rschVU8NA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=dJiMYn MnC8YRK4kPpSCvY8l6vfJUn/+rUSdibX56ZMI=; b=qa6jdOCs5qWmgjF/tJWO+V 3wghpCcHCsgGgc2arYIVFJWlMpQje1XYMurXbMCd2Eg9KUQajBTEbFRxLwofNiKA G1axOWoiq+nVKTkCVB6b3cKt3mPpSOQXlGs8MhAx2wpIlNUwM0Cxv117B4l736Gj 8rx9NNdr4MJB/mo5ZxdK5YuDK2bPVjMlqqzQg0nmQ0ZzmyvlG0XE/MOeDgHIqJAW SlJg4jNePryucIuUEaNfEPfToIUwzjYZVDJgZAYooT5+d8s5s9KKAMVb/O1pvwpQ CeunhbHURf1uXJyRc9N71qTHDyX1bI7c1Zd65g4Pg1Ez4I6XxISUx+7UM1UtbjKQ ==
X-ME-Sender: <xms:BpTRWR4l14Lj671OBLHntHFUi2xIwdjwnqrn29__NktUV_6g-G8ihw>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 949E9E21CC; Sun,  1 Oct 2017 21:19:02 -0400 (EDT)
Message-Id: <1506907142.744416.1124468000.58571981@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_15069071427444160"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-5f0bf376
In-Reply-To: <1505709437.2183546.1109331544.21752C4F@webmail.messagingengine.com>
Date: Mon, 02 Oct 2017 12:19:02 +1100
References: <1505709437.2183546.1109331544.21752C4F@webmail.messagingengine.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/0vVIXnX-KU0Da4SIZhd_ZZ2QjWA>
Subject: Re: [Jmap] Push specification
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 01:19:05 -0000

This is a multi-part message in MIME format.

--_----------=_15069071427444160
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

On Mon, 18 Sep 2017, at 03:37 PM, Neil Jenkins wrote:
> The only outstanding comment I believe I currently have from Martin is
> to define when encryption may be omitted. If the push server is
> controlled by the same entity as the JMAP server then there is clearly
> no benefit in encrypting the payload (presuming the connection between
> the client and the push server is itself encrypted anyway).
I have now added a brief discussion about this to the security
considerations section and merged the changes. The full changes are
summarised in the commit message[1].
Cheers,
Neil.

Links:

  1. https://github.com/jmapio/jmap/commit/337fcdfb4b45b556f4ce1b53f5235fa9e3c667ce

--_----------=_15069071427444160
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Mon, 18 Sep 2017, at 03:37 PM, Neil Jenkins wrote:<br></div>
<blockquote type="cite"><div>The only outstanding comment I believe I currently have from Martin is to define when encryption may be omitted. If the push server is controlled by the same entity as the JMAP server then there is clearly no benefit in encrypting the payload (presuming the connection between the client and the push server is itself encrypted anyway).<br></div>
</blockquote><div><br></div>
<div>I have now added a brief discussion about this to the security considerations section and merged the changes. The full changes are summarised in the <a href="https://github.com/jmapio/jmap/commit/337fcdfb4b45b556f4ce1b53f5235fa9e3c667ce">commit message</a>.<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.</div>
</body>
</html>

--_----------=_15069071427444160--


From nobody Sun Oct  1 20:05:36 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 587A2134237 for <jmap@ietfa.amsl.com>; Sun,  1 Oct 2017 20:05:35 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.319
X-Spam-Level: 
X-Spam-Status: No, score=-1.319 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=PmWsx0tn; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=gWJT6ZmF
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 AJQlmU12en2W for <jmap@ietfa.amsl.com>; Sun,  1 Oct 2017 20:05:33 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 71C7A1321CB for <jmap@ietf.org>; Sun,  1 Oct 2017 20:05:33 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id DDCD22256A for <jmap@ietf.org>; Sun,  1 Oct 2017 23:05:32 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Sun, 01 Oct 2017 23:05:32 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=content-transfer-encoding:content-type:date :from:message-id:mime-version:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=Jx4vQ4tA5yKljPbM++aM2zLB3xlqtLA5G0hKJwKG8 YA=; b=PmWsx0tnuovHFQWoI+fL/we5Lw0bsRx1lOcQnugC2FEyp7mjubbU4x1Ie KcbKBrXtAoCCoj8vVcuRZEDBUGEDc2H5reQ7BPB/GuNDv3g1KJlq8MjM02uBW1+u JZ0cShs9PdjzczWuX6UkypwSROBmbpBXPXsZbPIUnUKIytQodtzrhBhM60qwGIRm VMwB+NDpTmgTRs8OeCFuk1jiSsJvMO55bfDL5oBKqcltO/eKiHrAsp3fpzfl06cy qOiUy7xR3fDjMgSUKEaW4p5xhXpHw6IzcpBsZJlKL1YY/H49t9aEq+jmNiHl6me4 Zod37TizzywTh4y1UDUOurwRSB1fg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=Jx4vQ4tA5yKljPbM++aM2zLB3xlqt LA5G0hKJwKG8YA=; b=gWJT6ZmFSQkV139vXO+6tP4Yqm7o5fnBid1xcuKIaUz41 Wtc/LsbgYvqqqxBMDhgpJRZoLsV10xcT3A1euxYaDQeoTiwLaebqeZe/3NrjzEgk bPTLeNmUxB8Pt5PRkZ3jwm59uboVnp0ICQw4I6ovJfKyf0w23Kxjk+lochglnIjd +gJqOMKqzQ5gB2JdPMACjsHSdTyRvP8+rU6S/fRKcAA+M4l6zxe0aqR8fDAcLU6d gvzF+Aa0PAr47BcgMi870y0OA1DFaT9r+lpWnvBnvFrytmwu9xuQ4m5zb9Z9Se/f 6Gk0Ovpzz8OHpg9eXqzqypBn3VYRxpCLmM3oL6r2Q==
X-ME-Sender: <xms:_KzRWSnboJiY5oFZ1cV_7szpLrl0_9OJCCvhMDj2aynZWhSA34ISUw>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 9414AE24A6; Sun,  1 Oct 2017 23:05:32 -0400 (EDT)
Message-Id: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_15069135328273020"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-5f0bf376
Date: Mon, 02 Oct 2017 14:05:32 +1100
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/fmk1CBbUFZpyZIocVCi70JIaegs>
Subject: [Jmap] Mailbox#role vs IMAP SPECIAL-USE
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 03:05:35 -0000

This is a multi-part message in MIME format.

--_----------=_15069135328273020
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

This is in reference to GitHub issue #62[1].

The role attribute on the Mailbox object in JMAP is equivalent to the
RFC6154[2] SPECIAL-USE flag in IMAP, however there are some semantic
differences so I'd like to solicit some opinions on what to do. Here are
all the differences I can see:
 1. The value is singular in JMAP, but you can have multiple special-use
    attributes on the same mailbox in IMAP.
 2. The value is unique in JMAP (you cannot have two "Sent" mailboxes),
    but duplicates are allowed in IMAP.
 3. The value is immutable in JMAP, but can be modified after mailbox
    creation in IMAP.
In addition, JMAP has two roles that don't exist in SPECIAL-USE:

 * *inbox* (It's a hard-coded name in IMAP so you didn't need an
   attribute).
 * *templates* (Drafts that should be used as the basis for new drafts
   but not themselves modified.)
SPECIAL-USE has two attributes that aren't in JMAP:

 * \All
 * \Flagged

These are both virtual, and aren't necessary in JMAP because
getMessageList allows you to fetch all/flagged across the whole account
without requiring a special mailbox fox it.
So, what to do. Special-use allows servers to enforce the three
differences in semantics that JMAP specifies (singular, unique,
immutable), so one option is to leave the semantics as is, and IMAP
servers can just enforce them over IMAP as well to keep a consistent
view. Alternatively we can relax the restrictions in JMAP, but I think
these are useful properties and I wonder whether there are people
actually making use of the relaxed options at the moment with IMAP?
Regarding the different roles/attributes, there's RFC6154 didn't create
an IANA registry, so it's not extensible without a whole new RFC. I'm
inclined to just include a mapping in an advice to implementors section.
Any other opinions on this?

Cheers,
Neil.

Links:

  1. https://github.com/jmapio/jmap/issues/62
  2. https://tools.ietf.org/html/rfc6154

--_----------=_15069135328273020
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>This is in reference to GitHub issue <a href="https://github.com/jmapio/jmap/issues/62">#62</a>.<br></div>
<div><br></div>
<div>The role attribute on the Mailbox object in JMAP is equivalent to the <a href="https://tools.ietf.org/html/rfc6154">RFC6154</a> SPECIAL-USE flag in IMAP, however there are some semantic differences so I'd like to solicit some opinions on what to do. Here are all the differences I can see:<br></div>
<div><br></div>
<ol><li>The value is singular in JMAP, but you can have multiple special-use attributes on the same mailbox in IMAP.<br></li><li>The value is unique in JMAP (you cannot have two "Sent" mailboxes), but duplicates are allowed in IMAP.<br></li><li>The value is immutable in JMAP, but can be modified after mailbox creation in IMAP.<br></li></ol><div><br></div>
<div>In addition, JMAP has two roles that don't exist in SPECIAL-USE:<br></div>
<div><br></div>
<ul><li><i>inbox</i> (It's a hard-coded name in IMAP so you didn't need an attribute).<br></li><li><i>templates</i> (Drafts that should be used as the basis for new drafts but not themselves modified.)<br></li></ul><div><br></div>
<div>SPECIAL-USE has two attributes that aren't in JMAP:<br></div>
<div><br></div>
<ul><li>\All<br></li><li>\Flagged<br></li></ul><div><br></div>
<div>These are both virtual, and aren't necessary in JMAP because getMessageList allows you to fetch all/flagged across the whole account without requiring a special mailbox fox it.<br></div>
<div><br></div>
<div>So, what to do. Special-use allows servers to enforce the three differences in semantics that JMAP specifies (singular, unique, immutable), so one option is to leave the semantics as is, and IMAP servers can just enforce them over IMAP as well to keep a consistent view. Alternatively we can relax the restrictions in JMAP, but I think these are useful properties and I wonder whether there are people actually making use of the relaxed options at the moment with IMAP?<br></div>
<div><br></div>
<div>Regarding the different roles/attributes, there's RFC6154 didn't create an IANA registry, so it's not extensible without a whole new RFC. I'm inclined to just include a mapping in an advice to implementors section.<br></div>
<div><br></div>
<div>Any other opinions on this?<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.<br></div>
</body>
</html>

--_----------=_15069135328273020--


From nobody Mon Oct  2 03:18:59 2017
Return-Path: <brong@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 302FB13458B for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 03:18:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.719
X-Spam-Level: 
X-Spam-Status: No, score=-2.719 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=CBa6UMm+; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=RpljyLOF
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 O9uZOBZS6g9a for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 03:18:55 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BB966134586 for <jmap@ietf.org>; Mon,  2 Oct 2017 03:18:54 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C9958227E2 for <jmap@ietf.org>; Mon,  2 Oct 2017 06:18:53 -0400 (EDT)
Received: from web4 ([10.202.2.214]) by compute6.internal (MEProxy); Mon, 02 Oct 2017 06:18:53 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=4roHJumDOvcA7hr44 6rNBTyr4Z5ozddN6axyXz6/wm0=; b=CBa6UMm+iL4PGZ5ZAY5WwYPkcnZKVV5ez YJHWv+9UwtuXSrastzb1xH3br5m5+/mntmhvZ4doiOXZaYKunqMaij356IQBS/zJ On2iM8NGySxQbB2ur2AaFar2pMp00VC2nDI0XZtgq2ORyk8taeeL6fkXJDgtfRuW fRsxi6JY0IHbNbmQQlB1t1RTASQ1x0VUG+nElDFnNT8AkOmDQipa5UQfc5EP39Lu scryJJchWUkQVIjLtbb0m1lyKyEUUhi6EZA8SVoVoj8ljzqfQZC4isFk1X5GWj/m X9Kmf3gexbLV8+KTngQ5+frx77+n9vLxswBqBCRHonUInvbMLI5kg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=4roHJu mDOvcA7hr446rNBTyr4Z5ozddN6axyXz6/wm0=; b=RpljyLOFDlqQz0icKF1mHE dDS+/8dvspj4rF752Wgq2wFsuqzelpqJsX2ktzz8BZZRhTwa52ilvPbM+4hhjUro U9SN2OjGQa7oLOXeQ11/PQKLvBA3MbIs7BOl4Xq9zNxwtkocneITS0aM31pewYls ThJaWh/+H20+nfhkoN5tKzDNpLzS29GLOLfO1SjR/ay0xbKVBOMw7PUG8uGuIe5A CoB4yUEbGlcFw4wOqD2oFX2vIaVQoEuIIqGiZleVIb96EAqwe2sdHF3p99KljhAm CeAo5ufN+Aa+d7sgbHYUQo/2aO0Xd2wWsyKOGvU6Yorr1EB1dXRZc9JpxNZU4qnQ ==
X-ME-Sender: <xms:jRLSWe2H0XJtS-B5QijOV92fuAN12W01gd_Pl6e-QSX9acIXhkWXSg>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id A54E4BAB5B; Mon,  2 Oct 2017 06:18:53 -0400 (EDT)
Message-Id: <1506939533.1938038.1124810552.6A165E33@webmail.messagingengine.com>
From: Bron Gondwana <brong@fastmailteam.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150693953319380383"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-6cb49228
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com>
Date: Mon, 02 Oct 2017 06:18:53 -0400
In-Reply-To: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/b6KP3y3NevHPuOy5kXCwNllvoR4>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 10:18:57 -0000

This is a multi-part message in MIME format.

--_----------=_150693953319380383
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

On Sun, 1 Oct 2017, at 19:50, Neil Jenkins wrote:
>
>  1. Find the first response with a client id identical to the
>     *resultOf* property of the *ResultReference* in the array of
>     outputs from previously processed  method calls in the same
>     request. If none, evaluation fails.


>  2. If the response name is =E2=80=9Cerror=E2=80=9D, evaluation fails.


>  3. Apply the *path* to the arguments object of the response (the
>     second item in the response array) following the RFC6901 JSON
>     pointer algorithm, except with the following addition in Section 4
>     (Evaluation):


> If the currently referenced value is a JSON array, the reference token
> may be exactly the single character *, making the new referenced value
> the result of applying the rest of the JSON pointer tokens to every
> item in the array and returning the results in the same order in a new
> array. If the result of applying the rest of the pointer tokens to a
> value was itself an array, the items should be included individually
> in the output array rather than including the array itself (i.e. the
> result is flattened).
[...]

> So to execute the getMessages call, we look through the arguments and
> find there is one with a # prefix. To resolve this, we apply the
> algorithm above:
>  1. Find the first response with client id =E2=80=9Ct0=E2=80=9D. The =E2=
=80=9CmessageUpdates=E2=80=9D
>     response fulfils this criterion.
>  2. Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=99s =
messageUpdates=E2=80=9D, so
>     this is fine.
>  3. Apply the *path* as a JSON pointer to the arguments object. This
>     simply selects the =E2=80=9Cchanged=E2=80=9D property, so the result =
of evaluating
>     is: [ "msg1", "msg4" ]
I guess we're not returning multiple responses, or if we are we're
guaranteeing an order?
A safer and clearer way might actually be to make the JSON pointer be a
more full path:

[[ "getMessageUpdates", { "sinceState": "abcdef" }, "t0" ], [
"getMessages", { "#ids": { "resultOf": "t0", "path":
"/messageUpdates/changed" } }, "t1" ]]

This removes the "ignore responses which are 'error'" special case.  I
guess if we wanted to make it more explicit fields:


[[ "getMessageUpdates", { "sinceState": "abcdef" }, "t0" ], [
"getMessages", { "#ids": { "resultOf": "t0",        "resultType" :
"messageUpdates", "path": "/changed" } }, "t1" ]]


Bron.

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



--_----------=_150693953319380383
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style=3D"font-family:Arial;">On Sun, 1 Oct 2017, at 19:50, Neil =
Jenkins wrote:<br></div>
<blockquote type=3D"cite"><div><br></div>
<ol><li><p>Find the first response with a client id identical to the <i>res=
ultOf</i>&nbsp;<span class=3D"font" style=3D"font-family:-apple-system, Bli=
nkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &=
quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, A=
rial, sans-serif">property of the </span><i style=3D"font-family:-apple-sys=
tem, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cant=
arell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&=
quot;, Arial, sans-serif;letter-spacing:-0.1px;">ResultReference</i><span c=
lass=3D"font" style=3D"font-family:-apple-system, BlinkMacSystemFont, &quot=
;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, =
&quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif"> in =
the array of outputs from previously processed  method calls in the same re=
quest. If none, evaluation fails.</span><br></p></li><li><p>If the response=
 name is =E2=80=9Cerror=E2=80=9D, evaluation fails.<br></p></li><li><p>Appl=
y the <i>path</i> to the arguments object of the response (the second item =
in&nbsp;<span class=3D"font" style=3D"font-family:-apple-system, BlinkMacSy=
stemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fi=
ra Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, s=
ans-serif">the response array) following the RFC6901 JSON pointer algorithm=
, except with the following addition in Section 4 (Evaluation):</span><br><=
/p><div>If the currently referenced value is a JSON array, the reference to=
ken may&nbsp;<span class=3D"font" style=3D"font-family:-apple-system, Blink=
MacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &qu=
ot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Ari=
al, sans-serif">be exactly the single character </span><code style=3D"color=
:rgb(31, 31, 31);font-size:13px;letter-spacing:-0.1px;font-style:normal;fon=
t-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;">*<=
/code><span class=3D"font" style=3D"font-family:-apple-system, BlinkMacSyst=
emFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira=
 Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, san=
s-serif">, making the new referenced value the result of applying the rest =
of the JSON pointer tokens to every item in the array and returning the res=
ults in the same order in a new array. If the result of applying the rest o=
f the pointer tokens to a value was itself an array, the items should be in=
cluded individually in the output array rather than including the array its=
elf (i.e. the result is flattened).</span><br></div>
</li></ol></blockquote><div style=3D"font-family:Arial;"><br></div>
<div style=3D"font-family:Arial;">[...]<br></div>
<div style=3D"font-family:Arial;"><br></div>
<blockquote type=3D"cite"><div style=3D"font-family:Arial;">So to execute t=
he getMessages call, we look through the arguments and find there is one wi=
th a <code>#</code> prefix. To resolve this, we apply the algorithm above:<=
br></div>
<ol><li><div>Find the first response with client id =E2=80=9Ct0=E2=80=9D. T=
he =E2=80=9CmessageUpdates=E2=80=9D response <br></div>
<div>fulfils this criterion.<br></div>
</li><li><div>Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=
=80=99s messageUpdates=E2=80=9D, so this is <br></div>
<div>fine.<br></div>
</li><li><div>Apply the <i>path</i> as a JSON pointer to the arguments obje=
ct. This simply <br></div>
<div>selects the =E2=80=9Cchanged=E2=80=9D property, so the result of evalu=
ating is:<br></div>
<div><code>[ "msg1", "msg4" ]</code><br></div>
</li></ol></blockquote><div style=3D"font-family:Arial;"><br></div>
<div style=3D"font-family:Arial;">I guess we're not returning multiple resp=
onses, or if we are we're guaranteeing an order?<br></div>
<div style=3D"font-family:Arial;"><br></div>
<div style=3D"font-family:Arial;">A safer and clearer way might actually be=
 to make the JSON pointer be a more full path:<br></div>
<div style=3D"font-family:Arial;"><br></div>
<div style=3D"font-family:Arial;"><br></div>
<pre><code>[[ "getMessageUpdates", {
    "sinceState": "abcdef"
}, "t0" ],
[ "getMessages", {
    "#ids": {
        "resultOf": "t0",
        "path": "/messageUpdates/changed"
    }
}, "t1" ]]</code><br></pre><pre><br></pre><pre>This removes the "ignore res=
ponses which are 'error'" special case.  I guess if we wanted to make it mo=
re explicit fields:<br></pre><pre><br></pre><pre><br></pre><pre><code>[[ "g=
etMessageUpdates", {
    "sinceState": "abcdef"
}, "t0" ],
[ "getMessages", {
    "#ids": {
        "resultOf": "t0",</code><br></pre><pre><code>        "resultType" :=
 "messageUpdates",
        "path": "/changed"
    }
}, "t1" ]]</code><br></pre><pre><div style=3D"font-family:Arial;"><br></div>
</pre><pre><br></pre><pre>Bron.<br></pre><div style=3D"font-family:Arial;">=
<br></div>
<div id=3D"sig56629417"><div class=3D"signature">--<br></div>
<div class=3D"signature">&nbsp; Bron Gondwana, CEO, FastMail Pty Ltd<br></d=
iv>
<div class=3D"signature">&nbsp; brong@fastmailteam.com<br></div>
<div class=3D"signature"><br></div>
</div>
<div style=3D"font-family:Arial;"><br></div>
</body>
</html>

--_----------=_150693953319380383--


From nobody Mon Oct  2 06:46:39 2017
Return-Path: <fatkudu@gmail.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B6CFF13447F for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 06:46:38 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.697
X-Spam-Level: 
X-Spam-Status: No, score=-2.697 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, UNPARSEABLE_RELAY=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=gmail.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 HHDz4iJPQJWz for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 06:46:31 -0700 (PDT)
Received: from mail-qk0-x229.google.com (mail-qk0-x229.google.com [IPv6:2607:f8b0:400d:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id EFCB5134460 for <jmap@ietf.org>; Mon,  2 Oct 2017 06:46:28 -0700 (PDT)
Received: by mail-qk0-x229.google.com with SMTP id c67so4578355qkg.2 for <jmap@ietf.org>; Mon, 02 Oct 2017 06:46:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=from:in-reply-to:references:mime-version:date:message-id:subject:to;  bh=uK/EtPUhF/U/LWZ3Hxvd0tNQryUFydQxjBqkdSUKNCQ=; b=fM5uxcw2SJiftlMPfvWD+wiD8rbCPM4dm7W/5b+fanyBQjuLfDvOc7kzw5Ct78O9Rz vSZNRLrvSq9CCxF85W2nFeNP8RGGBCqad3IUUYXkoWD/GTAmsHFXOzDPj9a7vNJsdabF c7EV5fshjOFQva2i+UpTD7C3uf+UWn3sjaoVfsap7giHCVJs4JQZZgiZ1exRHv8MhEEr oO5Rchp3xzFpwBcTSQe60+8i77CO/F2kYZhCclLLrDTnNPAYp0sz44PLrnRqvAO6pw+x 7kXxXWJvk4GIK49o/7EAKttyeYLF1oFcq2TTqZLTFT7gSND2FBkW97U09+m2ZnVU/+Td gMkw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:in-reply-to:references:mime-version:date :message-id:subject:to; bh=uK/EtPUhF/U/LWZ3Hxvd0tNQryUFydQxjBqkdSUKNCQ=; b=jG8iLwE04oReV22cmJ63cEBjN7eHe/X8euQoP2owBdiKwGnIHgE4cKK0zDee+WeBCV NBXQktaw7S6r+oC93dCORwiqBxhE//ogRL0/xdfGB6eiQHPoN6mGutT0bpQy2nYmViFu 4oeotBSvFWC2VcbCKhsTuyA9lRi+S/4QGTIebQPq4BB8etfcXPxeHBulMjA706C5ontI ztZDPb13WN5PgkWAaQB5JY5h76mATfuNNsE8yMI4Dpab+QxX+gXOreXS0W//PVS3K+i+ 7UUzAyY33jp8KQU/XFahgZ4SnGScSkZEtSjZMmnpvYNrDFlIUhHYElrSuQR1tcAEnTqt jyOw==
X-Gm-Message-State: AMCzsaWhHTQruuvlCIj5UAazChf8uVNPB9VxQyIbZpRQV2a7aQnqwFTx CeBGmSiYHCPUL1MKpnBJqGpz1m5j98kn65YCxQS+oA==
X-Google-Smtp-Source: AOwi7QAkKXZvuaofvvQ+6u7pnIjfYEbdLZdOIVlC8woi3H48q7STtpoLTiR8Ing3vnm6Whdaf8YBBsUAmJuibAvlynU=
X-Received: by 10.55.47.70 with SMTP id v67mr15384136qkh.324.1506951987980; Mon, 02 Oct 2017 06:46:27 -0700 (PDT)
Received: from 1058052472880 named unknown by gmailapi.google.com with HTTPREST; Mon, 2 Oct 2017 06:46:27 -0700
From: Gren Elliot <fatkudu@gmail.com>
In-Reply-To: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com>
References: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com>
X-Mailer: Airmail (452)
MIME-Version: 1.0
Date: Mon, 2 Oct 2017 06:46:27 -0700
Message-ID: <CAMQk0F8Ty2ghizaqjPABpAavnS5B-XG2xGV5cQzNNJP77YfSUg@mail.gmail.com>
To: Neil Jenkins <neilj@fastmailteam.com>, IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="001a114f2ac4eff0f4055a909969"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/E6pVFTgdwX2n1mE963-2r4Osuhs>
Subject: Re: [Jmap] Mailbox#role vs IMAP SPECIAL-USE
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 13:46:39 -0000

--001a114f2ac4eff0f4055a909969
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I=E2=80=99m inclined to think there is value in JMAP being more restrictive=
.  If
IMAP exposes multiple =E2=80=9CSent=E2=80=9D mailboxes for instance, the JM=
AP
implementation could provide an aggregated view of them in a similar way to
how the =E2=80=9Call mail=E2=80=9D view would be done.  Similarly, if =E2=
=80=9CSent=E2=80=9D and =E2=80=9CDrafts=E2=80=9D
are on the same IMAP mailbox - JMAP could present 2 views onto the
underlying implementation of this.  There are of course issues (where do
Sent messages end up?) but I don=E2=80=99t think allowing multiple Sent mai=
lboxes
addresses that issue anyway.

Having said this, I=E2=80=99m not aware of any actual instances where this =
is a
problem - I have seen multiple Sent mailboxes created by different (IMAP
and non-IMAP) clients but I don=E2=80=99t think I=E2=80=99ve seen more than=
 one of them
flagged for special use.

Regards,
Gren Elliot

From: Neil Jenkins <neilj@fastmailteam.com> <neilj@fastmailteam.com>
Reply: Neil Jenkins <neilj@fastmailteam.com> <neilj@fastmailteam.com>
Date: 2 October 2017 at 04:05:38
To: IETF JMAP Mailing List <jmap@ietf.org> <jmap@ietf.org>
Subject:  [Jmap] Mailbox#role vs IMAP SPECIAL-USE

This is in reference to GitHub issue #62
<https://github.com/jmapio/jmap/issues/62>.

The role attribute on the Mailbox object in JMAP is equivalent to the
RFC6154 <https://tools.ietf.org/html/rfc6154> SPECIAL-USE flag in IMAP,
however there are some semantic differences so I'd like to solicit some
opinions on what to do. Here are all the differences I can see:


   1. The value is singular in JMAP, but you can have multiple special-use
   attributes on the same mailbox in IMAP.
   2. The value is unique in JMAP (you cannot have two "Sent" mailboxes),
   but duplicates are allowed in IMAP.
   3. The value is immutable in JMAP, but can be modified after mailbox
   creation in IMAP.


In addition, JMAP has two roles that don't exist in SPECIAL-USE:


   - *inbox* (It's a hard-coded name in IMAP so you didn't need an
   attribute).
   - *templates* (Drafts that should be used as the basis for new drafts
   but not themselves modified.)


SPECIAL-USE has two attributes that aren't in JMAP:


   - \All
   - \Flagged


These are both virtual, and aren't necessary in JMAP because getMessageList
allows you to fetch all/flagged across the whole account without requiring
a special mailbox fox it.

So, what to do. Special-use allows servers to enforce the three differences
in semantics that JMAP specifies (singular, unique, immutable), so one
option is to leave the semantics as is, and IMAP servers can just enforce
them over IMAP as well to keep a consistent view. Alternatively we can
relax the restrictions in JMAP, but I think these are useful properties and
I wonder whether there are people actually making use of the relaxed
options at the moment with IMAP?

Regarding the different roles/attributes, there's RFC6154 didn't create an
IANA registry, so it's not extensible without a whole new RFC. I'm inclined
to just include a mapping in an advice to implementors section.

Any other opinions on this?

Cheers,
Neil.
_______________________________________________
Jmap mailing list
Jmap@ietf.org
https://www.ietf.org/mailman/listinfo/jmap

--001a114f2ac4eff0f4055a909969
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style>=
</head><body style=3D"word-wrap:break-word"><div id=3D"bloop_customfont" st=
yle=3D"font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);mar=
gin:0px;line-height:auto">I=E2=80=99m inclined to think there is value in J=
MAP being more restrictive.=C2=A0 If IMAP exposes multiple =E2=80=9CSent=E2=
=80=9D mailboxes for instance, the JMAP implementation could provide an agg=
regated view of them in a similar way to how the =E2=80=9Call mail=E2=80=9D=
 view would be done.=C2=A0 Similarly, if =E2=80=9CSent=E2=80=9D and =E2=80=
=9CDrafts=E2=80=9D are on the same IMAP mailbox - JMAP could present 2 view=
s onto the underlying implementation of this.=C2=A0 There are of course iss=
ues (where do Sent messages end up?) but I don=E2=80=99t think allowing mul=
tiple Sent mailboxes addresses that issue anyway.</div><div id=3D"bloop_cus=
tomfont" style=3D"font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0=
,0,1.0);margin:0px;line-height:auto"><br></div><div id=3D"bloop_customfont"=
 style=3D"font-family:Helvetica,Arial;font-size:13px;color:rgba(0,0,0,1.0);=
margin:0px;line-height:auto">Having said this, I=E2=80=99m not aware of any=
 actual instances where this is a problem - I have seen multiple Sent mailb=
oxes created by different (IMAP and non-IMAP) clients but I don=E2=80=99t t=
hink I=E2=80=99ve seen more than one of them flagged for special use.</div>=
 <br> <div id=3D"bloop_sign_1506951315285257984" class=3D"bloop_sign"><div =
style=3D"font-family:helvetica,arial;font-size:13px">Regards,</div><div sty=
le=3D"font-family:helvetica,arial;font-size:13px">Gren Elliot<br></div></di=
v> <div class=3D"airmail_ext_on" style=3D"color:black"><br>From:=C2=A0<span=
 style=3D"color:black">Neil Jenkins</span> <a href=3D"mailto:neilj@fastmail=
team.com">&lt;neilj@fastmailteam.com&gt;</a><br>Reply:=C2=A0<span style=3D"=
color:black">Neil Jenkins</span> <a href=3D"mailto:neilj@fastmailteam.com">=
&lt;neilj@fastmailteam.com&gt;</a><br>Date:=C2=A0<span style=3D"color:black=
">2 October 2017 at 04:05:38</span><br>To:=C2=A0<span style=3D"color:black"=
>IETF JMAP Mailing List</span> <a href=3D"mailto:jmap@ietf.org">&lt;jmap@ie=
tf.org&gt;</a><br>Subject:=C2=A0<span style=3D"color:black"> [Jmap] Mailbox=
#role vs IMAP SPECIAL-USE <br></span></div><br> <blockquote type=3D"cite" c=
lass=3D"clean_bq"><span><div><div></div><div>


<title></title>


<div>This is in reference to GitHub issue <a href=3D"https://github.com/jma=
pio/jmap/issues/62">#62</a>.<br></div>
<div><br></div>
<div>The role attribute on the Mailbox object in JMAP is equivalent
to the <a href=3D"https://tools.ietf.org/html/rfc6154">RFC6154</a>
SPECIAL-USE flag in IMAP, however there are some semantic
differences so I&#39;d like to solicit some opinions on what to do.
Here are all the differences I can see:<br></div>
<div><br></div>
<ol>
<li>The value is singular in JMAP, but you can have multiple
special-use attributes on the same mailbox in IMAP.<br></li>
<li>The value is unique in JMAP (you cannot have two &quot;Sent&quot;
mailboxes), but duplicates are allowed in IMAP.<br></li>
<li>The value is immutable in JMAP, but can be modified after
mailbox creation in IMAP.<br></li>
</ol>
<div><br></div>
<div>In addition, JMAP has two roles that don&#39;t exist in
SPECIAL-USE:<br></div>
<div><br></div>
<ul>
<li><i>inbox</i> (It&#39;s a hard-coded name in IMAP so you didn&#39;t need
an attribute).<br></li>
<li><i>templates</i> (Drafts that should be used as the basis for
new drafts but not themselves modified.)<br></li>
</ul>
<div><br></div>
<div>SPECIAL-USE has two attributes that aren&#39;t in
JMAP:<br></div>
<div><br></div>
<ul>
<li>\All<br></li>
<li>\Flagged<br></li>
</ul>
<div><br></div>
<div>These are both virtual, and aren&#39;t necessary in JMAP because
getMessageList allows you to fetch all/flagged across the whole
account without requiring a special mailbox fox it.<br></div>
<div><br></div>
<div>So, what to do. Special-use allows servers to enforce the
three differences in semantics that JMAP specifies (singular,
unique, immutable), so one option is to leave the semantics as is,
and IMAP servers can just enforce them over IMAP as well to keep a
consistent view. Alternatively we can relax the restrictions in
JMAP, but I think these are useful properties and I wonder whether
there are people actually making use of the relaxed options at the
moment with IMAP?<br></div>
<div><br></div>
<div>Regarding the different roles/attributes, there&#39;s RFC6154
didn&#39;t create an IANA registry, so it&#39;s not extensible without a
whole new RFC. I&#39;m inclined to just include a mapping in an advice
to implementors section.<br></div>
<div><br></div>
<div>Any other opinions on this?<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.<br></div>


_______________________________________________
<br>Jmap mailing list
<br><a href=3D"mailto:Jmap@ietf.org">Jmap@ietf.org</a>
<br><a href=3D"https://www.ietf.org/mailman/listinfo/jmap">https://www.ietf=
.org/mailman/listinfo/jmap</a>
<br></div></div></span></blockquote></body></html>

--001a114f2ac4eff0f4055a909969--


From nobody Mon Oct  2 07:00:04 2017
Return-Path: <schaefer@brasslantern.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 766B413447F for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 07:00:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.5
X-Spam-Level: 
X-Spam-Status: No, score=-0.5 tagged_above=-999 required=5 tests=[BAYES_05=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, 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=brasslantern-com.20150623.gappssmtp.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 3huChhUvnlUA for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 07:00:00 -0700 (PDT)
Received: from mail-qt0-x22d.google.com (mail-qt0-x22d.google.com [IPv6:2607:f8b0:400d:c0d::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id D95F813464A for <jmap@ietf.org>; Mon,  2 Oct 2017 06:59:59 -0700 (PDT)
Received: by mail-qt0-x22d.google.com with SMTP id e19so3455959qta.13 for <jmap@ietf.org>; Mon, 02 Oct 2017 06:59:59 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=7luvzOubApq/lnJVO/lh4iX502KkieLAd/5rsIc+nOc=; b=CPdjChOyszfUAfRs+ZzVAuYxVWPE5neH2sXJjhXCn3w11pqArpAHbp7N723YeDw5Oc e4Hd8vJibyqa+FWZ4AhKoLT1LdnKwLeKCPZanCBJNnlgnaZZzZmI6SfMYkql+Ih4+deq tJSviS1ON9pDx08kdxB6kLcw1YUKv39qNAeaxBTAyH2mDuPUkhqWInYDFgE4EADkazSn PRL1S0cIraYgdsnLdI2DNXdtbjV3zFciix+6QGTICj3wmVLeW+W/Zo4YKSGrb5jeHYEi r+QeYz9V2qNl2pC0TW0E2at7Btol7H5u+vHZHIdFoI0mVKGhyO3vTxWI1YycwbVjrVUk PfXA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=7luvzOubApq/lnJVO/lh4iX502KkieLAd/5rsIc+nOc=; b=VsoH9LOzQoIiHVRXCrkPD71AQX6744tvtX37Pm6peOZfFA9XMHV7cNdL7QxC5K/bqR UNaSAvz+ikEfChia4A30OSaga3edwNkgFtzLFUlpe6E+5LFHdCTZQ6Rm6zi0/X9Y0ojB pya6OXeC5PqHhzO0KYBDdmPVPwUFY67rtO3zSQPxpygjBOizKpPG9K94gQ9fpQTb/ckr MCMvqXH3qkFLVLbvA8usEhEAvuGSeAGGBGdo788ra6zEzhW7ksA8ug4HOqymnUC7Po1V BLMrTnf1Fbph1FUnIBUF09DZ/LZfCMVKuzr4UpkA4Ngo98crjZGytlHOOg1uzRmn8wzO tlJQ==
X-Gm-Message-State: AMCzsaVj37dOhZdnapedI23jWOXyM/b+8mprugnAfJEC0aysKy8R9mlw NsNwpTfIlXzhAMbSyOYMuaK4RrA6kKQIlsjG1pmCnA==
X-Google-Smtp-Source: AOwi7QBdH//CSpLubaKnd15MIdD/XVAAaAY1yMrF9ZD2c0fcPARh4Ejv/uWy4FfhmcijITVx6MUpVQLLlgS0BXXpU40=
X-Received: by 10.200.15.8 with SMTP id e8mr19978315qtk.315.1506952798690; Mon, 02 Oct 2017 06:59:58 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.140.18.84 with HTTP; Mon, 2 Oct 2017 06:59:58 -0700 (PDT)
In-Reply-To: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com>
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com>
From: Bart Schaefer <schaefer@brasslantern.com>
Date: Mon, 2 Oct 2017 06:59:58 -0700
Message-ID: <CAH+w=7bjcu1E9=PwEhfwBU6iWTemCn=bJ5yuExveXndKjiE4Xg@mail.gmail.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: text/plain; charset="UTF-8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/oBJmKcy4PU1nkrSC_Etf71Vu7LY>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 14:00:01 -0000

On Sun, Oct 1, 2017 at 4:50 PM, Neil Jenkins <neilj@fastmailteam.com> wrote:
>
> If instead we had a generic way to refer to the result of a previous method

Doesn't that violate HTTP statelessness?

Bron's subsequent suggestion is much more RESTy.


From nobody Mon Oct  2 07:15:54 2017
Return-Path: <brong@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6A9E4134304 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 07:15:53 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.719
X-Spam-Level: 
X-Spam-Status: No, score=-2.719 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=mK1vUi98; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=Z4yKvioA
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 wxStKw0LfXC8 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 07:15:51 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A07D81345D4 for <jmap@ietf.org>; Mon,  2 Oct 2017 07:15:51 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id E1DFE2277C for <jmap@ietf.org>; Mon,  2 Oct 2017 10:15:50 -0400 (EDT)
Received: from web5 ([10.202.2.215]) by compute6.internal (MEProxy); Mon, 02 Oct 2017 10:15:50 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=kr7a8Ar2TIkgObbsF VOAzCD0988jej1yhpKAD2AwigA=; b=mK1vUi98VKhYXHKaS5FUIHWdMkS2TnlQ6 8G4SLEyhFnA/qacNcJhcGtRYBjB15D1PtUkgxeWq5IdQw4ielz945sA7bkkDeKwA GBR4PHIpGuyAIeO9iZpcSEak8u2bnoc0va2MzQ/DgPCtRilNctViJ/BHWlWqc8XK KOjsN7B9krssGpw9ykxw6acztcn9XYz0gv3kQgrc/5+2QGCRETc+qmpqm7kXlARS apqBm9u/6++KOnBts9N90W/Hy8OXCyMakNrybbgZN384TC7J6i0NW5lUsFMT2ZFD nwgwf5Lu4xDUiHagVWKlv3bYhDYdsHaG0NvOEub5FO2UdQCcxn0Wg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=kr7a8A r2TIkgObbsFVOAzCD0988jej1yhpKAD2AwigA=; b=Z4yKvioAVJb4Sem3NSdq7d bcE6aE82Fup0k6NIWxm1Qjwx5NkJxZcf3jFLkNenoM/VLw9qzEd1iBo5Nd7XpRVr buBkP4kWJ3sVolLwB34SO0qhQUnh7v5Fft+AXYjQPHcG6oFjXJC0TKpxCttPqgHg /Rm+B6EZF4QyfWxQYJdSoMwUigNBsFiY7WqQzJJKvS31cqoENTKk6JcPr3XpORJI qqjJklEa5559CtDFIh3ZZeokXEFVZF/PejaWvHN3nqAlXd3fQeeKBTyeGTjnDZXJ 7wuwnnNVWWpqQtk9WApMCQrpiGcGSjerOrnssiPONZUYuu+a1fuahHX72Ky8iJdA ==
X-ME-Sender: <xms:FkrSWWe_p-hhEQQAwoK1-pGyq6m0jo-aDVAxXB6l1V70x7vBxJ0wkg>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id B849E9E304; Mon,  2 Oct 2017 10:15:50 -0400 (EDT)
Message-Id: <1506953750.111547.1125055112.0C8A0171@webmail.messagingengine.com>
From: Bron Gondwana <brong@fastmailteam.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_15069537501115473"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-6cb49228
In-Reply-To: <CAH+w=7bjcu1E9=PwEhfwBU6iWTemCn=bJ5yuExveXndKjiE4Xg@mail.gmail.com>
Date: Mon, 02 Oct 2017 10:15:50 -0400
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com> <CAH+w=7bjcu1E9=PwEhfwBU6iWTemCn=bJ5yuExveXndKjiE4Xg@mail.gmail.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/0AugSTIlpQtf9vURhEI5qX36HBA>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 14:15:53 -0000

This is a multi-part message in MIME format.

--_----------=_15069537501115473
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

On Mon, 2 Oct 2017, at 09:59, Bart Schaefer wrote:
> On Sun, Oct 1, 2017 at 4:50 PM, Neil Jenkins <neilj@fastmailteam.com>> wrote:
>> 
>> If instead we had a generic way to refer to the result of a
>> previous method> 
> Doesn't that violate HTTP statelessness?
> 
> Bron's subsequent suggestion is much more RESTy.

JMAP methods are multiple method calls batched together, so a single
HTTP request can refer to results created by the previous method within
the same request.
The state already needs to be kept for ids of created resources from
previous methods to allow ID backreferences, so this is just extending
it to keep data (which will also be ID lists, realistically) from
previous get methods as well.
As a server implementer, there's very little difference in what I'd be
doing to support this - the fetchRecords in the current draft is also
implemented as a called to the next getFoos with the ids parameter pre-
filled from a previous dataset.
Bron.


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



--_----------=_15069537501115473
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style="font-family:Arial;">On Mon, 2 Oct 2017, at 09:59, Bart Schaefer wrote:<br></div>
<blockquote type="cite"><div>On Sun, Oct 1, 2017 at 4:50 PM, Neil Jenkins &lt;<a href="mailto:neilj@fastmailteam.com">neilj@fastmailteam.com</a>&gt;<br></div>
<div>wrote:<br></div>
<blockquote><div><br></div>
<div>If instead we had a generic way to refer to the result of a previous method<br></div>
</blockquote><div><br></div>
<div>Doesn't that violate HTTP statelessness?<br></div>
<div><br></div>
<div>Bron's subsequent suggestion is much more RESTy.<br></div>
</blockquote><div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">JMAP methods are multiple method calls batched together, so a single HTTP request can refer to results created by the previous method within the same request.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">The state already needs to be kept for ids of created resources from previous methods to allow ID backreferences, so this is just extending it to keep data (which will also be ID lists, realistically) from previous get methods as well.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">As a server implementer, there's very little difference in what I'd be doing to support this - the fetchRecords in the current draft is also implemented as a called to the next getFoos with the ids parameter pre-filled from a previous dataset.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Bron.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;"><br></div>
<div id="sig56629417"><div class="signature">--<br></div>
<div class="signature">&nbsp; Bron Gondwana, CEO, FastMail Pty Ltd<br></div>
<div class="signature">&nbsp; brong@fastmailteam.com<br></div>
<div class="signature"><br></div>
</div>
<div style="font-family:Arial;"><br></div>
</body>
</html>

--_----------=_15069537501115473--


From nobody Mon Oct  2 11:25:36 2017
Return-Path: <alexey.melnikov@isode.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 85872134707 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 11:25:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.999
X-Spam-Level: 
X-Spam-Status: No, score=-1.999 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, 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 AJzpIFOyYiiL for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 11:25:32 -0700 (PDT)
Received: from statler.isode.com (Statler.isode.com [62.232.206.189]) by ietfa.amsl.com (Postfix) with ESMTP id 4F04813471A for <jmap@ietf.org>; Mon,  2 Oct 2017 11:25:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1506968701; d=isode.com; s=june2016; i=@isode.com; bh=D/jsQmURwuySZ0FnK/av1fyt/d1bE1o8ZLMGlcdknAM=; 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=BPPXj+a8VAGfzbv7vxezkBLVgw3Ry7cKCZiB5yEJfC4dypoxZ60QFRyC0OxTinrwWOTooh IKKKy0LQFXxQ4lNUjNwBdysoSV1MkJcXMQOmjlcBhjc7j5hEiDWsSFxvHnrerR1g/iQIpm hmHH7xrKkRXSluQWYxtu9uNetR22gAc=;
Received: from [172.20.1.215] (dhcp-215.isode.net [172.20.1.215])  by statler.isode.com (submission channel) via TCP with ESMTPSA  id <WdKEfABFTjXF@statler.isode.com>; Mon, 2 Oct 2017 19:25:01 +0100
From: Alexey Melnikov <alexey.melnikov@isode.com>
To: Neil Jenkins <neilj@fastmailteam.com>, IETF JMAP Mailing List <jmap@ietf.org>
References: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com>
Message-ID: <52a1d603-f004-99e4-f181-56b004018a14@isode.com>
Date: Mon, 2 Oct 2017 19:24:28 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0
In-Reply-To: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="------------221894165D3D6FE842626939"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/H-JehJJtfJ-zdVJj05jGjYglN88>
Subject: Re: [Jmap] Mailbox#role vs IMAP SPECIAL-USE
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 18:25:34 -0000

This is a multi-part message in MIME format.
--------------221894165D3D6FE842626939
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Hi Neil,


On 02/10/2017 04:05, Neil Jenkins wrote:
> This is in reference to GitHub issue #62 
> <https://github.com/jmapio/jmap/issues/62>.
>
> The role attribute on the Mailbox object in JMAP is equivalent to the 
> RFC6154 <https://tools.ietf.org/html/rfc6154> SPECIAL-USE flag in 
> IMAP, however there are some semantic differences so I'd like to 
> solicit some opinions on what to do. Here are all the differences I 
> can see:
>
>  1. The value is singular in JMAP, but you can have multiple
>     special-use attributes on the same mailbox in IMAP.
>  2. The value is unique in JMAP (you cannot have two "Sent"
>     mailboxes), but duplicates are allowed in IMAP.
>  3. The value is immutable in JMAP, but can be modified after mailbox
>     creation in IMAP.
>
Just to double check: by immutable you mean that a special use attribute 
is set upon mailbox creation and can't be changed after that?

> In addition, JMAP has two roles that don't exist in SPECIAL-USE:
>
>   * /inbox/ (It's a hard-coded name in IMAP so you didn't need an
>     attribute).
>   * /templates/ (Drafts that should be used as the basis for new
>     drafts but not themselves modified.)
>
>
> SPECIAL-USE has two attributes that aren't in JMAP:
>
>   * \All
>   * \Flagged
>
>
> These are both virtual, and aren't necessary in JMAP because 
> getMessageList allows you to fetch all/flagged across the whole 
> account without requiring a special mailbox fox it.
Agreed, that the last 2 are not needed in JMAP.

> So, what to do. Special-use allows servers to enforce the three 
> differences in semantics that JMAP specifies (singular, unique, 
> immutable), so one option is to leave the semantics as is, and IMAP 
> servers can just enforce them over IMAP as well to keep a consistent 
> view. Alternatively we can relax the restrictions in JMAP, but I think 
> these are useful properties and I wonder whether there are people 
> actually making use of the relaxed options at the moment with IMAP?
I think keeping JMAP restrictions is Ok. From my experience writing an 
IMAP client that uses SPECIAL-USE, uniqueness is useful (otherwise I 
have to pick one of the values in the IMAP client). I don't find lack of 
singularity to be an issue, but I can live with it as a restriction. 
Immutability is also Ok, although I am Ok with adding special use to an 
existing mailbox. (Isode's IMAP server would allow for that).

> Regarding the different roles/attributes, there's RFC6154 didn't 
> create an IANA registry, so it's not extensible without a whole new 
> RFC. I'm inclined to just include a mapping in an advice to 
> implementors section.
I think we should create a registry. But this can be done in the EXTRA 
WG, if you don't want to do that in your draft.

> Any other opinions on this?
>
Best Regards,
Alexey


--------------221894165D3D6FE842626939
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Neil,<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 02/10/2017 04:05, Neil Jenkins
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com">
      <title></title>
      <div>This is in reference to GitHub issue <a
          href="https://github.com/jmapio/jmap/issues/62"
          moz-do-not-send="true">#62</a>.<br>
      </div>
      <div><br>
      </div>
      <div>The role attribute on the Mailbox object in JMAP is
        equivalent to the <a href="https://tools.ietf.org/html/rfc6154"
          moz-do-not-send="true">RFC6154</a> SPECIAL-USE flag in IMAP,
        however there are some semantic differences so I'd like to
        solicit some opinions on what to do. Here are all the
        differences I can see:<br>
      </div>
      <div><br>
      </div>
      <ol>
        <li>The value is singular in JMAP, but you can have multiple
          special-use attributes on the same mailbox in IMAP.<br>
        </li>
        <li>The value is unique in JMAP (you cannot have two "Sent"
          mailboxes), but duplicates are allowed in IMAP.<br>
        </li>
        <li>The value is immutable in JMAP, but can be modified after
          mailbox creation in IMAP.<br>
        </li>
      </ol>
    </blockquote>
    Just to double check: by immutable you mean that a special use
    attribute is set upon mailbox creation and can't be changed after
    that?<br>
    <br>
    <blockquote type="cite"
cite="mid:1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com">
      <div>In addition, JMAP has two roles that don't exist in
        SPECIAL-USE:<br>
      </div>
      <div><br>
      </div>
      <ul>
        <li><i>inbox</i> (It's a hard-coded name in IMAP so you didn't
          need an attribute).<br>
        </li>
        <li><i>templates</i> (Drafts that should be used as the basis
          for new drafts but not themselves modified.)<br>
        </li>
      </ul>
      <div><br>
      </div>
      <div>SPECIAL-USE has two attributes that aren't in JMAP:<br>
      </div>
      <div><br>
      </div>
      <ul>
        <li>\All<br>
        </li>
        <li>\Flagged<br>
        </li>
      </ul>
      <div><br>
      </div>
      <div>These are both virtual, and aren't necessary in JMAP because
        getMessageList allows you to fetch all/flagged across the whole
        account without requiring a special mailbox fox it.<br>
      </div>
    </blockquote>
    Agreed, that the last 2 are not needed in JMAP.<br>
    <br>
    <blockquote type="cite"
cite="mid:1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com">
      <div> </div>
      <div>So, what to do. Special-use allows servers to enforce the
        three differences in semantics that JMAP specifies (singular,
        unique, immutable), so one option is to leave the semantics as
        is, and IMAP servers can just enforce them over IMAP as well to
        keep a consistent view. Alternatively we can relax the
        restrictions in JMAP, but I think these are useful properties
        and I wonder whether there are people actually making use of the
        relaxed options at the moment with IMAP?<br>
      </div>
    </blockquote>
    I think keeping JMAP restrictions is Ok. From my experience writing
    an IMAP client that uses SPECIAL-USE, uniqueness is useful
    (otherwise I have to pick one of the values in the IMAP client). I
    don't find lack of singularity to be an issue, but I can live with
    it as a restriction. Immutability is also Ok, although I am Ok with
    adding special use to an existing mailbox. (Isode's IMAP server
    would allow for that).<br>
    <br>
    <blockquote type="cite"
cite="mid:1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com">
      <div>Regarding the different roles/attributes, there's RFC6154
        didn't create an IANA registry, so it's not extensible without a
        whole new RFC. I'm inclined to just include a mapping in an
        advice to implementors section.<br>
      </div>
    </blockquote>
    I think we should create a registry. But this can be done in the
    EXTRA WG, if you don't want to do that in your draft.<br>
    <br>
    <blockquote type="cite"
cite="mid:1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com">
      <div>Any other opinions on this?<br>
      </div>
      <br>
    </blockquote>
    Best Regards,<br>
    Alexey<br>
    <br>
  </body>
</html>

--------------221894165D3D6FE842626939--


From nobody Mon Oct  2 11:36:14 2017
Return-Path: <brong@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C0199134724 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 11:36:12 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.719
X-Spam-Level: 
X-Spam-Status: No, score=-2.719 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=fMtPSKh0; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=cBbaVDi3
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 2mel3m186K7u for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 11:36:09 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6133B134749 for <jmap@ietf.org>; Mon,  2 Oct 2017 11:34:32 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id A0170229A5 for <jmap@ietf.org>; Mon,  2 Oct 2017 14:34:31 -0400 (EDT)
Received: from web1 ([10.202.2.211]) by compute6.internal (MEProxy); Mon, 02 Oct 2017 14:34:31 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=5mGD3sFmLuUjEkivb 8xK9mKfv50hIMKerQhSx12zYb4=; b=fMtPSKh0v6lwP7/MzdX0VuFakulWJCnEi 1reUc6Y6lKKTsRecnBgjg32gy/RKREwKlZBGymyu+EH07fe1+hdVkVlYyHsCMuRo trR97PRy/ULp1AMEY+WLgkrh+Q8eaU+0QxZt3rO0TfAw0eCLJ84VtxPQopLGabZF oqnBPvg/ZgHqMtYK05bQLPqec5I5kOGrNAxjDDKaDThym/wsBqt/jxFrelRpdmeW qBW7ufIUXZix2RYJptaLer/1N6GzksLqaahGpjIw+1zX2a+DbJI0G98CF8cSYp4u 0y5wH8H8dUOSedsDj3J3sPQ/uk4fxXYo2akpF53/zLf6NcQ95zZtQ==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=5mGD3s FmLuUjEkivb8xK9mKfv50hIMKerQhSx12zYb4=; b=cBbaVDi3PvFI+DwLqZggTq M5srfWar5Ea1RPhmldqi4qkCZywgRxoAZ5VNMsEnesuXkz2bkk7Y0lvP7DYcY9JD z9D4bZGpJsgZZnO6Uziq+vc3dbr5afcHgaQGhtd91oO6Mj75hsW8SOBj8ZC/KnFj 07IFEwmqe1SqWzwlvdL6Ea/KUBj55x6AcOAj+PjIstFqd8lKDO6sbmMENE0HyX06 wmxajJHvf1C9izbnL1JVgnBPW2u0NNFji4w+j5qw1l5CCL/OjOS3mtbNwaxLLujY mJO79rxZO0n0tvuo/WsYNGp6Tdo8UDSvDRjBn5f0rke59urcxKktUoAGHdkErckw ==
X-ME-Sender: <xms:t4bSWSDhV9ocH8c0NHMTIS1n_DZrV9GHiE0fg6bJNGPfiZX0yMePAw>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 7F0D395799; Mon,  2 Oct 2017 14:34:31 -0400 (EDT)
Message-Id: <1506969271.2787352.1125373784.1C3CF907@webmail.messagingengine.com>
From: Bron Gondwana <brong@fastmailteam.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150696927127873520"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-6cb49228
In-Reply-To: <52a1d603-f004-99e4-f181-56b004018a14@isode.com>
References: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com> <52a1d603-f004-99e4-f181-56b004018a14@isode.com>
Date: Mon, 02 Oct 2017 14:34:31 -0400
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/2tdfAcXnC7nV_IvFGxPTJEd9Qgk>
Subject: Re: [Jmap] Mailbox#role vs IMAP SPECIAL-USE
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 02 Oct 2017 18:36:13 -0000

This is a multi-part message in MIME format.

--_----------=_150696927127873520
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

On Mon, 2 Oct 2017, at 14:24, Alexey Melnikov wrote:
> Just to double check: by immutable you mean that a special use
> attribute is set upon mailbox creation and can't be changed
> after that?

>  So, what to do. Special-use allows servers to enforce the three
>  differences in semantics that JMAP specifies (singular, unique,
>  immutable), so one option is to leave the semantics as is, and IMAP
>  servers can just enforce them over IMAP as well to keep a
>  consistent view. Alternatively we can relax the restrictions in
>  JMAP, but I think these are useful properties and I wonder whether
>  there are people actually making use of the relaxed options at the
>  moment with IMAP?
I changed the Cyrus server to only allow a single mailbox with each Special-
use value.
Further more, you can only create them or set those special-use
annotations on mailboxes which are at the top level - this is because
people kept dragging their Archive folder into their Trash or similar
nonsense.  Apparently some clients make this far too easy to do.  Then
other clients would notice that the folder was missing and re-create it
(complete with the use) because select-by-use is not a thing.
Oh yeah - finally, you can't delete a folder with a special-use (though
you can remove the use and THEN delete it)
> I think keeping JMAP restrictions is Ok. From my experience writing an
> IMAP client that uses SPECIAL-USE, uniqueness is useful (otherwise I
> have to pick one of the values in the IMAP client). I don't find lack
> of singularity to be an issue, but I can live with it as a
> restriction. Immutability is also Ok, although I am Ok with adding
> special use to an existing mailbox. (Isode's IMAP server would allow
> for that).
Cyrus allows adding the special-use later as well, subject to the above
mentioned restrictions.
>> Regarding the different roles/attributes, there's RFC6154 didn't
>> create an IANA registry, so it's not extensible without a whole new
>> RFC. I'm inclined to just include a mapping in an advice to
>> implementors section.> I think we should create a registry. But this can be done in the EXTRA
> WG, if you don't want to do that in your draft.
I agree that EXTRA is the right place for this.

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



--_----------=_150696927127873520
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style="font-family:Arial;">On Mon, 2 Oct 2017, at 14:24, Alexey Melnikov wrote:<br></div>
<blockquote type="cite"><p>Just to double check: by immutable you mean that a special use
    attribute is set upon mailbox creation and can't be changed after
    that? <br></p></blockquote><div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;"><br></div>
<blockquote type="cite"><div style="font-family:Arial;"> So, what to do. Special-use allows servers to enforce the
        three differences in semantics that JMAP specifies (singular,
        unique, immutable), so one option is to leave the semantics as
        is, and IMAP servers can just enforce them over IMAP as well to
        keep a consistent view. Alternatively we can relax the
        restrictions in JMAP, but I think these are useful properties
        and I wonder whether there are people actually making use of the
        relaxed options at the moment with IMAP?<br></div>
</blockquote><div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">I changed the Cyrus server to only allow a single mailbox with each Special-use value.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Further more, you can only create them or set those special-use annotations on mailboxes which are at the top level - this is because people kept dragging their Archive folder into their Trash or similar nonsense.&nbsp; Apparently some clients make this far too easy to do.&nbsp; Then other clients would notice that the folder was missing and re-create it (complete with the use) because select-by-use is not a thing.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Oh yeah - finally, you can't delete a folder with a special-use (though you can remove the use and THEN delete it)<br></div>
<div style="font-family:Arial;"><br></div>
<blockquote type="cite"><div style="font-family:Arial;">I think keeping JMAP restrictions is Ok. From my experience writing
    an IMAP client that uses SPECIAL-USE, uniqueness is useful
    (otherwise I have to pick one of the values in the IMAP client). I
    don't find lack of singularity to be an issue, but I can live with
    it as a restriction. Immutability is also Ok, although I am Ok with
    adding special use to an existing mailbox. (Isode's IMAP server
    would allow for that).<br></div>
</blockquote><div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Cyrus allows adding the special-use later as well, subject to the above mentioned restrictions.<br></div>
<div style="font-family:Arial;"><br></div>
<blockquote type="cite"><blockquote type="cite" cite="mid:1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com"><div>Regarding the different roles/attributes, there's RFC6154
        didn't create an IANA registry, so it's not extensible without a
        whole new RFC. I'm inclined to just include a mapping in an
        advice to implementors section.<br></div>
</blockquote><div style="font-family:Arial;">I think we should create a registry. But this can be done in the
    EXTRA WG, if you don't want to do that in your draft. <br></div>
</blockquote><div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">I agree that EXTRA is the right place for this.<br></div>
<div style="font-family:Arial;"><br></div>
Bron.<br><div id="sig56629417"><div class="signature">--<br></div>
<div class="signature">&nbsp; Bron Gondwana, CEO, FastMail Pty Ltd<br></div>
<div class="signature">&nbsp; brong@fastmailteam.com<br></div>
<div class="signature"><br></div>
</div>
<div style="font-family:Arial;"><br></div>
</body>
</html>

--_----------=_150696927127873520--


From nobody Mon Oct  2 17:54:12 2017
Return-Path: <chris.newman@oracle.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 48B161342EE for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 17:54:10 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.01
X-Spam-Level: 
X-Spam-Status: No, score=-5.01 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-2.8, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 13k-FeCoVvp6 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 17:54:07 -0700 (PDT)
Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7CD0A1201F8 for <jmap@ietf.org>; Mon,  2 Oct 2017 17:54:07 -0700 (PDT)
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v930s3tg029937 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Oct 2017 00:54:04 GMT
Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v930s3IB015196 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Oct 2017 00:54:03 GMT
Received: from abhmp0017.oracle.com (abhmp0017.oracle.com [141.146.116.23]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id v930s2uA031438; Tue, 3 Oct 2017 00:54:02 GMT
Received: from [10.145.239.184] (/10.145.239.184) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 02 Oct 2017 17:54:02 -0700
From: "Chris Newman" <chris.newman@oracle.com>
To: "Neil Jenkins" <neilj@fastmailteam.com>
Cc: "IETF JMAP Mailing List" <jmap@ietf.org>
Date: Mon, 02 Oct 2017 17:54:00 -0700
Message-ID: <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com>
In-Reply-To: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com>
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=_MailMate_71703970-9151-4D82-9D5E-3D0DE88B167C_="
Embedded-HTML: [{"HTML":[1834, 12392], "plain":[493, 8939], "uuid":"4E439EDF-865B-4977-BE0A-DAD7129B8743"}]
X-Mailer: MailMate (1.9.7r5419)
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/34pCuZqPXHXgiKIsxl3ZQ6FMVHc>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2017 00:54:10 -0000

--=_MailMate_71703970-9151-4D82-9D5E-3D0DE88B167C_=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable

RFC 5182 is useful to save round-trips. I support the concept in JMAP. =

I'd be careful about over-generalizing the back-reference model as that =

seems like the type of over-generalization that can make server =

implementations unnecessarily complex without significant added benefit. =

Also, RFC 5182 includes a mechanism that avoids sending data to the =

client that the client doesn't need, which may be worth thinking about =

in this case.

		- Chris

On 1 Oct 2017, at 16:50, Neil Jenkins wrote:

> Hi all,
> This week I have been doing a lot of copy editing to remove a huge
> amount of duplicative text, which made the spec harder to read, and =

> more
> likely to contain inconsistencies between methods. My goal is that the
> JMAP Mail spec should just be:
>
>
>  1. The data type definitions
>  2. Which standard method types can be used with each data type (e.g.
>     the Thread object is not mutable directly by the client so there =

> is
>     no setThreads method).
>  3. Any changes to the standard method for that particular type (extra
>     arguments etc.)This makes the spec *much* shorter, more =

> understandable and easier to
> implement. Doing this also makes it easier to see where methods for a
> particular type deviate from the =E2=80=9Cstandard=E2=80=9D JMAP get/se=
t calls. As =

> I
> looked at this, I realised most of the inconsistencies were in the
> =E2=80=9CfetchRecords=E2=80=9D type arguments, used to reduce round tri=
ps.If =

> instead we had a generic way to refer to the result of a previous
> method call in the arguments of a subsequent request, we can eliminate
> the special cases, and provide more power. Much like the unix =

> composable-small-
> things philosophy.Here=E2=80=99s a proposal of how this could work:
>
>
> Any argument name may be prefixed with a =E2=80=98#=E2=80=99. This mean=
s the =

> argument
> value is a back-reference to the output of a previous method call =

> rather
> than the real value. The value is a *ResultReference* object as
> described below. When processing a method call, the server MUST first
> check the arguments object for any names beginning with =E2=80=9C#=E2=80=
=9D. If =

> found,
> the back reference should be resolved and the value used as the =

> =E2=80=9Creal=E2=80=9D
> argument. The method is then processed as normal.A *ResultReference* =

> object has the following properties:
>
>
>  * *resultOf*: String The client id of the method call to get the
>    result from (the string given as the third item in the array for a
>    method call).
>  * *path*: String A pointer into the arguments. This is an RFC6901 =

> JSON
>    Pointer, except it also allows the use of * to map through an array
>    (see description below).To resolve:
>
>
>  1. Find the first response with a client id identical to the =

> *resultOf*
>     property of the *ResultReference* in the array of outputs from
>     previously processed  method calls in the same request. If none,
>     evaluation fails.
>
>
>  2. If the response name is =E2=80=9Cerror=E2=80=9D, evaluation fails.
>
>
>  3. Apply the *path* to the arguments object of the response (the =

> second
>     item in the response array) following the RFC6901 JSON pointer
>     algorithm, except with the following addition in Section 4
>     (Evaluation):
>
>
> If the currently referenced value is a JSON array, the reference token
> may be exactly the single character *, making the new referenced value
> the result of applying the rest of the JSON pointer tokens to every =

> item
> in the array and returning the results in the same order in a new =

> array.
> If the result of applying the rest of the pointer tokens to a value =

> was
> itself an array, the items should be included individually in the =

> output
> array rather than including the array itself (i.e. the result is
> flattened).
>  4. If the type of the result is X, and the expected type of the
>     argument is an array of type X, wrap the result in an array with a
>     single item.As a simple example, suppose we have the following API =

> request:
>
>
> [[ "getMessageUpdates", { "sinceState": "abcdef" }, "t0" ], [
> "getMessages", { "#ids": { "resultOf": "t0", "path": "/changed" }
> }, "t1" ]]Now after executing the first method call the response array =

> is:
>
>
> [[ "messageUpdates", { "accountId": "1", "oldState": "abcdef",
> "newState": "123456", "hasMoreUpdates": false, "changed": [ "msg1",
> "msg4" ], "removed": [] }, "t0" ]]So to execute the getMessages call, =

> we look through the arguments and
> find there is one with a # prefix. To resolve this, we apply the
> algorithm above:
>
>
>  1. Find the first response with client id =E2=80=9Ct0=E2=80=9D. The =

> =E2=80=9CmessageUpdates=E2=80=9D
>     response fulfils this criterion.
>  2. Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=99=
s =

> messageUpdates=E2=80=9D, so
>     this is fine.
>  3. Apply the *path* as a JSON pointer to the arguments object. This
>     simply selects the =E2=80=9Cchanged=E2=80=9D property, so the resul=
t of =

> evaluating
>     is: [ "msg1", "msg4" ]The JMAP server now continues to process the =

> getMessages call as though
> the arguments were:
>
>
> { "ids": [ "msg1", "msg4" ] }Now a more complicated example: fetch the =

> =E2=80=9Cfrom=E2=80=9D/=E2=80=9Ddate=E2=80=9D/=E2=80=9Dsubject=E2=80=9D=

> for every message in the first 10 threads in the Inbox (sorted
> newest first):
>
>
> [[ "getMessageList", { "filter": { inMailbox: "id_of_inbox" }, "sort": =

> [
> "date desc" ], "collapseThreads": true, "position": 0, "limit": 10 },
> "t0" ], [ "getMessages", { "#ids": { "resultOf": "t0", "path": "/ids" =

> },
> "properties": [ "threadId" ] }, "t1" ], [ "getThreads", { "#ids": {
> "resultOf": "t1", "path": "/list/*/threadId" } }, "t2" ], [
> "getMessages", { "#ids": { "resultOf": "t2" "path": =

> "/list/*/messageIds"
> },  "properties": [ "from", "date", "subject" ] }, "t3" ]]After =

> executing the first 3 method calls the response array is:
>
>
> [[ "messageList", { "accountId": "1", "filter": { inMailbox:
> "id_of_inbox" }, "sort": [ "date desc" ], "collapseThreads": true,
> "state": "abcdefg", "canCalculateUpdates": true, "position": 0, =

> "total":
> 101, "ids": [ "msg1023", "msg223", "msg110", "msg93", "msg91", =

> "msg38",
> "msg36", "msg33", "msg11", "msg1" ] }, "t0" ], [ "messages", {
> "accountId": "1", "state": "123456", "list": [{ "id": "msg1023",
> "threadId": "trd194", }, { "id": "msg223", "threadId": "trd114" }, ...
> etc... ], "notFound": null }, "t1" ], [ "threads", { "accountId": "1",
> "state": "123456", "list": [{ "id: "trd194", "messageIds": [ =

> "msg1020",
> "msg1021", "msg1023" ] }, { "id: "trd114", "messageIds": [ "msg201",
> "msg223" ] }, ... etc... ], "notFound": null }, "t2" ]]So to execute =

> the final getMessages call, we look through the arguments
> and find there is one with a # prefix. To resolve this, we apply the
> algorithm:
>
>
>  1. Find the first response with client id =E2=80=9Ct2=E2=80=9D. The =E2=
=80=9Cthreads=E2=80=9D =

> response
>     fulfils this criterion.
>  2. Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=99=
s threads=E2=80=9D, so
>     this is fine.
>  3. Apply the *path* as a JSON pointer to the arguments object.
>     Token-by-token:
>    1. *list* =E2=80=93 get the array of thread objects
>    2. *** =E2=80=93 for each of the items in the array:
>      1. *messsageIds* =E2=80=93 get the array of message ids
>      2. Concatenate these into a single array of all the ids in
>         the result.The JMAP server now continues to process the =

> getMessages call as though
> the arguments were:
>
>
> { "ids": [ "msg1020", "msg1021", "msg1023", "msg201", "msg223", etc...
> ],    "properties": [ "from", "date", "subject" ] }For reference, in =

> case it=E2=80=99s clearer than my description, here=E2=80=99s a
> JavaScript implementation of the pointer resolution algorithm, with =

> the
> addition to RFC6901 clearly marked:
>
>
> function evaluatePointer ( value, pointer ) { if ( !pointer ) { return
> value; } if ( pointer.charAt( 0 ) !=3D=3D '/' ) { throw new Error( =

> 'Invalid
> pointer' ); } let token; let next =3D pointer.indexOf( '/', 1 ); if ( =

> next
> !=3D=3D -1 ) { token =3D pointer.slice( 1, next ); pointer =3D pointer.=
slice(
> next ); } else { token =3D pointer.slice( 1 ); pointer =3D ''; } token =
=3D
> token.replace( /~1/g, '/' ).replace( /~0/g, '~' ); if ( Array.isArray(
> value ) ) { if ( /^(?:0|[1-9][0-9]*)$/.test( token ) ) { return
> evaluatePointer( value[ parseInt( token, 10 ) ], pointer ); }  /* =

> start:
> the only bit that differs from RFC6901 */ if ( token =3D=3D=3D '*' ) { =
/* =

> Map
> values to pointer */ value =3D value.map( item =3D> evaluatePointer( it=
em,
> pointer ) ); /* Flatten output */ return value.reduce( ( output, item =

> )
> =3D> { if ( !Array.isArray( item ) ) { item =3D [ item ]; } return
> output.concat( item ); }, [] ); } /* end */ } else if ( value !=3D=3D n=
ull
> && typeof value =3D=3D=3D 'object' ) { return evaluatePointer( value[ t=
oken =

> ],
> pointer ); } throw new Error( 'Evaluation failed' ); }So:
>  * What do people think of the result-reference concept to replace the
>    fetchRecords etc. arguments and reduce the amount of =

> special-casing?
>  * Presuming agreement this is a good idea, is this syntax good? If =

> not,
>    please suggest an alternative! (I've tried to reuse RFC6901 as much
>    as possible as the only relevant standard I'm aware of, but if you
>    know of another standard that's more suitable please let me know).
> The full change proposal can be seen in the pull request at
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_jmapi=
o_jmap_pull_148&d=3DDwIFaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK1=
0&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCtS0Ut-8SOYtTU2EShd=
7Qt1Wa66iG5eF637_nimF-OM&s=3D8kEj1hBS8M2M_XaHaB3x831iSoNkmvDpY8cNsW5gYiA&=
e=3D =

> .
> Cheers,
> Neil.


> _______________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mai=
lman_listinfo_jmap&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057S=
bK10&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCtS0Ut-8SOYtTU2E=
Shd7Qt1Wa66iG5eF637_nimF-OM&s=3Dh4UnZPECDHeyTajis8WzolSW6T9P-tPU7kMtP8abZ=
cM&e=3D

--=_MailMate_71703970-9151-4D82-9D5E-3D0DE88B167C_=
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"=
>
<style>
div.plaintext { white-space: normal; }
body { font-family: sans-serif; }
div.plaintext h1 { font-size: 1.4em; }
div.plaintext h2 { font-size: 1.2em; }
div.plaintext h3 { font-size: 1.1em; }
blockquote.embedded,div.plaintext blockquote { margin: 0 0 5px; padding-l=
eft: 5px; border-left: 2px solid #777777; color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquo=
te { border-left-color: #999999; color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext=
 blockquote blockquote blockquote { border-left-color: #BBBBBB; color: #B=
BBBBB; }
div.plaintext a { color: #3983C4 }
blockquote.embedded,div.plaintext blockquote a { color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquo=
te a { color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext=
 blockquote blockquote blockquote a { color: #BBBBBB; }
div.plaintext math[display=3D"inline"] > mrow { padding:5px; }
div.plaintext div.footnotes li p { margin: 0.2em 0; }
</style>
</head>
<body>
<div class=3D"plaintext"><p dir=3D"auto">RFC 5182 is useful to save round=
-trips. I support the concept in JMAP. I&#39;d be careful about over-gene=
ralizing the back-reference model as that seems like the type of over-gen=
eralization that can make server implementations unnecessarily complex wi=
thout significant added benefit. Also, RFC 5182 includes a mechanism that=
 avoids sending data to the client that the client doesn&#39;t need, whic=
h may be worth thinking about in this case.</p>
<p dir=3D"auto">		- Chris</p>
<p dir=3D"auto">On 1 Oct 2017, at 16:50, Neil Jenkins wrote:</p>
</div>
<blockquote class=3D"embedded">
<div>Hi all,<br></div>
<p>This week I have been doing a lot of copy editing to remove a huge amo=
unt of duplicative text, which made the spec harder to read, and more lik=
ely to contain inconsistencies between methods. My goal is that the JMAP =
Mail spec should just be:<br></p><ol><li>The data type definitions<br></l=
i><li><div>Which standard method types can be used with each data type (e=
=2Eg. the Thread<br></div>
<div>object is not mutable directly by the client so there is no setThrea=
ds method).<br></div>
</li><li><div>Any changes to the standard method for that particular type=
 (extra arguments<br></div>
<div>etc.)<br></div>
</li></ol><p>This makes the spec <i>much</i> shorter, more understandable=
 and easier to implement. Doing this also makes it easier to see where me=
thods for a particular type deviate from the =E2=80=9Cstandard=E2=80=9D J=
MAP get/set calls. As I looked at this, I realised most of the inconsiste=
ncies were in the =E2=80=9CfetchRecords=E2=80=9D type arguments, used to =
reduce round trips.<br></p><p>If instead we had a generic way to refer to=
 the result of a previous method call in the arguments of a subsequent re=
quest, we can eliminate the special cases, and provide more power. Much l=
ike the unix composable-small-things philosophy.<br></p><p>Here=E2=80=99s=
 a proposal of how this could work:<br></p><p>Any argument name may be pr=
efixed with a =E2=80=98#=E2=80=99. This means the argument value is a bac=
k-reference to the output of a previous method call rather than the real =
value. The value is a <i>ResultReference</i> object as described below. W=
hen processing a method call, the server MUST first check the arguments o=
bject for any names beginning with =E2=80=9C#=E2=80=9D. If found, the bac=
k reference should be resolved and the value used as the =E2=80=9Creal=E2=
=80=9D argument. The method is then processed as normal.<br></p><p>A <b>R=
esultReference</b> object has the following properties:<br></p><ul><li><d=
iv><b>resultOf</b>: <code>String</code><br></div>
<div>The client id of the method call to get the result from (the string =
given as the third item in the array for a method call).<br></div>
</li><li><div><b>path</b>: <code>String</code><br></div>
<div>A pointer into the arguments. This is an RFC6901 JSON Pointer, excep=
t it also allows the use of <code>*</code> to map through an array (see d=
escription below).<br></div>
</li></ul><p>To resolve:<br></p><ol><li><p>Find the first response with a=
 client id identical to the <i>resultOf</i>&nbsp;<span class=3D"font" sty=
le=3D"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;=
, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid S=
ans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif">property of the=
 </span><i style=3D"font-family: -apple-system, BlinkMacSystemFont, &quot=
;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;=
, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif; =
letter-spacing: -0.1px;">ResultReference</i><span class=3D"font" style=3D=
"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Rob=
oto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&q=
uot;, &quot;Helvetica Neue&quot;, Arial, sans-serif"> in the array of out=
puts from previously processed  method calls in the same request. If none=
, evaluation fails.</span><br></p></li><li><p>If the response name is =E2=
=80=9Cerror=E2=80=9D, evaluation fails.<br></p></li><li><p>Apply the <i>p=
ath</i> to the arguments object of the response (the second item in&nbsp;=
<span class=3D"font" style=3D"font-family:-apple-system, BlinkMacSystemFo=
nt, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira S=
ans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;, Arial, san=
s-serif">the response array) following the RFC6901 JSON pointer algorithm=
, except with the following addition in Section 4 (Evaluation):<br></span=
></p><div>If the currently referenced value is a JSON array, the referenc=
e token may&nbsp;<span class=3D"font" style=3D"font-family:-apple-system,=
 BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantar=
ell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&=
quot;, Arial, sans-serif">be exactly the single character </span><code st=
yle=3D"color: rgb(31, 31, 31); font-size: 13px; letter-spacing: -0.1px; f=
ont-style: normal; font-variant-ligatures: normal; font-variant-caps: nor=
mal; font-weight: normal;">*</code><span class=3D"font" style=3D"font-fam=
ily:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxyg=
en, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &qu=
ot;Helvetica Neue&quot;, Arial, sans-serif">, making the new referenced v=
alue the result of applying the rest of the JSON pointer tokens to every =
item in the array and returning the results in the same order in a new ar=
ray. If the result of applying the rest of the pointer tokens to a value =
was itself an array, the items should be included individually in the out=
put array rather than including the array itself (i.e. the result is flat=
tened).</span><br></div>
</li><li><p>If the type of the result is X, and the expected type of the =
argument is an&nbsp;<span class=3D"font" style=3D"font-family:-apple-syst=
em, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Can=
tarell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Ne=
ue&quot;, Arial, sans-serif">array of type X, wrap the result in an array=
 with a single item.</span><br></p></li></ol><p>As a simple example, supp=
ose we have the following API request:<br></p><pre><code>[[ "getMessageUp=
dates", {
    "sinceState": "abcdef"
}, "t0" ],
[ "getMessages", {
    "#ids": {
        "resultOf": "t0",
        "path": "/changed"
    }
}, "t1" ]]</code><br></pre><p>Now after executing the first method call t=
he response array is:<br></p><pre><code>[[ "messageUpdates", {
    "accountId": "1",
    "oldState": "abcdef",
    "newState": "123456",
    "hasMoreUpdates": false,
    "changed": [ "msg1", "msg4" ],
    "removed": []
}, "t0" ]]</code><br></pre><p>So to execute the getMessages call, we look=
 through the arguments and find there is one with a <code>#</code> prefix=
=2E To resolve this, we apply the algorithm above:<br></p><ol><li><div>Fi=
nd the first response with client id =E2=80=9Ct0=E2=80=9D. The =E2=80=9Cm=
essageUpdates=E2=80=9D response <br></div>
<div>fulfils this criterion.<br></div>
</li><li><div>Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=
=80=99s messageUpdates=E2=80=9D, so this is <br></div>
<div>fine.<br></div>
</li><li><div>Apply the <i>path</i> as a JSON pointer to the arguments ob=
ject. This simply <br></div>
<div>selects the =E2=80=9Cchanged=E2=80=9D property, so the result of eva=
luating is:<br></div>
<div><code>[ "msg1", "msg4" ]</code><br></div>
</li></ol><p>The JMAP server now continues to process the getMessages cal=
l as though the arguments were:<br></p><pre><code>{
    "ids": [ "msg1", "msg4" ]
}
</code><br></pre><p>Now a more complicated example: fetch the =E2=80=9Cfr=
om=E2=80=9D/=E2=80=9Ddate=E2=80=9D/=E2=80=9Dsubject=E2=80=9D for every me=
ssage in the first 10 threads in the Inbox (sorted newest first):<br></p>=
<pre><code>[[ "getMessageList", {
  "filter": { inMailbox: "id_of_inbox" },
  "sort": [ "date desc" ],
  "collapseThreads": true,
  "position": 0,
  "limit": 10
}, "t0" ],
[ "getMessages", {
  "#ids": {
    "resultOf": "t0",
    "path": "/ids"
  },
  "properties": [ "threadId" ]
}, "t1" ],
[ "getThreads", {
  "#ids": {
    "resultOf": "t1",
    "path": "/list/*/threadId"
  }
}, "t2" ],
[ "getMessages", {
  "#ids": {
    "resultOf": "t2"
    "path": "/list/*/messageIds"
  },</code><br></pre><pre><code>  "properties": [ "from", "date", "subjec=
t" ]
}, "t3" ]]</code><br></pre><p>After executing the first 3 method calls th=
e response array is:<br></p><pre><code>[[ "messageList", {
    "accountId": "1",
    "filter": { inMailbox: "id_of_inbox" },
    "sort": [ "date desc" ],
    "collapseThreads": true,
    "state": "abcdefg",
    "canCalculateUpdates": true,
    "position": 0,
    "total": 101,
    "ids": [ "msg1023", "msg223", "msg110", "msg93", "msg91", "msg38", "m=
sg36", "msg33", "msg11", "msg1" ]
}, "t0" ],
[ "messages", {
    "accountId": "1",
    "state": "123456",
    "list": [{
        "id": "msg1023",
        "threadId": "trd194",
    }, {
        "id": "msg223",
        "threadId": "trd114"
    }, =

    ... etc... =

    ],
    "notFound": null
}, "t1" ],
[ "threads", {
    "accountId": "1",
    "state": "123456",
    "list": [{
        "id: "trd194",
        "messageIds": [ "msg1020", "msg1021", "msg1023" ]
    }, {
        "id: "trd114",
        "messageIds": [ "msg201", "msg223" ]
    }, =

    ... etc... =

    ],
    "notFound": null
}, "t2" ]]
</code><br></pre><p>So to execute the final getMessages call, we look thr=
ough the arguments and find there is one with a <code>#</code> prefix. To=
 resolve this, we apply the algorithm:<br></p><ol><li><div>Find the first=
 response with client id =E2=80=9Ct2=E2=80=9D. The =E2=80=9Cthreads=E2=80=
=9D response <br></div>
<div>fulfils this criterion.<br></div>
</li><li>Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=
=99s threads=E2=80=9D, so this is fine.<br></li><li><div>Apply the <i>pat=
h</i> as a JSON pointer to the arguments object. Token-by-token: <br></di=
v>
</li><ol><li><div><code><b>list</b></code>&nbsp;=E2=80=93 get the array o=
f thread objects<br></div>
</li><li><div><b>*</b>&nbsp;=E2=80=93 for each of the items in the array:=
<br></div>
</li><ol><li><div><code><b>messsageIds</b></code>&nbsp;=E2=80=93 get the =
array of message ids<br></div>
</li><li><div>Concatenate these into a single array of all the ids in the=
 result.<br></div>
</li></ol></ol></ol><p>The JMAP server now continues to process the getMe=
ssages call as though the arguments were:<br></p><pre><code>{
    "ids": [ "msg1020", "msg1021", "msg1023", "msg201", "msg223", etc... =
],</code><br></pre><pre><code>    </code>"properties": [ "from", "date", =
"subject" ]<code>
}</code><br></pre><p>For reference, in case it=E2=80=99s clearer than my =
description, here=E2=80=99s a JavaScript implementation of the pointer re=
solution algorithm, with the addition to RFC6901 clearly marked:<br></p><=
pre><code>function evaluatePointer ( value, pointer ) {
    if ( !pointer ) {
        return value;
    }
    if ( pointer.charAt( 0 ) !=3D=3D '/' ) {
        throw new Error( 'Invalid pointer' );
    }
    let token;
    let next =3D pointer.indexOf( '/', 1 );
    if ( next !=3D=3D -1 ) {
        token =3D pointer.slice( 1, next );
        pointer =3D pointer.slice( next );
    } else {
        token =3D pointer.slice( 1 );
        pointer =3D '';
    }
    token =3D token.replace( /~1/g, '/' ).replace( /~0/g, '~' );
    if ( Array.isArray( value ) ) {
        if ( /^(?:0|[1-9][0-9]*)$/.test( token ) ) {
            return evaluatePointer( value[ parseInt( token, 10 ) ], point=
er );
        }
        <span class=3D"colour" style=3D"color:#000000"><span class=3D"hig=
hlight" style=3D"background-color:#ffffe0">/* start: the only bit that di=
ffers from RFC6901 */
        if ( token =3D=3D=3D '*' ) {
            /* Map values to pointer */
            value =3D value.map( item =3D&gt; evaluatePointer( item, poin=
ter ) );
            /* Flatten output */
            return value.reduce( ( output, item ) =3D&gt; {
                if ( !Array.isArray( item ) ) {
                    item =3D [ item ];
                }
                return output.concat( item );
            }, [] );
        }
        /* end */</span></span>
    } else if ( value !=3D=3D null &amp;&amp; typeof value =3D=3D=3D 'obj=
ect' ) {
        return evaluatePointer( value[ token ], pointer );
    }
    throw new Error( 'Evaluation failed' );
}
</code><br></pre><div>So:<br></div>
<ul><li>What do people think of the result-reference concept to replace t=
he fetchRecords etc. arguments and reduce the amount of special-casing?<b=
r></li><li>Presuming agreement this is a good idea, is this syntax good? =
If not, please suggest an alternative! (I've tried to reuse RFC6901 as mu=
ch as possible as the only relevant standard I'm aware of, but if you kno=
w of another standard that's more suitable please let me know).<br></li><=
/ul><div><br></div>
<div>The full change proposal can be seen in the pull request at&nbsp;<a =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com=
_jmapio_jmap_pull_148&d=3DDwMFaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY0=
57SbK10&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCtS0Ut-8SOYtT=
U2EShd7Qt1Wa66iG5eF637_nimF-OM&s=3D8kEj1hBS8M2M_XaHaB3x831iSoNkmvDpY8cNsW=
5gYiA&e=3D">https://github.com/jmapio/jmap/pull/148</a>.<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.<br></div></blockquote>
<div class=3D"plaintext"><blockquote>
</blockquote><blockquote><p dir=3D"auto">________________________________=
_______________<br>
Jmap mailing list<br>
Jmap@ietf.org<br>
<a href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.iet=
f.org_mailman_listinfo_jmap&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQ=
cxBKCX5YTpkKY057SbK10&amp;r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo=
&amp;m=3DCtS0Ut-8SOYtTU2EShd7Qt1Wa66iG5eF637_nimF-OM&amp;s=3Dh4UnZPECDHey=
Tajis8WzolSW6T9P-tPU7kMtP8abZcM&amp;e=3D">https://urldefense.proofpoint.c=
om/v2/url?u=3Dhttps-3A__www.ietf.org_mailman_listinfo_jmap&amp;d=3DDwICAg=
&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DQBZgPENFbjFa=
dxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&amp;m=3DCtS0Ut-8SOYtTU2EShd7Qt1Wa66iG5eF6=
37_nimF-OM&amp;s=3Dh4UnZPECDHeyTajis8WzolSW6T9P-tPU7kMtP8abZcM&amp;e=3D</=
a></p>
</blockquote></div>

</body>
</html>

--=_MailMate_71703970-9151-4D82-9D5E-3D0DE88B167C_=--


From nobody Mon Oct  2 18:02:00 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 63E7B133071 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 18:01:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.821
X-Spam-Level: 
X-Spam-Status: No, score=-0.821 tagged_above=-999 required=5 tests=[BAYES_20=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=IR3Gk3dX; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ZqTQ3Pwe
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 vsWHf4NYhNvC for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 18:01:57 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0BF651201F8 for <jmap@ietf.org>; Mon,  2 Oct 2017 18:01:57 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 7A4D122874 for <jmap@ietf.org>; Mon,  2 Oct 2017 21:01:56 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Mon, 02 Oct 2017 21:01:56 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=dQw3eCySoxyzmDyOX +teU/BDoR+qyreG4pVJysD9VPU=; b=IR3Gk3dXzOGakN4h2gpm6zP26Z5P0Kl1L 3QQxXG3WsGyjP1Wr68l71NKBihSq1SNVsfO5hCCd/e7MiTJI1NFFNYeDiZk1LzAp 1a7zJVH6gR66NZc/vlvlC1edtXViZ2Jkbk1XrrNjelIRU+pzAG23DJ1WFKnzD9sv ecg3TK5trCBY136atPtXNIFF44RuRliv8F4HdmGqagw6IiiUIII0TkgdtIj4M6bJ ILuvpEj4ZshfCr2BgxdV16NwHqitDOmgZmnTFepemWa/DBLvJoOHjwyCrEj/D6AA XdvBP/EvhHRiljRGWewv/GX3mQqKCw6H0WAgq8cmaKVFsBAeTuR1w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=dQw3eC ySoxyzmDyOX+teU/BDoR+qyreG4pVJysD9VPU=; b=ZqTQ3Pwek2fnN9baUdmohB f+i2U65a+N8XtNyY9jbRtWpnLAFGXzZLtW5uhzVW80vuQDPxZiPQ6v7pl5gmOHZd zmnS2Zx2UfwB/rkr3XfgMwJDhOf0FGzMu2883BBRcrweH0cES0+pxLgvSfV/oRX2 2Hb/sTXs8Xwcoq8NBe+OKH5tsYKoGLwpnazzUkCTD05/2ABZ91XT1IpywxYQuF26 gKNBn+idfQnsxz6nkjGChBVLnixxmCbywhqCUwulB3Rd+UYiNYMJI8d3888izgQ1 dswwIXWOpPk0qIQkDf2ApBhBzo002aRB/Kyw6dFaFmN93nFUs1tXgANrTAgCBfTg ==
X-ME-Sender: <xms:hOHSWX8xyToma27-F9qWq6vgSwAxvxCIjtuKOWjCySmYASn8ZnK7XA>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 3794FE2680; Mon,  2 Oct 2017 21:01:56 -0400 (EDT)
Message-Id: <1506992516.1868145.1125731992.6C997150@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150699251618681454"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-5f0bf376
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com> <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com>
Date: Tue, 03 Oct 2017 12:01:56 +1100
In-Reply-To: <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/pdN3cO1U1jFdJjQohOBwYUlPKuo>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2017 01:01:58 -0000

This is a multi-part message in MIME format.

--_----------=_150699251618681454
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

On Tue, 3 Oct 2017, at 11:54 AM, Chris Newman wrote:
> I'd be careful about over-generalizing the back-reference model as
> that seems like the type of over-generalization that can make server
> implementations unnecessarily complex without significant added
> benefit.
I agree. I think that the current proposal is a nice balance of power
and ease of implementation (the array of previous results should
already be there, as you need it to return to the client once you've
finished processing all the methods, so resolving the references should
really be a single loop through a method's arguments and an
implementation of the pointer resolution, which is pretty trivial as I
showed in my first email).
Neil.

--_----------=_150699251618681454
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Tue, 3 Oct 2017, at 11:54 AM, Chris Newman wrote:<br></div>
<blockquote type="cite"><div>I'd be careful about over-generalizing the back-reference model as that seems like the type of over-generalization that can make server implementations unnecessarily complex without significant added benefit.<br></div>
</blockquote><div><br></div>
<div>I agree. I think that the current proposal is a nice balance of power and ease of implementation (the array of previous results should already be there, as you need it to return to the client once you've finished processing all the methods, so resolving the references should really be a single loop through a method's arguments and an implementation of the pointer resolution, which is pretty trivial as I showed in my first email).<br></div>
<div><br></div>
<div>Neil.<br></div>
</body>
</html>

--_----------=_150699251618681454--


From nobody Mon Oct  2 18:07:26 2017
Return-Path: <chris.newman@oracle.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DB20A126B7E for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 18:07:24 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.219
X-Spam-Level: 
X-Spam-Status: No, score=-4.219 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H4=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 jtQjNisprwRn for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 18:07:22 -0700 (PDT)
Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A38791201F8 for <jmap@ietf.org>; Mon,  2 Oct 2017 18:07:22 -0700 (PDT)
Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id v9317JTB029983 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Oct 2017 01:07:19 GMT
Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id v9317Jmv013163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 3 Oct 2017 01:07:19 GMT
Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id v9317I7h009197; Tue, 3 Oct 2017 01:07:18 GMT
Received: from [10.145.239.184] (/10.145.239.184) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 02 Oct 2017 18:07:18 -0700
From: "Chris Newman" <chris.newman@oracle.com>
To: "Neil Jenkins" <neilj@fastmailteam.com>
Cc: "IETF JMAP Mailing List" <jmap@ietf.org>
Date: Mon, 02 Oct 2017 18:07:17 -0700
Message-ID: <03492EC8-BB2F-499B-96AA-4443439704B9@oracle.com>
In-Reply-To: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com>
References: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com>
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="=_MailMate_F1BF3307-A0FE-48F1-8F94-416727EB37B7_="
Embedded-HTML: [{"HTML":[2623, 2820], "plain":[1184, 2498], "uuid":"605170E3-E8B9-499C-917B-98A14D4EC99A"}]
X-Mailer: MailMate (1.9.7r5419)
X-Source-IP: aserv0022.oracle.com [141.146.126.234]
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/w70mMEMyEfCL65KZHHqJWsIgjZQ>
Subject: Re: [Jmap] Mailbox#role vs IMAP SPECIAL-USE
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2017 01:07:25 -0000

--=_MailMate_F1BF3307-A0FE-48F1-8F94-416727EB37B7_=
Content-Type: text/plain; format=flowed
Content-Transfer-Encoding: quoted-printable

I agree with most of this. One scenario that concerns me:

IMAP servers historically haven't required special use and IMAP clients =

have a tendency to create special use folders without applying the =

annotation. So adding a JMAP server to an existing deployment will make =

the situation worse, unless there's some mechanism to apply the JMAP =

role / IMAP special use to existing folders. I see two options to try to =

resolve this mess:

1. Add a rule that JMAP servers that front-end an IMAP mail store SHOULD =

make a best effort to apply the proper JMAP role to existing IMAP =

folders (with configurable names) for IMAP accounts lacking a given =

special use attribute. That is, if the IMAP account lacks a folder with =

a "Sent" role, the JMAP server should look for folders with likely names =

(e.g., "Sent" or "Sent Messages" or translations of that to other =

languages) and apply the IMAP special use and JMAP role.

2. Punt the problem to the client which means JMAP should allow the =

client to set the role on an existing folder.

I think option 1 better fits the JMAP philosophy (whereas option 2 =

better fits the IMAP philosophy).

		- Chris

On 1 Oct 2017, at 20:05, Neil Jenkins wrote:

> This is in reference to GitHub issue #62[1].
>
> The role attribute on the Mailbox object in JMAP is equivalent to the
> RFC6154[2] SPECIAL-USE flag in IMAP, however there are some semantic
> differences so I'd like to solicit some opinions on what to do. Here =

> are
> all the differences I can see:
>  1. The value is singular in JMAP, but you can have multiple =

> special-use
>     attributes on the same mailbox in IMAP.
>  2. The value is unique in JMAP (you cannot have two "Sent" =

> mailboxes),
>     but duplicates are allowed in IMAP.
>  3. The value is immutable in JMAP, but can be modified after mailbox
>     creation in IMAP.
> In addition, JMAP has two roles that don't exist in SPECIAL-USE:
>
>  * *inbox* (It's a hard-coded name in IMAP so you didn't need an
>    attribute).
>  * *templates* (Drafts that should be used as the basis for new drafts
>    but not themselves modified.)
> SPECIAL-USE has two attributes that aren't in JMAP:
>
>  * \All
>  * \Flagged
>
> These are both virtual, and aren't necessary in JMAP because
> getMessageList allows you to fetch all/flagged across the whole =

> account
> without requiring a special mailbox fox it.
> So, what to do. Special-use allows servers to enforce the three
> differences in semantics that JMAP specifies (singular, unique,
> immutable), so one option is to leave the semantics as is, and IMAP
> servers can just enforce them over IMAP as well to keep a consistent
> view. Alternatively we can relax the restrictions in JMAP, but I think
> these are useful properties and I wonder whether there are people
> actually making use of the relaxed options at the moment with IMAP?
> Regarding the different roles/attributes, there's RFC6154 didn't =

> create
> an IANA registry, so it's not extensible without a whole new RFC. I'm
> inclined to just include a mapping in an advice to implementors =

> section.
> Any other opinions on this?
>
> Cheers,
> Neil.
>
> Links:
>
>   1. =

> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_jmapi=
o_jmap_issues_62&d=3DDwICaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK=
10&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCV2ZU50KhbEBSQi35_=
ZaaIwkkARKDVFZWtsO-hqYVVw&s=3DAMHURIAQ0LIjdYtFTooTcXUjZnmG7d_zxNyw8CZVI-k=
&e=3D
>   2. =

> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools.ietf.org_h=
tml_rfc6154&d=3DDwICaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3D=
QBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCV2ZU50KhbEBSQi35_ZaaIwkk=
ARKDVFZWtsO-hqYVVw&s=3DqJ6gYTGGIauNkAfaqj1C1OnbrD_noYYTthbljTw7UmQ&e=3D


> _______________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mai=
lman_listinfo_jmap&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057S=
bK10&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCV2ZU50KhbEBSQi3=
5_ZaaIwkkARKDVFZWtsO-hqYVVw&s=3DF0m7GhRqFfK8sMHrGEM_N-jYGpIGL3KCBnrLUuYl6=
PU&e=3D

--=_MailMate_F1BF3307-A0FE-48F1-8F94-416727EB37B7_=
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/xhtml; charset=3Dutf-8"=
>
<style>
div.plaintext { white-space: normal; }
body { font-family: sans-serif; }
div.plaintext h1 { font-size: 1.4em; }
div.plaintext h2 { font-size: 1.2em; }
div.plaintext h3 { font-size: 1.1em; }
blockquote.embedded,div.plaintext blockquote { margin: 0 0 5px; padding-l=
eft: 5px; border-left: 2px solid #777777; color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquo=
te { border-left-color: #999999; color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext=
 blockquote blockquote blockquote { border-left-color: #BBBBBB; color: #B=
BBBBB; }
div.plaintext a { color: #3983C4 }
blockquote.embedded,div.plaintext blockquote a { color: #777777; }
blockquote.embedded blockquote.embedded,div.plaintext blockquote blockquo=
te a { color: #999999; }
blockquote.embedded blockquote.embedded blockquote.embedded,div.plaintext=
 blockquote blockquote blockquote a { color: #BBBBBB; }
div.plaintext math[display=3D"inline"] > mrow { padding:5px; }
div.plaintext div.footnotes li p { margin: 0.2em 0; }
</style>
</head>
<body>
<div class=3D"plaintext"><p dir=3D"auto">I agree with most of this. One s=
cenario that concerns me:</p>
<p dir=3D"auto">IMAP servers historically haven&#39;t required special us=
e and IMAP clients have a tendency to create special use folders without =
applying the annotation. So adding a JMAP server to an existing deploymen=
t will make the situation worse, unless there&#39;s some mechanism to app=
ly the JMAP role / IMAP special use to existing folders. I see two option=
s to try to resolve this mess:</p>
<p dir=3D"auto">1. Add a rule that JMAP servers that front-end an IMAP ma=
il store SHOULD make a best effort to apply the proper JMAP role to exist=
ing IMAP folders (with configurable names) for IMAP accounts lacking a gi=
ven special use attribute. That is, if the IMAP account lacks a folder wi=
th a &quot;Sent&quot; role, the JMAP server should look for folders with =
likely names (e.g., &quot;Sent&quot; or &quot;Sent Messages&quot; or tran=
slations of that to other languages) and apply the IMAP special use and J=
MAP role.</p>
<p dir=3D"auto">2. Punt the problem to the client which means JMAP should=
 allow the client to set the role on an existing folder.</p>
<p dir=3D"auto">I think option 1 better fits the JMAP philosophy (whereas=
 option 2 better fits the IMAP philosophy).</p>
<p dir=3D"auto">		- Chris</p>
<p dir=3D"auto">On 1 Oct 2017, at 20:05, Neil Jenkins wrote:</p>
</div>
<blockquote class=3D"embedded">
<div>This is in reference to GitHub issue <a href=3D"https://urldefense.p=
roofpoint.com/v2/url?u=3Dhttps-3A__github.com_jmapio_jmap_issues_62&d=3DD=
wMCaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=3DQBZgPENFbjFadxq=
U4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCV2ZU50KhbEBSQi35_ZaaIwkkARKDVFZWtsO-hqY=
VVw&s=3DAMHURIAQ0LIjdYtFTooTcXUjZnmG7d_zxNyw8CZVI-k&e=3D">#62</a>.<br></d=
iv>
<div><br></div>
<div>The role attribute on the Mailbox object in JMAP is equivalent to th=
e <a href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__tools=
=2Eietf.org_html_rfc6154&d=3DDwMCaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpk=
KY057SbK10&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCV2ZU50Khb=
EBSQi35_ZaaIwkkARKDVFZWtsO-hqYVVw&s=3DqJ6gYTGGIauNkAfaqj1C1OnbrD_noYYTthb=
ljTw7UmQ&e=3D">RFC6154</a> SPECIAL-USE flag in IMAP, however there are so=
me semantic differences so I'd like to solicit some opinions on what to d=
o. Here are all the differences I can see:<br></div>
<div><br></div>
<ol><li>The value is singular in JMAP, but you can have multiple special-=
use attributes on the same mailbox in IMAP.<br></li><li>The value is uniq=
ue in JMAP (you cannot have two "Sent" mailboxes), but duplicates are all=
owed in IMAP.<br></li><li>The value is immutable in JMAP, but can be modi=
fied after mailbox creation in IMAP.<br></li></ol><div><br></div>
<div>In addition, JMAP has two roles that don't exist in SPECIAL-USE:<br>=
</div>
<div><br></div>
<ul><li><i>inbox</i> (It's a hard-coded name in IMAP so you didn't need a=
n attribute).<br></li><li><i>templates</i> (Drafts that should be used as=
 the basis for new drafts but not themselves modified.)<br></li></ul><div=
><br></div>
<div>SPECIAL-USE has two attributes that aren't in JMAP:<br></div>
<div><br></div>
<ul><li>\All<br></li><li>\Flagged<br></li></ul><div><br></div>
<div>These are both virtual, and aren't necessary in JMAP because getMess=
ageList allows you to fetch all/flagged across the whole account without =
requiring a special mailbox fox it.<br></div>
<div><br></div>
<div>So, what to do. Special-use allows servers to enforce the three diff=
erences in semantics that JMAP specifies (singular, unique, immutable), s=
o one option is to leave the semantics as is, and IMAP servers can just e=
nforce them over IMAP as well to keep a consistent view. Alternatively we=
 can relax the restrictions in JMAP, but I think these are useful propert=
ies and I wonder whether there are people actually making use of the rela=
xed options at the moment with IMAP?<br></div>
<div><br></div>
<div>Regarding the different roles/attributes, there's RFC6154 didn't cre=
ate an IANA registry, so it's not extensible without a whole new RFC. I'm=
 inclined to just include a mapping in an advice to implementors section.=
<br></div>
<div><br></div>
<div>Any other opinions on this?<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.<br></div></blockquote>
<div class=3D"plaintext"><blockquote>
</blockquote><blockquote><p dir=3D"auto">________________________________=
_______________<br>
Jmap mailing list<br>
Jmap@ietf.org<br>
<a href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.iet=
f.org_mailman_listinfo_jmap&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQ=
cxBKCX5YTpkKY057SbK10&amp;r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo=
&amp;m=3DCV2ZU50KhbEBSQi35_ZaaIwkkARKDVFZWtsO-hqYVVw&amp;s=3DF0m7GhRqFfK8=
sMHrGEM_N-jYGpIGL3KCBnrLUuYl6PU&amp;e=3D">https://urldefense.proofpoint.c=
om/v2/url?u=3Dhttps-3A__www.ietf.org_mailman_listinfo_jmap&amp;d=3DDwICAg=
&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DQBZgPENFbjFa=
dxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&amp;m=3DCV2ZU50KhbEBSQi35_ZaaIwkkARKDVFZW=
tsO-hqYVVw&amp;s=3DF0m7GhRqFfK8sMHrGEM_N-jYGpIGL3KCBnrLUuYl6PU&amp;e=3D</=
a></p>
</blockquote></div>

</body>
</html>

--=_MailMate_F1BF3307-A0FE-48F1-8F94-416727EB37B7_=--


From nobody Mon Oct  2 20:28:00 2017
Return-Path: <brong@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id D08A3134488 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 20:27:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.73
X-Spam-Level: 
X-Spam-Status: No, score=-0.73 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, HTTPS_HTTP_MISMATCH=1.989, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, 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=FgQiEcxl; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=d/mpLCpb
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 MXJoTa7FDNtH for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 20:27:56 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5B233134310 for <jmap@ietf.org>; Mon,  2 Oct 2017 20:27:56 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B558120F26 for <jmap@ietf.org>; Mon,  2 Oct 2017 23:27:55 -0400 (EDT)
Received: from web4 ([10.202.2.214]) by compute6.internal (MEProxy); Mon, 02 Oct 2017 23:27:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=RIUeW7CQhv/u4Je9m LAyaQFK+8QNIh+xqIaDRQsOjFE=; b=FgQiEcxlmmI1unU1cAKZHjaoZYsSHwXXX IhRNArDQm+mO2otjba0CQNvWZG6IK3zTqYTZrqd29S52i1w1nbSqm2PTvwU2Bj0y QIwNYO2wKj/rUUmJ+ceyQgMJfbjslYuOPXbdiAWtGg5Twjvl6Yy6aTdD91bFwK7r WHiUyiIFFcvHhilQ/cUrewtwFGzV3yi5gpACFQ9RXfk+FGenc9WNbbgRIFWZNY/G 0ucVgqR0NsLqIor61wkiwLjDb1VLLx83QJ3vWlMMP5L048Bxa+w6AtJu93JHdCck KUJw+B+GJbd/x8VN/9uc3EaAKnqu7f8B1M7uPfmJR+lFeXZN/TwWA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=RIUeW7 CQhv/u4Je9mLAyaQFK+8QNIh+xqIaDRQsOjFE=; b=d/mpLCpbu5W+BUnm9hU3Me FToUuW+VICR0qVu6Spr73caRO61Kw0FZgVv5HR8BngBKBhm4O9PlSJfaGIxoZ6my md1Lzovx+oXxsi88Nm9mqYrVQwCXiIbR3a4qXHXapzj3UEo2f+AHqyuYGi4ju3Ji xtIy6q0Eej2wo31UcuzdrFUcgSlxGhWX+7I4KQVp6nO1No3OBUL/c4h3LPM/sEmN 0kHwfNUhZbyf+4tvs3aZ2TSBm4rSPZJe+Ze8XQ81/t2y94eFcofdmRRXFx7bFOJm qOyGt83AFWbt6zjA/9ef7nQFPgh8jhRR5B6JnAp7poRPWiSN9466n2EY02EcKEaA ==
X-ME-Sender: <xms:uwPTWTkskPUqHomAwqtmJEHI8UzjpdQpnvQUa6OZHGirkJGAvDZf4g>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 6B7BFBAB59; Mon,  2 Oct 2017 23:27:55 -0400 (EDT)
Message-Id: <1507001275.2835906.1125827696.29D3C83F@webmail.messagingengine.com>
From: Bron Gondwana <brong@fastmailteam.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150700127528359062"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-6cb49228
Date: Mon, 02 Oct 2017 23:27:55 -0400
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com> <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com>
In-Reply-To: <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/Z3C3jsE9rbhr_Erppk9JPuEUydQ>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2017 03:28:00 -0000

This is a multi-part message in MIME format.

--_----------=_150700127528359062
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

A difficulty with 5182 is that it requires indefinite storage of results
on the server (within a single connection lifetime), whereas at least
JMAP backreferences only require storage with the single session.
Also, you can wait until you have the full request before processing it,
so you can resolve which backreferences you will be needing even before
you start processing if you really want to optimise server storage and
start sending results before the batch is complete and throw away data
you won't need for later requests.
(though to be honest, I think it's more  efficient for most clients to
wait until you have everything and then blast it all at once in the
minimum number of packets and minimum battery use)
Bron.



On Mon, 2 Oct 2017, at 20:54, Chris Newman wrote:
> RFC 5182 is useful to save round-trips. I support the concept in JMAP.
> I'd be careful about over-generalizing the back-reference model as
> that seems like the type of over-generalization that can make server
> implementations unnecessarily complex without significant added
> benefit. Also, RFC 5182 includes a mechanism that avoids sending data
> to the client that the client doesn't need, which may be worth
> thinking about in this case.> - Chris


> On 1 Oct 2017, at 16:50, Neil Jenkins wrote:


>> Hi all,
>> This week I have been doing a lot of copy editing to remove a huge
>> amount of duplicative text, which made the spec harder to read, and
>> more likely to contain inconsistencies between methods. My goal is
>> that the JMAP Mail spec should just be:


>>  1. The data type definitions
>>  2. Which standard method types can be used with each data type (e.g.
>>     the Thread object is not mutable directly by the client so there
>>     is no setThreads method).
>>  3. Any changes to the standard method for that particular type
>>     (extra arguments etc.)>> This makes the spec *much* shorter, more un=
derstandable and easier to
>> implement. Doing this also makes it easier to see where methods for a
>> particular type deviate from the =E2=80=9Cstandard=E2=80=9D JMAP get/set=
 calls. As I
>> looked at this, I realised most of the inconsistencies were in the
>> =E2=80=9CfetchRecords=E2=80=9D type arguments, used to reduce round trip=
s.>> If instead we had a generic way to refer to the result of a previous
>> method call in the arguments of a subsequent request, we can
>> eliminate the special cases, and provide more power. Much like the
>> unix composable-small-things philosophy.>> Here=E2=80=99s a proposal of =
how this could work:


>> Any argument name may be prefixed with a =E2=80=98#=E2=80=99. This means=
 the argument
>> value is a back-reference to the output of a previous method call
>> rather than the real value. The value is a *ResultReference* object
>> as described below. When processing a method call, the server MUST
>> first check the arguments object for any names beginning with =E2=80=9C#=
=E2=80=9D. If
>> found, the back reference should be resolved and the value used as
>> the =E2=80=9Creal=E2=80=9D argument. The method is then processed as nor=
mal.>> A *ResultReference* object has the following properties:


>>  * *resultOf*: String The client id of the method call to get the
>>    result from (the string given as the third item in the array for a
>>    method call).
>>  * *path*: String A pointer into the arguments. This is an RFC6901
>>    JSON Pointer, except it also allows the use of * to map through an
>>    array (see description below).>> To resolve:


>>  1. Find the first response with a client id identical to the
>>     *resultOf* property of the *ResultReference* in the array of
>>     outputs from previously processed  method calls in the same
>>     request. If none, evaluation fails.


>>  2. If the response name is =E2=80=9Cerror=E2=80=9D, evaluation fails.


>>  3. Apply the *path* to the arguments object of the response (the
>>     second item in the response array) following the RFC6901 JSON
>>     pointer algorithm, except with the following addition in Section
>>     4 (Evaluation):


>> If the currently referenced value is a JSON array, the reference
>> token may be exactly the single character *, making the new
>> referenced value the result of applying the rest of the JSON pointer
>> tokens to every item in the array and returning the results in the
>> same order in a new array. If the result of applying the rest of the
>> pointer tokens to a value was itself an array, the items should be
>> included individually in the output array rather than including the
>> array itself (i.e. the result is flattened).
>>  4. If the type of the result is X, and the expected type of the
>>     argument is an array of type X, wrap the result in an array with
>>     a single item.>> As a simple example, suppose we have the following =
API request:


>> [[ "getMessageUpdates", { "sinceState": "abcdef" }, "t0" ], [
>> "getMessages", { "#ids": { "resultOf": "t0", "path": "/changed" } },
>> "t1" ]]>> Now after executing the first method call the response array i=
s:


>> [[ "messageUpdates", { "accountId": "1", "oldState": "abcdef",
>> "newState": "123456", "hasMoreUpdates": false, "changed": [ "msg1",
>> "msg4" ], "removed": [] }, "t0" ]]>> So to execute the getMessages call,=
 we look through the arguments and
>> find there is one with a # prefix. To resolve this, we apply the
>> algorithm above:


>>  1. Find the first response with client id =E2=80=9Ct0=E2=80=9D. The =E2=
=80=9CmessageUpdates=E2=80=9D
>>     response fulfils this criterion.
>>  2. Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=99s=
 messageUpdates=E2=80=9D, so
>>     this is fine.
>>  3. Apply the *path* as a JSON pointer to the arguments object. This
>>     simply selects the =E2=80=9Cchanged=E2=80=9D property, so the result=
 of
>>     evaluating is: [ "msg1", "msg4" ]>> The JMAP server now continues to=
 process the getMessages call as
>> though the arguments were:


>> { "ids": [ "msg1", "msg4" ] }
>>>> Now a more complicated example: fetch the =E2=80=9Cfrom=E2=80=9D/=E2=
=80=9Ddate=E2=80=9D/=E2=80=9Dsubject=E2=80=9D for
>> every message in the first 10 threads in the Inbox (sorted newest
>> first):


>> [[ "getMessageList", { "filter": { inMailbox: "id_of_inbox" },
>> "sort": [ "date desc" ], "collapseThreads": true, "position": 0,
>> "limit": 10 }, "t0" ], [ "getMessages", { "#ids": { "resultOf": "t0",
>> "path": "/ids" }, "properties": [ "threadId" ] }, "t1" ], [
>> "getThreads", { "#ids": { "resultOf": "t1", "path":
>> "/list/*/threadId" } }, "t2" ], [ "getMessages", { "#ids": {
>> "resultOf": "t2" "path": "/list/*/messageIds" },  "properties": [
>> "from", "date", "subject" ] }, "t3" ]]>> After executing the first 3 met=
hod calls the response array is:


>> [[ "messageList", { "accountId": "1", "filter": { inMailbox:
>> "id_of_inbox" }, "sort": [ "date desc" ], "collapseThreads": true,
>> "state": "abcdefg", "canCalculateUpdates": true, "position": 0,
>> "total": 101, "ids": [ "msg1023", "msg223", "msg110", "msg93",
>> "msg91", "msg38", "msg36", "msg33", "msg11", "msg1" ] }, "t0" ], [
>> "messages", { "accountId": "1", "state": "123456", "list": [{ "id":
>> "msg1023", "threadId": "trd194", }, { "id": "msg223", "threadId":
>> "trd114" }, ... etc... ], "notFound": null }, "t1" ], [ "threads", {
>> "accountId": "1", "state": "123456", "list": [{ "id: "trd194",
>> "messageIds": [ "msg1020", "msg1021", "msg1023" ] }, { "id: "trd114",
>> "messageIds": [ "msg201", "msg223" ] }, ... etc... ], "notFound":
>> null }, "t2" ]]
>>>> So to execute the final getMessages call, we look through the
>> arguments and find there is one with a # prefix. To resolve this, we
>> apply the algorithm:


>>  1. Find the first response with client id =E2=80=9Ct2=E2=80=9D. The =E2=
=80=9Cthreads=E2=80=9D
>>     response fulfils this criterion.
>>  2. Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=99s=
 threads=E2=80=9D, so this is
>>     fine.
>>  3. Apply the *path* as a JSON pointer to the arguments object. Token-by-
>>     token:
>>    1. *list* =E2=80=93 get the array of thread objects
>>    2. *** =E2=80=93 for each of the items in the array:
>>      1. *messsageIds* =E2=80=93 get the array of message ids
>>      2. Concatenate these into a single array of all the ids in the
>>         result.>> The JMAP server now continues to process the getMessag=
es call as
>> though the arguments were:


>> { "ids": [ "msg1020", "msg1021", "msg1023", "msg201", "msg223",
>> etc... ],    "properties": [ "from", "date", "subject" ] }>> For referen=
ce, in case it=E2=80=99s clearer than my description, here=E2=80=99s a
>> JavaScript implementation of the pointer resolution algorithm, with
>> the addition to RFC6901 clearly marked:


>> function evaluatePointer ( value, pointer ) { if ( !pointer ) {
>> return value; } if ( pointer.charAt( 0 ) !=3D=3D '/' ) { throw new Error(
>> 'Invalid pointer' ); } let token; let next =3D pointer.indexOf( '/', 1
>> ); if ( next !=3D=3D -1 ) { token =3D pointer.slice( 1, next ); pointer =
=3D
>> pointer.slice( next ); } else { token =3D pointer.slice( 1 ); pointer =3D
>> ''; } token =3D token.replace( /~1/g, '/' ).replace( /~0/g, '~' ); if (
>> Array.isArray( value ) ) { if ( /^(?:0|[1-9][0-9]*)$/.test( token ) )
>> { return evaluatePointer( value[ parseInt( token, 10 ) ], pointer );
>> }  /* start: the only bit that differs from RFC6901 */ if ( token =3D=3D=
=3D
>> '*' ) { /* Map values to pointer */ value =3D value.map( item =3D>
>> evaluatePointer( item, pointer ) ); /* Flatten output */ return
>> value.reduce( ( output, item ) =3D> { if ( !Array.isArray( item ) ) {
>> item =3D [ item ]; } return output.concat( item ); }, [] ); } /* end */
>> } else if ( value !=3D=3D null && typeof value =3D=3D=3D 'object' ) { re=
turn
>> evaluatePointer( value[ token ], pointer ); } throw new Error(
>> 'Evaluation failed' ); }
>>>> So:
>>  * What do people think of the result-reference concept to replace
>>    the fetchRecords etc. arguments and reduce the amount of special-
>>    casing?
>>  * Presuming agreement this is a good idea, is this syntax good? If
>>    not, please suggest an alternative! (I've tried to reuse RFC6901
>>    as much as possible as the only relevant standard I'm aware of,
>>    but if you know of another standard that's more suitable please
>>    let me know).>>=20
>> The full change proposal can be seen in the pull request at
>> https://github.com/jmapio/jmap/pull/148[1].>>=20
>> Cheers,
>> Neil.
>>=20
>> _______________________________________________
>>  Jmap mailing list
>>  Jmap@ietf.org
>> https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org_mail=
man_listinfo_jmap&d=3DDwICAg&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK1=
0&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCtS0Ut-8SOYtTU2EShd7Q=
t1Wa66iG5eF637_nimF-OM&s=3Dh4UnZPECDHeyTajis8WzolSW6T9P-tPU7kMtP8abZcM&e=3D=
> _________________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://www.ietf.org/mailman/listinfo/jmap

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



Links:

  1. https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_jmap=
io_jmap_pull_148&d=3DDwMFaQ&c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10=
&r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=3DCtS0Ut-8SOYtTU2EShd7Qt=
1Wa66iG5eF637_nimF-OM&s=3D8kEj1hBS8M2M_XaHaB3x831iSoNkmvDpY8cNsW5gYiA&e=3D

--_----------=_150700127528359062
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style=3D"font-family:Arial;">A difficulty with 5182 is that it r=
equires indefinite storage of results on the server (within a single connec=
tion lifetime), whereas at least JMAP backreferences only require storage w=
ith the single session.<br></div>
<div style=3D"font-family:Arial;"><br></div>
<div style=3D"font-family:Arial;">Also, you can wait until you have the ful=
l request before processing it, so you can resolve which backreferences you=
 will be needing even before you start processing if you really want to opt=
imise server storage and start sending results before the batch is complete=
 and throw away data you won't need for later requests.<br></div>
<div style=3D"font-family:Arial;"><br></div>
<div style=3D"font-family:Arial;">(though to be honest, I think it's more  =
efficient for most clients to wait until you have everything and then blast=
 it all at once in the minimum number of packets and minimum battery use)<b=
r></div>
<div style=3D"font-family:Arial;"><br></div>
<div style=3D"font-family:Arial;">Bron.<br></div>
<div style=3D"font-family:Arial;"><br></div>
<div><br></div>
<div><br></div>
<div>On Mon, 2 Oct 2017, at 20:54, Chris Newman wrote:<br></div>
<blockquote type=3D"cite"><div style=3D"white-space: normal;"><p>RFC 5182 i=
s useful to save round-trips. I support the concept in JMAP. I'd be careful=
 about over-generalizing the back-reference model as that seems like the ty=
pe of over-generalization that can make server implementations unnecessaril=
y complex without significant added benefit. Also, RFC 5182 includes a mech=
anism that avoids sending data to the client that the client doesn't need, =
which may be worth thinking about in this case.<br></p><p>- Chris<br></p><p=
>On 1 Oct 2017, at 16:50, Neil Jenkins wrote:<br></p></div>
<blockquote style=3D"color: rgb(119, 119, 119); border-left: 2px solid rgb(=
119, 119, 119); padding-left: 5px; margin: 0px 0px 5px;"><div>Hi all,<br></=
div>
<p>This week I have been doing a lot of copy editing to remove a huge amoun=
t of duplicative text, which made the spec harder to read, and more likely =
to contain inconsistencies between methods. My goal is that the JMAP Mail s=
pec should just be:<br></p><ol><li>The data type definitions<br></li><li><d=
iv>Which standard method types can be used with each data type (e.g. the Th=
read<br></div>
<div>object is not mutable directly by the client so there is no setThreads=
 method).<br></div>
</li><li><div>Any changes to the standard method for that particular type (=
extra arguments<br></div>
<div>etc.)<br></div>
</li></ol><p>This makes the spec <i>much</i> shorter, more understandable a=
nd easier to implement. Doing this also makes it easier to see where method=
s for a particular type deviate from the =E2=80=9Cstandard=E2=80=9D JMAP ge=
t/set calls. As I looked at this, I realised most of the inconsistencies we=
re in the =E2=80=9CfetchRecords=E2=80=9D type arguments, used to reduce rou=
nd trips.<br></p><p>If instead we had a generic way to refer to the result =
of a previous method call in the arguments of a subsequent request, we can =
eliminate the special cases, and provide more power. Much like the unix com=
posable-small-things philosophy.<br></p><p>Here=E2=80=99s a proposal of how=
 this could work:<br></p><p>Any argument name may be prefixed with a =E2=80=
=98#=E2=80=99. This means the argument value is a back-reference to the out=
put of a previous method call rather than the real value. The value is a <i=
>ResultReference</i> object as described below. When processing a method ca=
ll, the server MUST first check the arguments object for any names beginnin=
g with =E2=80=9C#=E2=80=9D. If found, the back reference should be resolved=
 and the value used as the =E2=80=9Creal=E2=80=9D argument. The method is t=
hen processed as normal.<br></p><p>A <b>ResultReference</b> object has the =
following properties:<br></p><ul><li><div><b>resultOf</b>: <code>String</co=
de><br></div>
<div>The client id of the method call to get the result from (the string gi=
ven as the third item in the array for a method call).<br></div>
</li><li><div><b>path</b>: <code>String</code><br></div>
<div>A pointer into the arguments. This is an RFC6901 JSON Pointer, except =
it also allows the use of <code>*</code> to map through an array (see descr=
iption below).<br></div>
</li></ul><p>To resolve:<br></p><ol><li><p>Find the first response with a c=
lient id identical to the <i>resultOf</i>&nbsp;<span class=3D"font" style=
=3D"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Ro=
boto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&qu=
ot;, &quot;Helvetica Neue&quot;, Arial, sans-serif">property of the </span>=
<i style=3D"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&q=
uot;, Roboto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid=
 Sans&quot;, &quot;Helvetica Neue&quot;, Arial, sans-serif;letter-spacing:-=
0.1px;">ResultReference</i><span class=3D"font" style=3D"font-family:-apple=
-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, =
Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica N=
eue&quot;, Arial, sans-serif"> in the array of outputs from previously proc=
essed  method calls in the same request. If none, evaluation fails.</span><=
br></p></li><li><p>If the response name is =E2=80=9Cerror=E2=80=9D, evaluat=
ion fails.<br></p></li><li><p>Apply the <i>path</i> to the arguments object=
 of the response (the second item in&nbsp;<span class=3D"font" style=3D"fon=
t-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, O=
xygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &q=
uot;Helvetica Neue&quot;, Arial, sans-serif">the response array) following =
the RFC6901 JSON pointer algorithm, except with the following addition in S=
ection 4 (Evaluation):</span><br></p><div>If the currently referenced value=
 is a JSON array, the reference token may&nbsp;<span class=3D"font" style=
=3D"font-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Ro=
boto, Oxygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&qu=
ot;, &quot;Helvetica Neue&quot;, Arial, sans-serif">be exactly the single c=
haracter </span><code style=3D"color:rgb(31, 31, 31);font-size:13px;letter-=
spacing:-0.1px;font-style:normal;font-variant-ligatures:normal;font-variant=
-caps:normal;font-weight:normal;">*</code><span class=3D"font" style=3D"fon=
t-family:-apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, O=
xygen, Ubuntu, Cantarell, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &q=
uot;Helvetica Neue&quot;, Arial, sans-serif">, making the new referenced va=
lue the result of applying the rest of the JSON pointer tokens to every ite=
m in the array and returning the results in the same order in a new array. =
If the result of applying the rest of the pointer tokens to a value was its=
elf an array, the items should be included individually in the output array=
 rather than including the array itself (i.e. the result is flattened).</sp=
an><br></div>
</li><li><p>If the type of the result is X, and the expected type of the ar=
gument is an&nbsp;<span class=3D"font" style=3D"font-family:-apple-system, =
BlinkMacSystemFont, &quot;Segoe UI&quot;, Roboto, Oxygen, Ubuntu, Cantarell=
, &quot;Fira Sans&quot;, &quot;Droid Sans&quot;, &quot;Helvetica Neue&quot;=
, Arial, sans-serif">array of type X, wrap the result in an array with a si=
ngle item.</span><br></p></li></ol><p>As a simple example, suppose we have =
the following API request:<br></p><pre><code>[[ "getMessageUpdates", {
    "sinceState": "abcdef"
}, "t0" ],
[ "getMessages", {
    "#ids": {
        "resultOf": "t0",
        "path": "/changed"
    }
}, "t1" ]]</code><br></pre><p>Now after executing the first method call the=
 response array is:<br></p><pre><code>[[ "messageUpdates", {
    "accountId": "1",
    "oldState": "abcdef",
    "newState": "123456",
    "hasMoreUpdates": false,
    "changed": [ "msg1", "msg4" ],
    "removed": []
}, "t0" ]]</code><br></pre><p>So to execute the getMessages call, we look t=
hrough the arguments and find there is one with a <code>#</code> prefix. To=
 resolve this, we apply the algorithm above:<br></p><ol><li><div>Find the f=
irst response with client id =E2=80=9Ct0=E2=80=9D. The =E2=80=9CmessageUpda=
tes=E2=80=9D response <br></div>
<div>fulfils this criterion.<br></div>
</li><li><div>Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=
=80=99s messageUpdates=E2=80=9D, so this is <br></div>
<div>fine.<br></div>
</li><li><div>Apply the <i>path</i> as a JSON pointer to the arguments obje=
ct. This simply <br></div>
<div>selects the =E2=80=9Cchanged=E2=80=9D property, so the result of evalu=
ating is:<br></div>
<div><code>[ "msg1", "msg4" ]</code><br></div>
</li></ol><p>The JMAP server now continues to process the getMessages call =
as though the arguments were:<br></p><pre><code>{
    "ids": [ "msg1", "msg4" ]
}
</code><br></pre><p>Now a more complicated example: fetch the =E2=80=9Cfrom=
=E2=80=9D/=E2=80=9Ddate=E2=80=9D/=E2=80=9Dsubject=E2=80=9D for every messag=
e in the first 10 threads in the Inbox (sorted newest first):<br></p><pre><=
code>[[ "getMessageList", {
  "filter": { inMailbox: "id_of_inbox" },
  "sort": [ "date desc" ],
  "collapseThreads": true,
  "position": 0,
  "limit": 10
}, "t0" ],
[ "getMessages", {
  "#ids": {
    "resultOf": "t0",
    "path": "/ids"
  },
  "properties": [ "threadId" ]
}, "t1" ],
[ "getThreads", {
  "#ids": {
    "resultOf": "t1",
    "path": "/list/*/threadId"
  }
}, "t2" ],
[ "getMessages", {
  "#ids": {
    "resultOf": "t2"
    "path": "/list/*/messageIds"
  },</code><br></pre><pre><code>  "properties": [ "from", "date", "subject"=
 ]
}, "t3" ]]</code><br></pre><p>After executing the first 3 method calls the =
response array is:<br></p><pre><code>[[ "messageList", {
    "accountId": "1",
    "filter": { inMailbox: "id_of_inbox" },
    "sort": [ "date desc" ],
    "collapseThreads": true,
    "state": "abcdefg",
    "canCalculateUpdates": true,
    "position": 0,
    "total": 101,
    "ids": [ "msg1023", "msg223", "msg110", "msg93", "msg91", "msg38", "msg=
36", "msg33", "msg11", "msg1" ]
}, "t0" ],
[ "messages", {
    "accountId": "1",
    "state": "123456",
    "list": [{
        "id": "msg1023",
        "threadId": "trd194",
    }, {
        "id": "msg223",
        "threadId": "trd114"
    },=20
    ... etc...=20
    ],
    "notFound": null
}, "t1" ],
[ "threads", {
    "accountId": "1",
    "state": "123456",
    "list": [{
        "id: "trd194",
        "messageIds": [ "msg1020", "msg1021", "msg1023" ]
    }, {
        "id: "trd114",
        "messageIds": [ "msg201", "msg223" ]
    },=20
    ... etc...=20
    ],
    "notFound": null
}, "t2" ]]
</code><br></pre><p>So to execute the final getMessages call, we look throu=
gh the arguments and find there is one with a <code>#</code> prefix. To res=
olve this, we apply the algorithm:<br></p><ol><li><div>Find the first respo=
nse with client id =E2=80=9Ct2=E2=80=9D. The =E2=80=9Cthreads=E2=80=9D resp=
onse <br></div>
<div>fulfils this criterion.<br></div>
</li><li>Check the response name is not =E2=80=9Cerror=E2=80=9D. It=E2=80=
=99s threads=E2=80=9D, so this is fine.<br></li><li><div>Apply the <i>path<=
/i> as a JSON pointer to the arguments object. Token-by-token: <br></div>
</li><ol><li><div><code><b>list</b></code>&nbsp;=E2=80=93 get the array of =
thread objects<br></div>
</li><li><div><b>*</b>&nbsp;=E2=80=93 for each of the items in the array:<b=
r></div>
</li><ol><li><div><code><b>messsageIds</b></code>&nbsp;=E2=80=93 get the ar=
ray of message ids<br></div>
</li><li><div>Concatenate these into a single array of all the ids in the r=
esult.<br></div>
</li></ol></ol></ol><p>The JMAP server now continues to process the getMess=
ages call as though the arguments were:<br></p><pre><code>{
    "ids": [ "msg1020", "msg1021", "msg1023", "msg201", "msg223", etc... ],=
</code><br></pre><pre><code>    </code>"properties": [ "from", "date", "sub=
ject" ]<code>
}</code><br></pre><p>For reference, in case it=E2=80=99s clearer than my de=
scription, here=E2=80=99s a JavaScript implementation of the pointer resolu=
tion algorithm, with the addition to RFC6901 clearly marked:<br></p><pre><c=
ode>function evaluatePointer ( value, pointer ) {
    if ( !pointer ) {
        return value;
    }
    if ( pointer.charAt( 0 ) !=3D=3D '/' ) {
        throw new Error( 'Invalid pointer' );
    }
    let token;
    let next =3D pointer.indexOf( '/', 1 );
    if ( next !=3D=3D -1 ) {
        token =3D pointer.slice( 1, next );
        pointer =3D pointer.slice( next );
    } else {
        token =3D pointer.slice( 1 );
        pointer =3D '';
    }
    token =3D token.replace( /~1/g, '/' ).replace( /~0/g, '~' );
    if ( Array.isArray( value ) ) {
        if ( /^(?:0|[1-9][0-9]*)$/.test( token ) ) {
            return evaluatePointer( value[ parseInt( token, 10 ) ], pointer=
 );
        }
        <span class=3D"colour" style=3D"color:rgb(0, 0, 0)"><span class=3D"=
highlight" style=3D"background-color:rgb(255, 255, 224)">/* start: the only=
 bit that differs from RFC6901 */
        if ( token =3D=3D=3D '*' ) {
            /* Map values to pointer */
            value =3D value.map( item =3D&gt; evaluatePointer( item, pointe=
r ) );
            /* Flatten output */
            return value.reduce( ( output, item ) =3D&gt; {
                if ( !Array.isArray( item ) ) {
                    item =3D [ item ];
                }
                return output.concat( item );
            }, [] );
        }
        /* end */</span></span>
    } else if ( value !=3D=3D null &amp;&amp; typeof value =3D=3D=3D 'objec=
t' ) {
        return evaluatePointer( value[ token ], pointer );
    }
    throw new Error( 'Evaluation failed' );
}
</code><br></pre><div>So:<br></div>
<ul><li>What do people think of the result-reference concept to replace the=
 fetchRecords etc. arguments and reduce the amount of special-casing?<br></=
li><li>Presuming agreement this is a good idea, is this syntax good? If not=
, please suggest an alternative! (I've tried to reuse RFC6901 as much as po=
ssible as the only relevant standard I'm aware of, but if you know of anoth=
er standard that's more suitable please let me know).<br></li></ul><div><br=
></div>
<div>The full change proposal can be seen in the pull request at&nbsp;<a hr=
ef=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__github.com_jma=
pio_jmap_pull_148&amp;d=3DDwMFaQ&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkK=
Y057SbK10&amp;r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&amp;m=3DCtS0U=
t-8SOYtTU2EShd7Qt1Wa66iG5eF637_nimF-OM&amp;s=3D8kEj1hBS8M2M_XaHaB3x831iSoNk=
mvDpY8cNsW5gYiA&amp;e=3D">https://github.com/jmapio/jmap/pull/148</a>.<br><=
/div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.<br></div>
</blockquote><div style=3D"white-space: normal;"><blockquote style=3D"color=
: rgb(119, 119, 119); border-left: 2px solid rgb(119, 119, 119); padding-le=
ft: 5px; margin: 0px 0px 5px;"><br></blockquote><blockquote style=3D"color:=
 rgb(119, 119, 119); border-left: 2px solid rgb(119, 119, 119); padding-lef=
t: 5px; margin: 0px 0px 5px;"><p><div style=3D"font-family:Arial;">________=
_______________________________________<br></div>
<div style=3D"font-family:Arial;"> Jmap mailing list<br></div>
<div style=3D"font-family:Arial;"> Jmap@ietf.org<br></div>
<div style=3D"font-family:Arial;"> <a style=3D"color: rgb(119, 119, 119);" =
href=3D"https://urldefense.proofpoint.com/v2/url?u=3Dhttps-3A__www.ietf.org=
_mailman_listinfo_jmap&amp;d=3DDwICAg&amp;c=3DRoP1YumCXCgaWHvlZYR8PQcxBKCX5=
YTpkKY057SbK10&amp;r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&amp;m=3D=
CtS0Ut-8SOYtTU2EShd7Qt1Wa66iG5eF637_nimF-OM&amp;s=3Dh4UnZPECDHeyTajis8WzolS=
W6T9P-tPU7kMtP8abZcM&amp;e=3D">https://urldefense.proofpoint.com/v2/url?u=
=3Dhttps-3A__www.ietf.org_mailman_listinfo_jmap&amp;d=3DDwICAg&amp;c=3DRoP1=
YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&amp;r=3DQBZgPENFbjFadxqU4HJ3ZDpRz3X=
1JlDY-keqMt52FFo&amp;m=3DCtS0Ut-8SOYtTU2EShd7Qt1Wa66iG5eF637_nimF-OM&amp;s=
=3Dh4UnZPECDHeyTajis8WzolSW6T9P-tPU7kMtP8abZcM&amp;e=3D</a><br></div>
</p></blockquote></div>
<div><u>_______________________________________________</u><br></div>
<div>Jmap mailing list<br></div>
<div><a href=3D"mailto:Jmap@ietf.org">Jmap@ietf.org</a><br></div>
<div><a href=3D"https://www.ietf.org/mailman/listinfo/jmap">https://www.iet=
f.org/mailman/listinfo/jmap</a><br></div>
</blockquote><div style=3D"font-family:Arial;"><br></div>
<div id=3D"sig56629417"><div class=3D"signature">--<br></div>
<div class=3D"signature">&nbsp; Bron Gondwana, CEO, FastMail Pty Ltd<br></d=
iv>
<div class=3D"signature">&nbsp; brong@fastmailteam.com<br></div>
<div class=3D"signature"><br></div>
</div>
<div style=3D"font-family:Arial;"><br></div>
</body>
</html>

--_----------=_150700127528359062--


From nobody Mon Oct  2 23:01:29 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 03D89134300 for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 23:01:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level: 
X-Spam-Status: No, score=-2.72 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=Pqd/4htb; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=HqvIcOAT
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 F8wg_1fDGLKO for <jmap@ietfa.amsl.com>; Mon,  2 Oct 2017 23:01:22 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4013C1342F3 for <jmap@ietf.org>; Mon,  2 Oct 2017 23:01:22 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 62F5C20AD6 for <jmap@ietf.org>; Tue,  3 Oct 2017 02:01:21 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Tue, 03 Oct 2017 02:01:21 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=bL+b8BGhWHbYwwePh RmHriAkhFhc+LS6vkiBaGtCUxo=; b=Pqd/4htbAQqs3ZUZqLUQyiRVBgkgaBpDN gSuhX+QExIItd9DaN0fUAuvou/a5pgxOfPapU9SKXIGz7NKbGehiEVoZ2QaxgIJf olV4Y+3ek+dObobK5D1YP2K5jK5UL2U5SRqwihOEeQpGfWTgFZO3xtq0m65KVA4A +F0WjbUzTq+0HwP8ykIRtOChgESGOj3LF8cg00YSo+IQlCC8tVSIJbXXGd3A1xI2 rHp/gN8a5DsElLSxFhPObP9FGgSgAepycGPaLy8Pwwwm3YTzukXT4rD2j+R5nmz3 tWadJLhy6tRAuh3jni+VNgpPoMcQ6WaXQ8yPe6xAp+jOcQaz/6S2w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=bL+b8B GhWHbYwwePhRmHriAkhFhc+LS6vkiBaGtCUxo=; b=HqvIcOATyOKSW343HP41Kx Bu4eCsHaFmpZmh7GHXvl+tZuRVkRkMZsqh3Pxab3/gfFyOqaqtLEAQUGoBWV5tGG sv5ijRgSazF5WBev9D83h9rz9SO/md8RxKObmraXwMbuRugt70/y5kUVUMfH20vt ebVos+/ArCWiXnOKs3BtdrFZtxvrZkfOPFYrTbvz6Pyg2goE524INOv6QqEremJA petr6Yd3aQhg8DJnxz8oX3YM1jSkEwn6EopTGe8EiprlXZSGFCbfrEFJ+63Dvrei QDaIuUqQqeXNPkNwc3AQaB4Qu8WpUA/4EmXgfw4qH1Ut5FHUNUnVgi4Jw2HZflAQ ==
X-ME-Sender: <xms:sSfTWXnPKBFoIiVZ0o5Nm4M4jdw6ct0rH5hmDJssyJax-_vfjkALQA>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 1CE4EE2680; Tue,  3 Oct 2017 02:01:21 -0400 (EDT)
Message-Id: <1507010481.2109029.1125913408.3E426278@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150701048121090296"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-5f0bf376
Date: Tue, 03 Oct 2017 17:01:21 +1100
References: <1506913532.827302.1124530352.095C39E3@webmail.messagingengine.com> <03492EC8-BB2F-499B-96AA-4443439704B9@oracle.com>
In-Reply-To: <03492EC8-BB2F-499B-96AA-4443439704B9@oracle.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/hGdrw6MBHz0xszVTxZ_DVH0eb4k>
Subject: Re: [Jmap] Mailbox#role vs IMAP SPECIAL-USE
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 03 Oct 2017 06:01:26 -0000

This is a multi-part message in MIME format.

--_----------=_150701048121090296
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

On Tue, 3 Oct 2017, at 12:07 PM, Chris Newman wrote:
> 1. Add a rule that JMAP servers that front-end an IMAP mail store
>    SHOULD make a best effort to apply the proper JMAP role to existing
>    IMAP folders (with configurable names) for IMAP accounts lacking a
>    given special use attribute. That is, if the IMAP account lacks a
>    folder with a "Sent" role, the JMAP server should look for folders
>    with likely names (e.g., "Sent" or "Sent Messages" or translations
>    of that to other languages) and apply the IMAP special use and JMAP
>    role.
I think this is a good idea (and can go in server advice), but I also
wonder whether it's worth removing the immutable constraint? This is the
least useful of the three, and there's clearly a use case for adding
special use later, particularly when migrating from existing IMAP
systems but also if new roles are defined later and you happen to have a
mailbox you were already using for this purpose. Servers must be able to
reject changes here of course still (particularly removing or changing
an existing role).
Neil.

--_----------=_150701048121090296
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Tue, 3 Oct 2017, at 12:07 PM, Chris Newman wrote:<br></div>
<blockquote type="cite"><div style="white-space: normal;"><p>1. Add a rule that JMAP servers that front-end an IMAP mail store SHOULD make a best effort to apply the proper JMAP role to existing IMAP folders (with configurable names) for IMAP accounts lacking a given special use attribute. That is, if the IMAP account lacks a folder with a "Sent" role, the JMAP server should look for folders with likely names (e.g., "Sent" or "Sent Messages" or translations of that to other languages) and apply the IMAP special use and JMAP role.<br></p></div>
</blockquote><div><br></div>
<div>I think this is a good idea (and can go in server advice), but I also wonder whether it's worth removing the immutable constraint? This is the least useful of the three, and there's clearly a use case for adding special use later, particularly when migrating from existing IMAP systems but also if new roles are defined later and you happen to have a mailbox you were already using for this purpose. Servers must be able to reject changes here of course still (particularly removing or changing an existing role).<br></div>
<div><br></div>
<div>Neil.</div>
</body>
</html>

--_----------=_150701048121090296--


From nobody Tue Oct 10 20:43:59 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C146E13263F for <jmap@ietfa.amsl.com>; Tue, 10 Oct 2017 20:43:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.02
X-Spam-Level: 
X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=k99A4lLZ; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=TaZyfqdp
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 lekyWdeZCsqC for <jmap@ietfa.amsl.com>; Tue, 10 Oct 2017 20:43:56 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 6318B1321AC for <jmap@ietf.org>; Tue, 10 Oct 2017 20:43:56 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 92DBA208AB for <jmap@ietf.org>; Tue, 10 Oct 2017 23:43:55 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Tue, 10 Oct 2017 23:43:55 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=content-transfer-encoding:content-type:date :from:message-id:mime-version:subject:to:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=BLjETksRixU6YaPBt4yYyPYrWNcW860ixv/9HSwwW Ec=; b=k99A4lLZqdeTv/NoTGSlTgJq7Giaa4N9JBcuRIv4SVvG2+cNl2wH3/KI/ 24w2Uw1rUoM8bv3nLx0l11WTTd3OEUp8eZjh7n0CITmBLYdtw+CQPBLSCq/EtEIO +1xoANm6I330haCaiFpj55dMyvcJJ5rNrAzpHNpYmRx51ulw8wJN3RCxtfFaRkBT bjiDcOvBem9X3cJaDCVF8BtvrbIuf0qseisto50O93jDSVL3DQxuOyfh3LEnsOSn kS/i9qQNgzmqKvGEISDMR1NYeeyipD6idG6LiQ/1BBmsHvthNJnoNwSDv0340/WC zd6MuTYNZrie26kfRXgZQq/lHonlA==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=BLjETksRixU6YaPBt4yYyPYrWNcW8 60ixv/9HSwwWEc=; b=TaZyfqdp2xeHwJS2kkQzIW10U00IKkEnZWUMKObyVESH/ 4Ly+6n1QnBI1++xeFL9pItNFqokOaNL4uTveH/UNky2IZCwHC0+czhyktI8rtulX f/bQT9lSycXo/PfmguG27ZBsdqULH1+Gw4e64A0Xt1rpMfD5fxzQLOdisuvhxJ34 JXZXawqZYTilZVnDMH0/csrdjmVj+b0aeFuSgBn4/krYXjPfkjbuoM/6IhwtWbE2 tfZIq0+PIg4P0LALwnzDoMIaaybmpnS5zyKnk+4r7pjOztjGh+cxaRpY6t9uxj33 WVobJ4YR3DkpkMvC1SvufMwdZwoiusmwS3ow/Un6A==
X-ME-Sender: <xms:e5PdWcfpzxYzc_xSdVVXhtWENwkcW237mlsuKsY9EgTZYHodRS82IA>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 4C673E244D; Tue, 10 Oct 2017 23:43:55 -0400 (EDT)
Message-Id: <1507693435.3223399.1134762568.16484F8A@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150769343532233991"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-d6c927c6
Date: Wed, 11 Oct 2017 14:43:55 +1100
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/IkFaQ1DPX5C2nEUr85RPa_RXQZ0>
Subject: [Jmap] Minimal updates
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 03:43:58 -0000

This is a multi-part message in MIME format.

--_----------=_150769343532233991
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

Updates in JMAP are already patches, so you can omit any top-level
properties that you don't want to change. However, at the moment you
have to set the whole property if you make a change to any part of it. I
think we should allow a more fine-grained patching approach, to minimise
data transfer and to allow you to do things like add a keyword without
caring what other keywords are currently on the object.
My proposed change is in a pull request on GitHub, but I'll also
summarise it below for discussion:
In setFoos:


--_----------=_150769343532233991
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>Updates in JMAP are already patches, so you can omit any top-level properties that you don't want to change. However, at the moment you have to set the whole property if you make a change to any part of it. I think we should allow a more fine-grained patching approach, to minimise data transfer and to allow you to do things like add a keyword without caring what other keywords are currently on the object.<br></div>
<div><br></div>
<div>My proposed change is in a pull request on GitHub, but I'll also summarise it below for discussion:<br></div>
<div><br></div>
<div>In setFoos:<br></div>
<div><br></div>
</body>
</html>

--_----------=_150769343532233991--


From nobody Tue Oct 10 20:53:21 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 1E8DC1323B4 for <jmap@ietfa.amsl.com>; Tue, 10 Oct 2017 20:53:20 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level: 
X-Spam-Status: No, score=-2.72 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=pKZh48ul; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ruoMFbTM
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 1sEYh8U85Kbm for <jmap@ietfa.amsl.com>; Tue, 10 Oct 2017 20:53:18 -0700 (PDT)
Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id C61271321AC for <jmap@ietf.org>; Tue, 10 Oct 2017 20:53:17 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 3ACC9209E9 for <jmap@ietf.org>; Tue, 10 Oct 2017 23:53:17 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Tue, 10 Oct 2017 23:53:17 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=QDS2sDbKqyQSWGU5H pW5ANlZFnsN6+PIC94xtMLBqcM=; b=pKZh48uluQT4SOImH5ztu1j3Uq32nYB5Q tSGOL2AQNdQ1u4KZX9bsV4sHKqCLerKHlgpkX5SSWD0btf4IuVrjPWM+SlHgpAcm h/mtT5JG/FelJem5KTWaZTY1M8AiSfB0JXBzSABEO/wSxPLeq2WpOcGaqeQLvCy2 yDElLbFIlOZzNGwWXKS7YlkTnIF4KgcD2iva5aM2iVOpnyd4WQ36uB6uZfLgtayM tvoyqmcHgw/WiUZJUEqyp6xTcnrxjFUCJ5eJWGiJCsyKCOQbHMaW7Cm7ecvLcWPH 6PzWbmdpY+nFLgEKeeLYm7cFVUu/W+IQIcLFYgIxp/SKor01PshMw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=QDS2sD bKqyQSWGU5HpW5ANlZFnsN6+PIC94xtMLBqcM=; b=ruoMFbTMWBVhVIeLiu+xsw zv9AnqXpDWnCvjqIQIfBZdnu9+yvQnGcavfqKAlmWN0d1bPBMxI34PKejgfQ9ebK VN3GEjPe3hl1MfBKnJ2IeiiJLRcqQ+QKjoCPpWDNlRQElwwMtu+V8kzWgMOeqetM 3nmKPDVL5l3fovqS1MgBhxkHJ98Wb4rJH9eTUoc9iEJu1IG2azYw+N022isQBFnn akvVWZ21MiBRI96paP+nF4xkc/xTP3A0NEU3iWcHkc9Xo4FGmekwcPqVCsXhnxkz YS+EMaOCcTzh8KML4R3uEDyk9SzXkMjPCWrxIumCiXmXblVyTvKVB/N1ek6jbRMA ==
X-ME-Sender: <xms:rZXdWZUiz1tb3rBn4DRe3I6eT2Iku7em5akDPRX2FXrw9U94lNVe4w>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id E6D63E244D; Tue, 10 Oct 2017 23:53:16 -0400 (EDT)
Message-Id: <1507693996.3234131.1134772112.5C255E19@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150769399632341311"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-d6c927c6
Date: Wed, 11 Oct 2017 14:53:16 +1100
In-Reply-To: <1507693435.3223399.1134762568.16484F8A@webmail.messagingengine.com>
References: <1507693435.3223399.1134762568.16484F8A@webmail.messagingengine.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/frfx9krL6Lf3ncRQPOMi__3_Wlc>
Subject: Re: [Jmap] Minimal updates
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 11 Oct 2017 03:53:20 -0000

This is a multi-part message in MIME format.

--_----------=_150769399632341311
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

*Ah, undo send, *sigh*. Anyway, let's try that again:*

Updates in JMAP are already patches, so you can omit any top-level
properties that you don't want to change. However, at the moment you
have to set the whole property if you make a change to any part of it.
I think we should allow a more fine-grained patching approach, to
minimise data transfer and to allow you to do things like add/remove a
keyword without caring what other keywords are currently on the object
(at the moment you have to specify the whole set if you want to change
them in any way).
My proposed change is in a pull request on GitHub[1], but I'll also
summarise it below for discussion:
In *setFoos, *this is the new description for the *update* argument
(type: String[PatchObject]|null):
A map of id to a Patch object to apply to the current Foo object with
that id, or null if no objects are to be updated.A *PatchObject* is of type=
 String[*], and represents an unordered set of
patches.  The keys are a path in [@!RFC6901] JSON pointer format, with
an implicit leading =E2=80=9C/=E2=80=9D (i.e. prefix each key with =E2=80=
=9C/=E2=80=9D before applying
the JSON pointer evaluation algorithm).All paths MUST also conform to the f=
ollowing restrictions; if there is
any violation, the update MUST be rejected with an invalidPatch error:


 * The pointer MUST NOT reference inside an array (i.e. you MUST NOT
   insert/delete from an array; the array MUST be replaced in its
   entirety instead).
 * All parts prior to the last (i.e. the value after the final slash)
   MUST already exist on the object being patched.
 * There MUST NOT be two patches in the PatchObject where the pointer of
   one is the prefix of the pointer of the other, e.g. =E2=80=9Calerts/1/of=
fset=E2=80=9D
   and =E2=80=9Calerts=E2=80=9D.The value associated with each pointer dete=
rmines how to apply
that patch:


 * If null, set to the default value if specified for this property,
   otherwise remove the property from the patched object. If the key is
   not present in the parent, this a no-op.
 * Anything else: The value to set for this property (this may be a
   replacement or addition to the object being patched).Any server-set prop=
erties MAY be included in the patch if their value is
identical to the current server value (before applying the patches to
the object). Otherwise, the update MUST be rejected with an
*invalidProperties* SetError.This patch definition is designed such that an=
 entire Foo object is also
a valid PatchObject. The client MAY choose to optimise network usage by
just sending the diff, or MAY just send the whole object; the server
processes it the same either way.Example



Suppose we have a type *Todo* with the following properties:




 * *id*: String (immutable; server-set) The id of the object.

 * *title*: String The =E2=80=9CFrom=E2=80=9D *name* the client SHOULD use =
when creating
   a new message from this identity.

 * *keywords*: String[Boolean] (mutable; default: {}) A set of keywords
   that apply to the message. The set is represented as an object, with
   the keys being the *keywords*. The value for each key in the object
   MUST be true.

 * *neuralNetworkTimeEstimation*: Number (server-set) The title and
   keywords are fed into the server=E2=80=99s state-of-the-art neural netwo=
rk to
   get an estimation of how long this todo will take, in seconds.Now we fet=
ched a Todo of id =E2=80=9Ca=E2=80=9D (let=E2=80=99s presume we already kne=
w a Todo
with this id existed):
[["getTodos", { "ids": ["a"] }, "0"]]
and got back:



[["todos", { "accountId": "x", "state": "10324", "list": [{ "id": "a",
"title": "Practice Piano", "keywords": { "beethoven": true, "mozart":
true, "liszt": true, "rachmaninov": true },
"neuralNetworkTimeEstimation": 3600 }] }, "0"]]
Now the user adds a keyword =E2=80=9Cchopin=E2=80=9D and removes the keywor=
d =E2=80=9Cmozart=E2=80=9D.
The client may send the whole object to the server, as this is a valid
PatchObject:
[["setTodos", { "ifInState": "10324", "update": { "a": { "id": "a",
"title": "Practice Piano", "keywords": { "beethoven": true, "chopin":
true, "liszt": true, "rachmaninov": true, }
"neuralNetworkTimeEstimation": 360 } } }, "0"]]
or it may send a minimal patch:

[["setTodos", { "ifInState": "10324", "update": { "a": {
"keywords/chopin": true, "keywords/mozart": null } } }, "0"]]
The effect is exactly the same on the server in either case, and
presuming the server is still in state =E2=80=9C10324=E2=80=9D it will prob=
ably
return success:



[["todosSet", { "accountId": "x", "oldState": "10324", "newState":
"10329", "updated": { "a": { "neuralNetworkTimeEstimation": 5400 }
} }, "0"]]The server changed the =E2=80=9CneuralNetworkTimeEstimation=E2=80=
=9D property on the
object as part of this change; as this changed in a way *not* explicitly
requested by the PatchObject sent to the server, it is returned with the
=E2=80=9Cupdated=E2=80=9D confirmation.-------

Any comments, queries?

Neil.

Links:

  1. https://github.com/jmapio/jmap/pull/148/commits/da93735ecca6c63e1c3661=
80c442656a340e1d9e

--_----------=_150769399632341311
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div><i>Ah, undo send, *sigh*. Anyway, let's try that again:</i><br><=
/div>
<div><br></div>
<div>Updates in JMAP are already patches, so you can omit any top-level pro=
perties that you don't want to change. However, at the moment you have to s=
et the whole property if you make a change to any part of it. I think we sh=
ould allow a more fine-grained patching approach, to minimise data transfer=
 and to allow you to do things like add/remove a keyword without caring wha=
t other keywords are currently on the object (at the moment you have to spe=
cify the whole set if you want to change them in any way).<br></div>
<div><br></div>
<div>My proposed change is in a pull request <a href=3D"https://github.com/=
jmapio/jmap/pull/148/commits/da93735ecca6c63e1c366180c442656a340e1d9e">on G=
itHub</a>, but I'll also summarise it below for discussion:<br></div>
<div><br></div>
<div>In <b>setFoos,&nbsp;</b>this is the new description for the&nbsp;<b>up=
date</b> argument (type:&nbsp;<code>String[PatchObject]|null):</code><br></=
div>
<div> <br></div>
<div>A map of id to a Patch object to apply to the current Foo object with =
that id, or <code>null</code> if no objects are to be updated.<br></div>
<p>A <i>PatchObject</i> is of type <code>String[*]</code>, and represents a=
n unordered set of patches.  The keys are a path in [@!RFC6901] JSON pointe=
r format, with an implicit leading =E2=80=9C/=E2=80=9D (i.e. prefix each ke=
y with =E2=80=9C/=E2=80=9D before applying the JSON pointer evaluation algo=
rithm).<br></p><p>All paths MUST also conform to the following restrictions=
; if there is any violation, the update MUST be rejected with an <code>inva=
lidPatch</code> error:<br></p><ul><li>The pointer MUST NOT reference inside=
 an array (i.e. you MUST NOT insert/delete from an array; the array MUST be=
 replaced in its entirety instead).<br></li><li>All parts prior to the last=
 (i.e. the value after the final slash) MUST already exist on the object be=
ing patched.<br></li><li>There MUST NOT be two patches in the PatchObject w=
here the pointer of one is the prefix of the pointer of the other, e.g. =E2=
=80=9Calerts/1/offset=E2=80=9D and =E2=80=9Calerts=E2=80=9D.<br></li></ul><=
p>The value associated with each pointer determines how to apply that patch=
:<br></p><ul><li>If <code>null</code>, set to the default value if specifie=
d for this property, otherwise remove the property from the patched object.=
 If the key is not present in the parent, this a no-op.<br></li><li>Anythin=
g else: The value to set for this property (this may be a replacement or ad=
dition to the object being patched).<br></li></ul><p>Any server-set propert=
ies MAY be included in the patch if their value is identical to the current=
 server value (before applying the patches to the object). Otherwise, the u=
pdate MUST be rejected with an <i>invalidProperties</i> SetError.<br></p><p=
>This patch definition is designed such that an entire Foo object is also a=
 valid PatchObject. The client MAY choose to optimise network usage by just=
 sending the diff, or MAY just send the whole object; the server processes =
it the same either way.<br></p><h3><a id=3D"Example_453"></a>Example
<br></h3><p>Suppose we have a type <em>Todo</em> with the following propert=
ies:
<br></p><ul><div>
<br></div>
<li><strong>id</strong>: <code>String</code> (immutable; server-set)<br>
The id of the object.
<br></li><li><strong>title</strong>: <code>String</code><br>
The =E2=80=9CFrom=E2=80=9D <em>name</em> the client SHOULD use when creatin=
g a new message from this identity.
<br></li><li><strong>keywords</strong>: <code>String[Boolean]</code> (mutab=
le; default: <code>{}</code>)<br>
A set of keywords that apply to the message. The set is represented as an o=
bject, with the keys being the <em>keywords</em>. The value for each key in=
 the object MUST be <code>true</code>.
<br></li><li><strong>neuralNetworkTimeEstimation</strong>: <code>Number</co=
de> (server-set)<br>
The title and keywords are fed into the server=E2=80=99s state-of-the-art n=
eural<br>
network to get an estimation of how long this todo will take, in seconds.</=
li></ul><p>Now we fetched a Todo of id =E2=80=9Ca=E2=80=9D (let=E2=80=99s p=
resume we already knew a Todo with this id existed):<br></p><div>
<br></div>
<pre><code>[["getTodos", {
  "ids": ["a"]
}, "0"]]</code><br></pre><p>and got back:
<br></p><pre><code>[["todos", {
  "accountId": "x",
  "state": "10324",
  "list": [{
    "id": "a",
    "title": "Practice Piano",
    "keywords": {
      "beethoven": true,
      "mozart": true,
      "liszt": true,
      "rachmaninov": true
    },
    "neuralNetworkTimeEstimation": 3600
  }]
}, "0"]]
</code><br></pre><div>
<br></div>
<div>Now the user adds a keyword =E2=80=9Cchopin=E2=80=9D and removes the k=
eyword =E2=80=9Cmozart=E2=80=9D. The client may send the whole object to th=
e server, as this is a valid PatchObject:<br></div>
<div>
<br></div>
<pre><code>[["setTodos", {
  "ifInState": "10324",
  "update": {
    "a": {
      "id": "a",
      "title": "Practice Piano",
      "keywords": {
        "beethoven": true,
        "chopin": true,
        "liszt": true,
        "rachmaninov": true,
      }
      "neuralNetworkTimeEstimation": 360
    }
  }
}, "0"]]
</code><br></pre><div>
<br></div>
<div>or it may send a minimal patch:<br></div>
<div>
<br></div>
<pre><code>[["setTodos", {
  "ifInState": "10324",
  "update": {
    "a": {
      "keywords/chopin": true,
      "keywords/mozart": null
    }
  }
}, "0"]]
</code><br></pre><div>
<br></div>
<p>The effect is exactly the same on the server in either case, and presumi=
ng the server is still in state =E2=80=9C10324=E2=80=9D it will probably re=
turn success:
<br></p><pre><code>[["todosSet", {
  "accountId": "x",
  "oldState": "10324",
  "newState": "10329",
  "updated": {
    "a": {
      "neuralNetworkTimeEstimation": 5400
    }
  }
}, "0"]]</code><br></pre><p>The server changed the =E2=80=9CneuralNetworkTi=
meEstimation=E2=80=9D property on the object as part of this change; as thi=
s changed in a way <em>not</em> explicitly requested by the PatchObject sen=
t to the server, it is returned with the =E2=80=9Cupdated=E2=80=9D confirma=
tion.<br></p><div>-------<br></div>
<div><br></div>
<div>Any comments, queries?<br></div>
<div><br></div>
<div>Neil.<br></div>
</body>
</html>

--_----------=_150769399632341311--


From nobody Sun Oct 15 22:09:03 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id DCF23126DFE for <jmap@ietfa.amsl.com>; Sun, 15 Oct 2017 22:09:01 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.02
X-Spam-Level: 
X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[BAYES_50=0.8, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=WTk2rbNS; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=LsyVQC07
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 Is5gW1Jsvobd for <jmap@ietfa.amsl.com>; Sun, 15 Oct 2017 22:09:00 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 42B1E134239 for <jmap@ietf.org>; Sun, 15 Oct 2017 22:09:00 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 7080820A98 for <jmap@ietf.org>; Mon, 16 Oct 2017 01:08:57 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Mon, 16 Oct 2017 01:08:57 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=gwOi1w+2gftywuP3J XnoFFk6ajb82S4FZzuX0c14LWs=; b=WTk2rbNSREkRnRMxccMhvr90vihvU5H7T qW5fTa1udGTPjwTlOfKhP0pOt/HRqXQXV7LO+t8V72F+Eq+9eeTdXrya5rOLECdt 5kj3b/yXndM8qOHCKdAcrED1kP8q7uPIcg6LhZP43IE0rAkU0oh4U2TeN2vohek7 cipnkHUqDDoai8zLp7qMcuw7xZXG8DSBo5HwhhUaTPOzT+k9N9/E6/HLGFg/+Plw gFTrOkd1wxokjVCSm2+QYUNfXHiLfBze8J/V6dbWq8P1fntvfg7MJVxEtmd/PFnW nuG13EQyPc/ZRdmmtwdvor+7HpHBgniX9HQDdPl+Ph2AjwFyRVK4g==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=gwOi1w +2gftywuP3JXnoFFk6ajb82S4FZzuX0c14LWs=; b=LsyVQC07SWX92DgXnOxNd/ qBXtALRjCzYA9ksfJMWz3//DzXKBCvAaVO3Htlrr8PIQwzTOzbxnBa1XfB7UoioS SB7F6bO2lwybN7Gd1jxf/4TQwoPvs520ONqWP/kWEl7+6x7b7Me6knwBuA1rnz11 mSz56cnLBPsE1xKeXqVmxOqJoi+RLDOsaCp7s2fVi0pRBT2ZvdY5V9o7xL/LVTQ8 4XIF4U+WZNEpXlkssRbWKEIH9z4Q6s3rm/3DUWEYNz2EWzhs+7YJRLGKVUWxZRf4 htg0jywmMm+9wnWxMd2/Jir4FW61Qd/kh4kDt2YHUVF4NAhQScUK+Lhm6JIOLDpw ==
X-ME-Sender: <xms:6T7kWa8J89BvqKP9m6iAv9mo66P1prB_2h3gbPbXtPeBlcJY2WGnpQ>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 2A942E2625; Mon, 16 Oct 2017 01:08:57 -0400 (EDT)
Message-Id: <1508130537.1220089.1139875904.697DE4B5@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150813053712200890"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-e3478dff
In-Reply-To: <1507693996.3234131.1134772112.5C255E19@webmail.messagingengine.com>
Date: Mon, 16 Oct 2017 16:08:57 +1100
References: <1507693435.3223399.1134762568.16484F8A@webmail.messagingengine.com> <1507693996.3234131.1134772112.5C255E19@webmail.messagingengine.com>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/42vNdRVRc5fTx-Qg3MxLNAF_hXg>
Subject: Re: [Jmap] Minimal updates
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 16 Oct 2017 05:09:02 -0000

This is a multi-part message in MIME format.

--_----------=_150813053712200890
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

With IETF Singapore coming up, I would like to merge this pull request
by next week so they are included when I upload a new draft spec to the
IETF data tracker. Any comments on:
 * patch syntax for updates
 * using the result of one method as a subsequent method argument=E2=80=A6 =
please send them through this week!

Cheers,
Neil.

--_----------=_150813053712200890
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>With IETF Singapore coming up, I would like to merge this pull r=
equest by next week so they are included when I upload a new draft spec to =
the IETF data tracker. Any comments on:<br></div>
<ul><li>patch syntax for updates<br></li><li>using the result of one method=
 as a subsequent method argument<br></li></ul><div>=E2=80=A6 please send th=
em through this week!<br></div>
<div><br></div>
<div>Cheers,<br></div>
<div>Neil.</div>
</body>
</html>

--_----------=_150813053712200890--


From nobody Fri Oct 20 17:26:59 2017
Return-Path: <agenda@ietf.org>
X-Original-To: jmap@ietf.org
Delivered-To: jmap@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 3AD53134487; Fri, 20 Oct 2017 17:24:18 -0700 (PDT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: "\"IETF Secretariat\"" <agenda@ietf.org>
To: <brong@fastmailteam.com>, <jmap-chairs@ietf.org>
Cc: jmap@ietf.org, aamelnikov@fastmail.fm
X-Test-IDTracker: no
X-IETF-IDTracker: 6.63.2
Auto-Submitted: auto-generated
Precedence: bulk
Message-ID: <150854545823.20809.9927160011037683970.idtracker@ietfa.amsl.com>
Date: Fri, 20 Oct 2017 17:24:18 -0700
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/ZQovu3JFK5_CDyG8yZs6bJrqL4Y>
Subject: [Jmap] jmap - Requested session has been scheduled for IETF 100
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 21 Oct 2017 00:24:18 -0000

Dear Bron Gondwana,

The session(s) that you have requested have been scheduled.
Below is the scheduled session information followed by
the original request. 

jmap Session 1 (2:00:00)
    Thursday, Afternoon Session I 1330-1530
    Room Name: Bras Basah size: 100
    ---------------------------------------------
    


Request Information:


---------------------------------------------------------
Working Group Name: JSON Mail Access Protocol
Area Name: Applications and Real-Time Area
Session Requester: Bron Gondwana

Number of Sessions: 1
Length of Session(s):  2 Hours
Number of Attendees: 50
Conflicts to Avoid: 
 First Priority: dispatch
 Second Priority: httpbis
 Third Priority: dmarc


People who must be present:
  Barry Leiba
  Alexey Melnikov
  Bron Gondwana

Resources Requested:
  Flipcharts: please specify number in Special Requests field

Special Requests:
  1 flipchart is handy for demonstrating dataflows
---------------------------------------------------------


From nobody Tue Oct 24 03:03:49 2017
Return-Path: <jeff.sipek@dovecot.fi>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 49E1E13F6EF for <jmap@ietfa.amsl.com>; Tue, 24 Oct 2017 03:03:48 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
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 8G8RKeqfxX8L for <jmap@ietfa.amsl.com>; Tue, 24 Oct 2017 03:03:41 -0700 (PDT)
Received: from mail.dovecot.fi (wursti.dovecot.fi [94.237.32.243]) by ietfa.amsl.com (Postfix) with ESMTP id 299CC13F6ED for <jmap@ietf.org>; Tue, 24 Oct 2017 03:03:41 -0700 (PDT)
Received: from meili (officewifi.dovecot.fi [193.209.119.110]) by mail.dovecot.fi (Postfix) with ESMTPSA id 98BFC2B3CCD; Tue, 24 Oct 2017 13:03:39 +0300 (EEST)
Date: Tue, 24 Oct 2017 06:03:30 -0400
From: Josef 'Jeff' Sipek <jeff.sipek@dovecot.fi>
To: Chris Newman <chris.newman@oracle.com>
Cc: Neil Jenkins <neilj@fastmailteam.com>, IETF JMAP Mailing List <jmap@ietf.org>
Message-ID: <20171024100330.GA1379@meili>
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com> <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com>
User-Agent: Mutt/1.8.3 (2017-05-23)
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/mEgRdkqvrDwOnbKBrzV1VtAPro0>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 24 Oct 2017 10:03:48 -0000

(I realize that this proposal got already merged...)

On Mon, Oct 02, 2017 at 17:54:00 -0700, Chris Newman wrote:
> RFC 5182 is useful to save round-trips. I support the concept in JMAP. I'd
> be careful about over-generalizing the back-reference model as that seems
> like the type of over-generalization that can make server implementations
> unnecessarily complex without significant added benefit.

Agreed.  The new back-reference scheme looks really powerful and
cool...

It (along with what I'm guessing ifInState issue #154 is about) reminds me
of NFSv4.1 (RFC 5661) COMPOUNDs and "current and saved filehandles" (with a
hint of single static assignment and predicated instructions).

In general, I don't have a problem with clients passing what amounts to
little scripts to the server for evaluation, but I'd like to avoid jmap
*accidentally* growing a scripting language.  (Sort of related: [1])

Sadly, this script-y way of accessing data doesn't really allow a caching
tier between the clients and servers.  (This is really the HTTP-as-a-tunnel
vs. REST discussion.)

> Also, RFC 5182
> includes a mechanism that avoids sending data to the client that the client
> doesn't need, which may be worth thinking about in this case.

You're talking about RFC 5182 not sending the saved search result to the
client at all, right?  (E.g., example 7 is *very* good at bandwidth
utilization)

Jeff.

[1] https://en.wikipedia.org/wiki/Greenspun%27s_tenth_rule

> 
> 		- Chris
> 
> On 1 Oct 2017, at 16:50, Neil Jenkins wrote:
> 
> > Hi all,
> > This week I have been doing a lot of copy editing to remove a huge
> > amount of duplicative text, which made the spec harder to read, and more
> > likely to contain inconsistencies between methods. My goal is that the
> > JMAP Mail spec should just be:
> > 
> > 
> >  1. The data type definitions
> >  2. Which standard method types can be used with each data type (e.g.
> >     the Thread object is not mutable directly by the client so there is
> >     no setThreads method).
> >  3. Any changes to the standard method for that particular type (extra
> >     arguments etc.)This makes the spec *much* shorter, more
> > understandable and easier to
> > implement. Doing this also makes it easier to see where methods for a
> > particular type deviate from the “standard” JMAP get/set calls. As I
> > looked at this, I realised most of the inconsistencies were in the
> > “fetchRecords” type arguments, used to reduce round trips.If instead we
> > had a generic way to refer to the result of a previous
> > method call in the arguments of a subsequent request, we can eliminate
> > the special cases, and provide more power. Much like the unix
> > composable-small-
> > things philosophy.Here’s a proposal of how this could work:
> > 
> > 
> > Any argument name may be prefixed with a ‘#’. This means the argument
> > value is a back-reference to the output of a previous method call rather
> > than the real value. The value is a *ResultReference* object as
> > described below. When processing a method call, the server MUST first
> > check the arguments object for any names beginning with “#”. If found,
> > the back reference should be resolved and the value used as the “real”
> > argument. The method is then processed as normal.A *ResultReference*
> > object has the following properties:
> > 
> > 
> >  * *resultOf*: String The client id of the method call to get the
> >    result from (the string given as the third item in the array for a
> >    method call).
> >  * *path*: String A pointer into the arguments. This is an RFC6901 JSON
> >    Pointer, except it also allows the use of * to map through an array
> >    (see description below).To resolve:
> > 
> > 
> >  1. Find the first response with a client id identical to the *resultOf*
> >     property of the *ResultReference* in the array of outputs from
> >     previously processed  method calls in the same request. If none,
> >     evaluation fails.
> > 
> > 
> >  2. If the response name is “error”, evaluation fails.
> > 
> > 
> >  3. Apply the *path* to the arguments object of the response (the second
> >     item in the response array) following the RFC6901 JSON pointer
> >     algorithm, except with the following addition in Section 4
> >     (Evaluation):
> > 
> > 
> > If the currently referenced value is a JSON array, the reference token
> > may be exactly the single character *, making the new referenced value
> > the result of applying the rest of the JSON pointer tokens to every item
> > in the array and returning the results in the same order in a new array.
> > If the result of applying the rest of the pointer tokens to a value was
> > itself an array, the items should be included individually in the output
> > array rather than including the array itself (i.e. the result is
> > flattened).
> >  4. If the type of the result is X, and the expected type of the
> >     argument is an array of type X, wrap the result in an array with a
> >     single item.As a simple example, suppose we have the following API
> > request:
> > 
> > 
> > [[ "getMessageUpdates", { "sinceState": "abcdef" }, "t0" ], [
> > "getMessages", { "#ids": { "resultOf": "t0", "path": "/changed" }
> > }, "t1" ]]Now after executing the first method call the response array
> > is:
> > 
> > 
> > [[ "messageUpdates", { "accountId": "1", "oldState": "abcdef",
> > "newState": "123456", "hasMoreUpdates": false, "changed": [ "msg1",
> > "msg4" ], "removed": [] }, "t0" ]]So to execute the getMessages call, we
> > look through the arguments and
> > find there is one with a # prefix. To resolve this, we apply the
> > algorithm above:
> > 
> > 
> >  1. Find the first response with client id “t0”. The “messageUpdates”
> >     response fulfils this criterion.
> >  2. Check the response name is not “error”. It’s messageUpdates”, so
> >     this is fine.
> >  3. Apply the *path* as a JSON pointer to the arguments object. This
> >     simply selects the “changed” property, so the result of evaluating
> >     is: [ "msg1", "msg4" ]The JMAP server now continues to process the
> > getMessages call as though
> > the arguments were:
> > 
> > 
> > { "ids": [ "msg1", "msg4" ] }Now a more complicated example: fetch the
> > “from”/”date”/”subject”
> > for every message in the first 10 threads in the Inbox (sorted
> > newest first):
> > 
> > 
> > [[ "getMessageList", { "filter": { inMailbox: "id_of_inbox" }, "sort": [
> > "date desc" ], "collapseThreads": true, "position": 0, "limit": 10 },
> > "t0" ], [ "getMessages", { "#ids": { "resultOf": "t0", "path": "/ids" },
> > "properties": [ "threadId" ] }, "t1" ], [ "getThreads", { "#ids": {
> > "resultOf": "t1", "path": "/list/*/threadId" } }, "t2" ], [
> > "getMessages", { "#ids": { "resultOf": "t2" "path": "/list/*/messageIds"
> > },  "properties": [ "from", "date", "subject" ] }, "t3" ]]After
> > executing the first 3 method calls the response array is:
> > 
> > 
> > [[ "messageList", { "accountId": "1", "filter": { inMailbox:
> > "id_of_inbox" }, "sort": [ "date desc" ], "collapseThreads": true,
> > "state": "abcdefg", "canCalculateUpdates": true, "position": 0, "total":
> > 101, "ids": [ "msg1023", "msg223", "msg110", "msg93", "msg91", "msg38",
> > "msg36", "msg33", "msg11", "msg1" ] }, "t0" ], [ "messages", {
> > "accountId": "1", "state": "123456", "list": [{ "id": "msg1023",
> > "threadId": "trd194", }, { "id": "msg223", "threadId": "trd114" }, ...
> > etc... ], "notFound": null }, "t1" ], [ "threads", { "accountId": "1",
> > "state": "123456", "list": [{ "id: "trd194", "messageIds": [ "msg1020",
> > "msg1021", "msg1023" ] }, { "id: "trd114", "messageIds": [ "msg201",
> > "msg223" ] }, ... etc... ], "notFound": null }, "t2" ]]So to execute the
> > final getMessages call, we look through the arguments
> > and find there is one with a # prefix. To resolve this, we apply the
> > algorithm:
> > 
> > 
> >  1. Find the first response with client id “t2”. The “threads” response
> >     fulfils this criterion.
> >  2. Check the response name is not “error”. It’s threads”, so
> >     this is fine.
> >  3. Apply the *path* as a JSON pointer to the arguments object.
> >     Token-by-token:
> >    1. *list* – get the array of thread objects
> >    2. *** – for each of the items in the array:
> >      1. *messsageIds* – get the array of message ids
> >      2. Concatenate these into a single array of all the ids in
> >         the result.The JMAP server now continues to process the
> > getMessages call as though
> > the arguments were:
> > 
> > 
> > { "ids": [ "msg1020", "msg1021", "msg1023", "msg201", "msg223", etc...
> > ],    "properties": [ "from", "date", "subject" ] }For reference, in
> > case it’s clearer than my description, here’s a
> > JavaScript implementation of the pointer resolution algorithm, with the
> > addition to RFC6901 clearly marked:
> > 
> > 
> > function evaluatePointer ( value, pointer ) { if ( !pointer ) { return
> > value; } if ( pointer.charAt( 0 ) !== '/' ) { throw new Error( 'Invalid
> > pointer' ); } let token; let next = pointer.indexOf( '/', 1 ); if ( next
> > !== -1 ) { token = pointer.slice( 1, next ); pointer = pointer.slice(
> > next ); } else { token = pointer.slice( 1 ); pointer = ''; } token =
> > token.replace( /~1/g, '/' ).replace( /~0/g, '~' ); if ( Array.isArray(
> > value ) ) { if ( /^(?:0|[1-9][0-9]*)$/.test( token ) ) { return
> > evaluatePointer( value[ parseInt( token, 10 ) ], pointer ); }  /* start:
> > the only bit that differs from RFC6901 */ if ( token === '*' ) { /* Map
> > values to pointer */ value = value.map( item => evaluatePointer( item,
> > pointer ) ); /* Flatten output */ return value.reduce( ( output, item )
> > => { if ( !Array.isArray( item ) ) { item = [ item ]; } return
> > output.concat( item ); }, [] ); } /* end */ } else if ( value !== null
> > && typeof value === 'object' ) { return evaluatePointer( value[ token ],
> > pointer ); } throw new Error( 'Evaluation failed' ); }So:
> >  * What do people think of the result-reference concept to replace the
> >    fetchRecords etc. arguments and reduce the amount of special-casing?
> >  * Presuming agreement this is a good idea, is this syntax good? If not,
> >    please suggest an alternative! (I've tried to reuse RFC6901 as much
> >    as possible as the only relevant standard I'm aware of, but if you
> >    know of another standard that's more suitable please let me know).
> > The full change proposal can be seen in the pull request at
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_jmapio_jmap_pull_148&d=DwIFaQ&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=QBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=CtS0Ut-8SOYtTU2EShd7Qt1Wa66iG5eF637_nimF-OM&s=8kEj1hBS8M2M_XaHaB3x831iSoNkmvDpY8cNsW5gYiA&e=
> > .
> > Cheers,
> > Neil.
> 
> 
> > _______________________________________________
> > Jmap mailing list
> > Jmap@ietf.org
> > https://urldefense.proofpoint.com/v2/url?u=https-3A__www.ietf.org_mailman_listinfo_jmap&d=DwICAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=QBZgPENFbjFadxqU4HJ3ZDpRz3X1JlDY-keqMt52FFo&m=CtS0Ut-8SOYtTU2EShd7Qt1Wa66iG5eF637_nimF-OM&s=h4UnZPECDHeyTajis8WzolSW6T9P-tPU7kMtP8abZcM&e=

> _______________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://www.ietf.org/mailman/listinfo/jmap


-- 
Ready; T=0.01/0.01 06:04:46


From nobody Tue Oct 24 21:14:59 2017
Return-Path: <neilj@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 283091393A8 for <jmap@ietfa.amsl.com>; Tue, 24 Oct 2017 21:14:58 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level: 
X-Spam-Status: No, score=-2.72 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=Mg9QG0FE; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=SlUDndcX
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 sPCRB14zWPlr for <jmap@ietfa.amsl.com>; Tue, 24 Oct 2017 21:14:56 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 98763139203 for <jmap@ietf.org>; Tue, 24 Oct 2017 21:14:56 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id EA66D20FA8; Wed, 25 Oct 2017 00:14:54 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Wed, 25 Oct 2017 00:14:54 -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=fm1; bh=RyEDCl Y/zQ2k/tKuX8+net1oDXeV2G6S4c4pcOOgye4=; b=Mg9QG0FEx1M3H2sM6WTbHj Mk1P1/AcbnALMjvxN6djpx5Tj433/Mgs9ZN8niQLeHQqEcJrsgPt493KBj4gv0pJ nEXAPhaZOiUXWovD23YFKRmPQa3+r5BPrjsi8WDh4htwuljsqoC/JMLCuEP4u+fS SgbLyav+k4Mm8+GYDsTIy2vLFusZFE6AOPW8YgWGkfl8phvDgQFK2Hx+3wQ2iBMN K6lsSRrwEHw7HefxThhtgtVfZGeXoT6MEVdFHjfMRjIK3VhBY2GZWfPAmAUygbX0 ul6O+Z8YlkWo4Vd7u+CaavzGl7po+Bt/YA/tuUsPVVFtgpoKWelyz6hvLGwMxgQg ==
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=fm1; bh=RyEDCl Y/zQ2k/tKuX8+net1oDXeV2G6S4c4pcOOgye4=; b=SlUDndcXpQRgqBqrzy+Uf4 0ZYF8OKYAFpOZ1IqIVfxLICEf/40p4iudsGG4AluoV3/dqhjoOSwQfqPzucOMcQ5 VK8zLVpYsMN+oJ3DUSOvPHeYUZ8uZMO4Husg3hRKygfgFOl3/WkSsMfacbN7be82 RtSY5PuL1Mxqe1mwSIaTnBHBIw3wILDPkURJ3ppUtuRerqT1TnQJfN0xaYWb4zEp wWpaaRlygiOaUGrS5KU23dS9sxShH7P91S1N986fKCEhotxgZZJgWrZsy64fH0zz k5QsZR6W4Ypa5ukutPdKxk1fExknUu3qq0q3SIf4uRxXrLyPRctZ6/lddbI/Txvw ==
X-ME-Sender: <xms:vg_wWYxQ7YyicQYUObWGY4VAGNOwBtSIRiqeb8ce5TVnRC4eDwUF_g>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 97345E2636; Wed, 25 Oct 2017 00:14:54 -0400 (EDT)
Message-Id: <1508904894.4167250.1150101824.463822CA@webmail.messagingengine.com>
From: Neil Jenkins <neilj@fastmailteam.com>
To: Josef Jeff Sipek <jeff.sipek@dovecot.fi>, Chris Newman <chris.newman@oracle.com>
Cc: IETF JMAP Mailing List <jmap@ietf.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_150890489441672500"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-6707b1a2
In-Reply-To: <20171024100330.GA1379@meili>
References: <1506901811.676009.1124417296.5EB56E32@webmail.messagingengine.com> <D0AF0C1E-BF9A-4293-BEC1-64614261244E@oracle.com> <20171024100330.GA1379@meili>
Date: Wed, 25 Oct 2017 15:14:54 +1100
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/lBbnjoUsm_7D0Dz9mMuODZC_b80>
Subject: Re: [Jmap] Using the result of one method as a subsequent method argument
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Oct 2017 04:14:58 -0000

This is a multi-part message in MIME format.

--_----------=_150890489441672500
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="utf-8"

On Tue, 24 Oct 2017, at 09:03 PM, Josef 'Jeff' Sipek wrote:
> In general, I don't have a problem with clients passing what
> amounts to> little scripts to the server for evaluation, but I'd like to
> avoid jmap> **accidentally** growing a scripting language.

Yeh, this is definitely something to avoid! We're not there yet,
although I concede it's a slippery slope=E2=80=A6
> You're talking about RFC 5182 not sending the saved search
> result to the> client at all, right?  (E.g., example 7 is **very** good a=
t bandwidth> utilization)

JMAP back references allow for an equivalent network-efficient
mechanism for most of what you can do in IMAP with 5182. Example 7 is
actually probably the main one that you *can't* do so efficiently
with back references. To save other people looking up the spec, this
is the example:
C: F282 SEARCH RETURN (SAVE) KEYWORD $Junk
C: F283 COPY $ "Junk"
C: F284 STORE $ +FLAGS.Silent (\Deleted)

This essentially finds all messages with the $Junk keyword and then
moves them to the Junk mailbox. If we make a small addition to the back-
reference object in JMAP, we could do this equivalently like so:
[[ "getMessageList", {
    "filter": {
        "hasKeyword": "$Junk"
    },
}, "0" ],
[ "setMessages", {
    "#update": {
        "resultOf": "0",
        "path": "/ids"
        "mapToValue"{
            "mailboxIds": {
                <JunkMailboxId>: true
            }
        }
    }
}, "1" ]]

Adding the *mapToValue* property to the back reference would mean it
takes the array result of the back-reference and converts it into an
object where each of those results is a key and the value for every one
is the *mapToValue* given. Yes, it's one small step towards (but still a
long way from!) the general-purpose scripting language worry.
Thoughts? Should we add this?
Neil.

--_----------=_150890489441672500
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div>On Tue, 24 Oct 2017, at 09:03 PM, Josef 'Jeff' Sipek wrote:<br><=
/div>
<blockquote type=3D"cite"><div>In general, I don't have a problem with clie=
nts passing what amounts to<br></div>
<div>little scripts to the server for evaluation, but I'd like to avoid jma=
p<br></div>
<div><b>*accidentally*</b> growing a scripting language.<br></div>
</blockquote><div><br></div>
<div>Yeh, this is definitely something to avoid! We're not there yet, altho=
ugh I concede it's a slippery slope=E2=80=A6<br></div>
<div><br></div>
<blockquote type=3D"cite"><div>You're talking about RFC 5182 not sending th=
e saved search result to the<br></div>
<div>client at all, right?&nbsp; (E.g., example 7 is <b>*very*</b> good at =
bandwidth<br></div>
<div>utilization)<br></div>
</blockquote><div><br></div>
<div>JMAP back references allow for an equivalent network-efficient mechani=
sm for most of what you can do in IMAP with 5182. Example 7 is actually pro=
bably the main one that you <i>can't</i> do so efficiently&nbsp; with back =
references. To save other people looking up the spec, this is the example:<=
br></div>
<div><br></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">C: F282 SEARCH RETURN (SAVE) KEYWORD $Junk<br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">C: F283 COPY $ "Junk"<br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">C: F284 STORE $ +FLAGS.Silent (\Deleted)</span><br></div>
<div><br></div>
<div>This essentially finds all messages with the $Junk keyword and then mo=
ves them to the Junk mailbox. If we make a small addition to the back-refer=
ence object in JMAP, we could do this equivalently like so:<br></div>
<div><br></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">[[ "getMessageList", {</span><span class=3D"font" style=3D"fo=
nt-family: menlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp; "filter": {</span><span class=3D"font" sty=
le=3D"font-family: menlo, consolas, monospace, sans-serif;"><br></span></di=
v>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "hasKeyword": "$Ju=
nk"</span><span class=3D"font" style=3D"font-family: menlo, consolas, monos=
pace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp; },</span><span class=3D"font" style=3D"fon=
t-family: menlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">}, "0" ],</span><span class=3D"font" style=3D"font-family: me=
nlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">[ "setMessages", {</span><span class=3D"font" style=3D"font-f=
amily: menlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp; "#update": {</span><span class=3D"font" st=
yle=3D"font-family: menlo, consolas, monospace, sans-serif;"><br></span></d=
iv>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "resultOf": "0",</=
span><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "path": "/ids"</sp=
an><span class=3D"font" style=3D"font-family: menlo, consolas, monospace, s=
ans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "mapToValue"{</spa=
n><span class=3D"font" style=3D"font-family: menlo, consolas, monospace, sa=
ns-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; "mailboxIds": {</span><span class=3D"font" style=3D"font-family: menl=
o, consolas, monospace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;JunkMailboxId&gt;: true</span><span class=
=3D"font" style=3D"font-family: menlo, consolas, monospace, sans-serif;"><b=
r></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&=
nbsp; }</span><span class=3D"font" style=3D"font-family: menlo, consolas, m=
onospace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</span><span clas=
s=3D"font" style=3D"font-family: menlo, consolas, monospace, sans-serif;"><=
br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">&nbsp;&nbsp;&nbsp; }</span><span class=3D"font" style=3D"font=
-family: menlo, consolas, monospace, sans-serif;"><br></span></div>
<div><span class=3D"font" style=3D"font-family: menlo, consolas, monospace,=
 sans-serif;">}, "1" ]]</span><br></div>
<div><br></div>
<div>Adding the <i>mapToValue</i>&nbsp;property to the back reference would=
 mean it takes the array result of the back-reference and converts it into =
an object where each of those results is a key and the value for every one =
is the <i>mapToValue</i>&nbsp;given. Yes, it's one small step towards (but =
still a long way from!) the general-purpose scripting language worry.<br></=
div>
<div><br></div>
<div>Thoughts? Should we add this?<br></div>
<div>Neil.<br></div>
</body>
</html>

--_----------=_150890489441672500--


From nobody Wed Oct 25 04:16:18 2017
Return-Path: <vaibhavsinghacads@gmail.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 148C113AE08 for <jmap@ietfa.amsl.com>; Wed, 25 Oct 2017 04:16:17 -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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 L-0mabrq7AZc for <jmap@ietfa.amsl.com>; Wed, 25 Oct 2017 04:16:15 -0700 (PDT)
Received: from mail-it0-x230.google.com (mail-it0-x230.google.com [IPv6:2607:f8b0:4001:c0b::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A2524138A38 for <jmap@ietf.org>; Wed, 25 Oct 2017 04:16:15 -0700 (PDT)
Received: by mail-it0-x230.google.com with SMTP id n195so585632itg.2 for <jmap@ietf.org>; Wed, 25 Oct 2017 04:16:15 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=mime-version:from:date:message-id:subject:to; bh=Zt7fJvJCyUF8FQ2yhwxvj7BLTD7kCZDZ2YIFDLSw71Y=; b=DJ8eiTBXyxXoR7BwnA19BOGyqXYdtIQcbR7m01ZpyEvUxPTepJ6ElxrGgz/nGiFR1z T92Q4EBdIoTnJ0RlEYThSY+0EuhqeBnyzn2xO71nesVAv2EXQU9ResD8NEkKSXf1rH9s AeAJEz8bvA0m9ODkg7brm2q8FUbTT6LJjTVvVwZEJHn/zEmOCKZjqNZZQyJx8ykI7A/v iy/m4S+EJ0iyjDCa6tvtC20Dph5jTA6Ei4TXQ3e60xN2+EV1LTr3Od/8bV3SYQJcLdr+ UFICXpZcvX+7cnj+AMB66MBDgb5IFSqwIxnmfW08BPJf3/3s6rBLpmj5LAttfZXsg71y J/xA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Zt7fJvJCyUF8FQ2yhwxvj7BLTD7kCZDZ2YIFDLSw71Y=; b=nPQ1rZ4FqFJrFCiDVhc5XLKPb4/ah6x4dRUn3yCuVq1ZjHrbZFGkwBnPtbwoMHLsOZ WhrytN8kcKHgMGqPUCiTOnFVjC3LpjA6rAMk36S8xrng1MGmD+GVU6pWLnQ1ANbc/+pS HNdk6mWKYmOK4wTOdK62t8NxvNEzKOFBlfHHEsShme7+s9ayjO1IR+01czKukMlq2zyx XDcaUSx13mcNjBl1S9cgimr3P8Va2NALZDrOzHJiFcSw0bNe6ZmvDSSs2ihnaloJUB4e ECJNqcMYSI6OZdrcx9YZSSEvEdtdgSADlTSVLIusEdFgdkA7Udyr8lT9ieg5A/EvcsuI GEzQ==
X-Gm-Message-State: AMCzsaV+3OWTXvObdcP3/+bWxj3TRSDh1/TRFvE8K9/oCtatvcKSIn9w l9vgphB3ja9BwZyPw7w2pOpziF6QbqaoVpWssN4=
X-Google-Smtp-Source: ABhQp+SwVwFg0+a3ecuncebE9GrhS5eniJskRmZfPfryoCo1hlLtsw+os9dN3S747KeFAoi7s0A7mUCmRe3yYF41Ick=
X-Received: by 10.36.178.19 with SMTP id u19mr1375690ite.64.1508930174521; Wed, 25 Oct 2017 04:16:14 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.79.31.3 with HTTP; Wed, 25 Oct 2017 04:16:14 -0700 (PDT)
From: vaibhav singh <vaibhavsinghacads@gmail.com>
Date: Wed, 25 Oct 2017 16:46:14 +0530
Message-ID: <CACZ1GiopYJ4Avx=+9va-XutM8JFV01GHQov2wRnOK2O-ZcCTqA@mail.gmail.com>
To: jmap@ietf.org
Content-Type: multipart/alternative; boundary="f403045d99a00b1663055c5d2f1e"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/qaKXPpuiv_R5SbM5ommo3yCRT2s>
Subject: [Jmap] [JMAP] SMIME Attachments (was: Re:  S/MIME for JMAP)
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Oct 2017 11:16:17 -0000

--f403045d99a00b1663055c5d2f1e
Content-Type: text/plain; charset="UTF-8"

Hi,

Sorry If I sound like a broken record; I had asked this question before as
well, maybe I wasn't specific enough, but I still feel that integrating
S/MIME in JMAP will be a pain.

The first pain point is with respect to all the metadata you are adding for
messages; if I were to implement an S/MIME extension for JMAP I would
probably encrypt and sign (at least some) of the metadata as well. Things
could break at this point (sorry for sounding a bit vague; I still haven't
gotten around to going through JMAP spec, but I am pretty sure people here
would see the point I am trying to make here.)

The second pain point (more appropriate with the subject line) is with
attachments being present in the encrypted mime. Maybe a flag needs to be
added by the MUA to an encrypted mail, so that server may not have to
decrypt the mime to get to know that an attachment is present within the
mime. This, now that I put thoughts into words, is more an optimization
than anything else, but I would still like to have your views on this.

I would again like to mention that I love what you are doing, I still
consider myself a newbie to IETF in general, and JMAP is probably the
working group I am most interested in. I will go through the whole spec the
first chance I get.

-- 
Regards,
Vaibhav

--f403045d99a00b1663055c5d2f1e
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div>Hi,<br></div><br>Sorry If I sound like=
 a broken record; I had asked this question before as well, maybe I wasn&#3=
9;t specific enough, but I still feel that integrating S/MIME in JMAP will =
be a pain.<br><br></div>The first pain point is with respect to all the met=
adata you are adding for messages; if I were to implement an S/MIME extensi=
on for JMAP I would probably encrypt and sign (at least some) of the metada=
ta as well. Things could break at this point (sorry for sounding a bit vagu=
e; I still haven&#39;t gotten around to going through JMAP spec, but I am p=
retty sure people here would see the point I am trying to make here.)<br><b=
r></div>The second pain point (more appropriate with the subject line) is w=
ith attachments being present in the encrypted mime. Maybe a flag needs to =
be added by the MUA to an encrypted mail, so that server may not have to de=
crypt the mime to get to know that an attachment is present within the mime=
. This, now that I put thoughts into words, is more an optimization than an=
ything else, but I would still like to have your views on this.<br><br></di=
v>I would again like to mention that I love what you are doing, I still con=
sider myself a newbie to IETF in general, and JMAP is probably the working =
group I am most interested in. I will go through the whole spec the first c=
hance I get.<br><div><div><div><div><div><div><br>-- <br><div class=3D"gmai=
l_signature" data-smartmail=3D"gmail_signature"><div dir=3D"ltr">Regards,<d=
iv>Vaibhav<br></div></div></div>
</div></div></div></div></div></div></div>

--f403045d99a00b1663055c5d2f1e--


From nobody Wed Oct 25 15:04:52 2017
Return-Path: <brong@fastmailteam.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id EC94413F48D for <jmap@ietfa.amsl.com>; Wed, 25 Oct 2017 15:04:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.72
X-Spam-Level: 
X-Spam-Status: No, score=-2.72 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, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-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=Nt8ITqxg; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ZghAM2Ca
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 CPfrmNS8mGEQ for <jmap@ietfa.amsl.com>; Wed, 25 Oct 2017 15:04:41 -0700 (PDT)
Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 4494B13F485 for <jmap@ietf.org>; Wed, 25 Oct 2017 15:04:41 -0700 (PDT)
Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8290A22695 for <jmap@ietf.org>; Wed, 25 Oct 2017 18:04:40 -0400 (EDT)
Received: from web2 ([10.202.2.212]) by compute6.internal (MEProxy); Wed, 25 Oct 2017 18:04:40 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=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=fm1; bh=a43niADD7MeVH/I0q pR1witG5OOygqTOgjlNh72Dkvg=; b=Nt8ITqxgLvschy/EaSlgm5UdT0hj1gZUe EngEE+O7kZZTc1GmGAdG5ytY4DKApvWJk7cVP/ffWXWW8UJJYAC7b0D9UZ8JY+ad WWK0sX0lFJ8SgjL5ep2EcEyV0hstHzXeuwlzT6OLvOP+OfhKblNZiQkgzo5D3qEo GCgcvh1/ps86cQVyomTVMR8V9eW/qqO7bMTlewC641bTHexnXyObJUjYGOG/er7P Gl05GraKRsM2aoUqu2yZr+rLf3koE5ru8LNu/mFTwgiBrWnIGtQglxiM7XsF+5Jp qzabYJ5VeXlxW4inILvk4JI0eohASR6NRvVpDMudd5iKmnN3qozSg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=fm1; bh=a43niA DD7MeVH/I0qpR1witG5OOygqTOgjlNh72Dkvg=; b=ZghAM2CaiZ+xuIKwi4z5z7 WL+5hcuI087qMGhbGiMTxzi+uR6jrqf3zH5vMkQoRLnYsXoyITCN4VtP8QgM6wvv 31NXQs0f/q/MGwFjPzqun8hMy9D1GMJjnMurZnLNN/h5sHeDJ72wNkxGR3MtHc3H nbTJYymtkRpVYsbdRxhoAr+ngHFmb1HdUPGOH8jTBkxNdOyZhQRjZPWvCOVOsxkh 7dwm8yAu13S0K91rKRpPxbFuPlxNcsoT9HTiMIX/xhYeSW8xzvDYP560CLme/Jss 3AlMn9tHprTLQZH++uaGeURoC/4oXIQ4bw7Dq/YIqBLWdIdKeQQhD2XNtQa+Vzaw ==
X-ME-Sender: <xms:eArxWQ8dOWjy6C59ugBkafIZE5UbxYcVs83A-ZpABw4GAu6QrFwSVA>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id 5DD87626C4; Wed, 25 Oct 2017 18:04:40 -0400 (EDT)
Message-Id: <1508969080.515200.1151101720.4358EC7E@webmail.messagingengine.com>
From: Bron Gondwana <brong@fastmailteam.com>
To: jmap@ietf.org
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: multipart/alternative; boundary="_----------=_15089690805152000"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-4e1b65f9
In-Reply-To: <CACZ1GiopYJ4Avx=+9va-XutM8JFV01GHQov2wRnOK2O-ZcCTqA@mail.gmail.com>
References: <CACZ1GiopYJ4Avx=+9va-XutM8JFV01GHQov2wRnOK2O-ZcCTqA@mail.gmail.com>
Date: Thu, 26 Oct 2017 09:04:40 +1100
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/qdXV4GRgplDeYVEbX-IivqGif2g>
Subject: Re: [Jmap] [JMAP] SMIME Attachments (was: Re:  S/MIME for JMAP)
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 25 Oct 2017 22:04:50 -0000

This is a multi-part message in MIME format.

--_----------=_15089690805152000
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"

If you want to use a JMAP server to pass opaque blobs, that works fine.
Obviously things like hasAttachment aren't going to work, because the
opaque blob doesn't have an attachment.  The mail inside may have an
attachment, but the JMAP server doesn't know that.
Since the same issue exists with IMAP, it sounds like maybe what you're
suggesting is an IANA registration of a keyword like
$HasEncryptedAttachment, which would allow multiple MUAs to share that
metadata.  Of course the server couldn't add it, so it would only be
present at the time the first MUA-with-keys connected and downloaded the
message to evaluate its contents.
 If you're a server handling encrypted blobs, you can't do much other
 than store and forward.  Most of the complexity of JMAP is around
 making the server smarter and clients easier to write.  The place for
 JMAP in the case you're talking about would be as a local protocol
 between a secure crypto store and a client within your device - you
 could run an embedded JMAP server which did the crypto for you and more
 easily choose between multiple client implementations.
There's still some value in JMAP push, even if the server can't inspect
the message it can still push out-of-band that something is new on the
server and the client needs to resync.
Bron.


On Wed, 25 Oct 2017, at 22:16, vaibhav singh wrote:
> Hi,
> 
> Sorry If I sound like a broken record; I had asked this question
> before as well, maybe I wasn't specific enough, but I still feel that
> integrating S/MIME in JMAP will be a pain.> 
> The first pain point is with respect to all the metadata you are
> adding for messages; if I were to implement an S/MIME extension for
> JMAP I would probably encrypt and sign (at least some) of the
> metadata as well. Things could break at this point (sorry for
> sounding a bit vague; I still haven't gotten around to going through
> JMAP spec, but I am pretty sure people here would see the point I am
> trying to make here.)> 
> The second pain point (more appropriate with the subject line) is with
> attachments being present in the encrypted mime. Maybe a flag needs to
> be added by the MUA to an encrypted mail, so that server may not have
> to decrypt the mime to get to know that an attachment is present
> within the mime. This, now that I put thoughts into words, is more an
> optimization than anything else, but I would still like to have your
> views on this.> 
> I would again like to mention that I love what you are doing, I still
> consider myself a newbie to IETF in general, and JMAP is probably the
> working group I am most interested in. I will go through the whole
> spec the first chance I get.> 
> -- 
> Regards,
> Vaibhav
> _________________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://www.ietf.org/mailman/listinfo/jmap

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



--_----------=_15089690805152000
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset="utf-8"

<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div style="font-family:Arial;">If you want to use a JMAP server to pass opaque blobs, that works fine.&nbsp; Obviously things like hasAttachment aren't going to work, because the opaque blob doesn't have an attachment.&nbsp; The mail inside may have an attachment, but the JMAP server doesn't know that.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Since the same issue exists with IMAP, it sounds like maybe what you're suggesting is an IANA registration of a keyword like $HasEncryptedAttachment, which would allow multiple MUAs to share that metadata.&nbsp; Of course the server couldn't add it, so it would only be present at the time the first MUA-with-keys connected and downloaded the message to evaluate its contents.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;"> If you're a server handling encrypted blobs, you can't do much other than store and forward.&nbsp; Most of the complexity of JMAP is around making the server smarter and clients easier to write.&nbsp; The place for JMAP in the case you're talking about would be as a local protocol between a secure crypto store and a client within your device - you could run an embedded JMAP server which did the crypto for you and more easily choose between multiple client implementations.<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">There's still some value in JMAP push, even if the server can't inspect the message it can still push out-of-band that something is new on the server and the client needs to resync.<br></div>
<div style="font-family:Arial;"><br>Bron.<br></div>
<div><br></div>
<div><br></div>
<div>On Wed, 25 Oct 2017, at 22:16, vaibhav singh wrote:<br></div>
<blockquote type="cite"><div dir="ltr"><div><div><div><div>Hi,<br></div>
<div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">Sorry If I sound like a broken record; I had asked this question before as well, maybe I wasn't specific enough, but I still feel that integrating S/MIME in JMAP will be a pain.<br></div>
<div style="font-family:Arial;"><br></div>
</div>
<div style="font-family:Arial;">The first pain point is with respect to all the metadata you are adding for messages; if I were to implement an S/MIME extension for JMAP I would probably encrypt and sign (at least some) of the metadata as well. Things could break at this point (sorry for sounding a bit vague; I still haven't gotten around to going through JMAP spec, but I am pretty sure people here would see the point I am trying to make here.)<br></div>
<div style="font-family:Arial;"><br></div>
</div>
<div style="font-family:Arial;">The second pain point (more appropriate with the subject line) is with attachments being present in the encrypted mime. Maybe a flag needs to be added by the MUA to an encrypted mail, so that server may not have to decrypt the mime to get to know that an attachment is present within the mime. This, now that I put thoughts into words, is more an optimization than anything else, but I would still like to have your views on this.<br></div>
<div style="font-family:Arial;"><br></div>
</div>
<div style="font-family:Arial;">I would again like to mention that I love what you are doing, I still consider myself a newbie to IETF in general, and JMAP is probably the working group I am most interested in. I will go through the whole spec the first chance I get.<br></div>
<div><div><div><div><div><div><div style="font-family:Arial;"><br></div>
<div style="font-family:Arial;">-- <br></div>
<div><div dir="ltr"><div style="font-family:Arial;">Regards,<br></div>
<div>Vaibhav<br></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div><u>_______________________________________________</u><br></div>
<div>Jmap mailing list<br></div>
<div><a href="mailto:Jmap@ietf.org">Jmap@ietf.org</a><br></div>
<div><a href="https://www.ietf.org/mailman/listinfo/jmap">https://www.ietf.org/mailman/listinfo/jmap</a><br></div>
</blockquote><div style="font-family:Arial;"><br></div>
<div id="sig56629417"><div class="signature">--<br></div>
<div class="signature">&nbsp; Bron Gondwana, CEO, FastMail Pty Ltd<br></div>
<div class="signature">&nbsp; brong@fastmailteam.com<br></div>
<div class="signature"><br></div>
</div>
<div style="font-family:Arial;"><br></div>
</body>
</html>

--_----------=_15089690805152000--


From nobody Sun Oct 29 00:33:33 2017
Return-Path: <vaibhavsinghacads@gmail.com>
X-Original-To: jmap@ietfa.amsl.com
Delivered-To: jmap@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id B8FD713F75F for <jmap@ietfa.amsl.com>; Sun, 29 Oct 2017 00:33: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, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.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 mudiroA9zL-q for <jmap@ietfa.amsl.com>; Sun, 29 Oct 2017 00:33:29 -0700 (PDT)
Received: from mail-io0-x234.google.com (mail-io0-x234.google.com [IPv6:2607:f8b0:4001:c06::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 7AC5313F76E for <jmap@ietf.org>; Sun, 29 Oct 2017 00:33:29 -0700 (PDT)
Received: by mail-io0-x234.google.com with SMTP id m81so20756087ioi.13 for <jmap@ietf.org>; Sun, 29 Oct 2017 00:33:29 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=mime-version:from:date:message-id:subject:to; bh=hP2NcodeOrv0jzlSIS35/MixEJMybniLGe6L4FRXXIw=; b=K8rP3d9rv09YTw0tGggvCnYRYfmCfPsfdYWxm8GJwSHq3ShxBwKdI4Esisvpr97FHS pe8E8CjNiHWgl1cnRGzqNTRLbpZukxdwv2RzFVHLQhkd1OAuxuTMHP1J/mHX3I/4+tl4 XHcFyV+xcmSJnnnvhQfp/sC2I5z5RHL8Tv06nrkRnwLSlk/pZbmZRWROgoMi5/etneli E5ZubGthk6c/FSt4OeqFTXVe73nlN4C0wVpuXvzeQuomtihXXugU/xue5b38vdVeLNip +8YVpaTnCDVw2885JQ6Lr7W7kEjVyWutL6aCQy7nJZMZvehiYSacxYCOx0s88F/MuCwx sNZA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=hP2NcodeOrv0jzlSIS35/MixEJMybniLGe6L4FRXXIw=; b=gYDdpsgUc1upQd3bXa6QxnhBfOXv6svXp1/iNWxwa6zAhKVWDYQZQJ9fuAdGrzaCSo 0G7ESMC1MRa8fd8X33Gxo98BtnvSpSEK0i/NDs7e1L5gYhuoQkh7TLbe+0P/uzHCmhim N7lGzhK5xHmAYf90Yoo859ex7smLIzCsV0eV4hFmMaBpjQKoremxnJDb2nFjRpKFziBl oKmDUxuEowo6dQTBOngBQmDze+HvxCzLcBFYl+tzOvJRtiL5yKLDeNCw4UxVxh1Z1yTF 7rNCE0j8KeKCRPyJV88jwK4/UtnXRfdT5aq94ZvyW1O74pWyf8hereUstdEDlCwI6GGi gyHQ==
X-Gm-Message-State: AMCzsaUKEK92EvJF+g36rr6BLsuS0587NOTKCQM2rO9in9nlFrDnNl29 4meUJrY9dvr4RQ/HO3f80wcSm1ytCQ3pMC1NeFyC3g==
X-Google-Smtp-Source: ABhQp+SXwq9xcDCf5EAcN9CmCNLiKI2xzIY90x8ghRBtTZXbldL1z7ojBOfa/eAGVHTHKpqMsId241f8nxVaJsHlBRI=
X-Received: by 10.107.6.15 with SMTP id 15mr6624864iog.204.1509262408660; Sun, 29 Oct 2017 00:33:28 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.79.31.3 with HTTP; Sun, 29 Oct 2017 00:33:28 -0700 (PDT)
From: vaibhav singh <vaibhavsinghacads@gmail.com>
Date: Sun, 29 Oct 2017 13:03:28 +0530
Message-ID: <CACZ1GiqcK2p1kkvG0JPTbi3NG=syTfGv8AG53n_7fr8L41sP=A@mail.gmail.com>
To: jmap@ietf.org
Content-Type: multipart/alternative; boundary="001a113f9a82bdbb86055caa890a"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/SNwCQRZw4fJu_t9mOKbmUYo2W50>
Subject: Re: [Jmap] [JMAP] SMIME Attachments (was: Re: S/MIME for JMAP)
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sun, 29 Oct 2017 07:33:32 -0000

--001a113f9a82bdbb86055caa890a
Content-Type: text/plain; charset="UTF-8"

>
>    1. Re: [JMAP] SMIME Attachments (was: Re:  S/MIME for JMAP)
>       (Bron Gondwana)
>
>
> ---------- Forwarded message ----------
> From: Bron Gondwana <brong@fastmailteam.com>
> To: jmap@ietf.org
> Cc:
> Bcc:
> Date: Thu, 26 Oct 2017 09:04:40 +1100
> Subject: Re: [Jmap] [JMAP] SMIME Attachments (was: Re: S/MIME for JMAP)
> If you want to use a JMAP server to pass opaque blobs, that works fine.
> Obviously things like hasAttachment aren't going to work, because the
> opaque blob doesn't have an attachment.  The mail inside may have an
> attachment, but the JMAP server doesn't know that.
>
> Since the same issue exists with IMAP, it sounds like maybe what you're
> suggesting is an IANA registration of a keyword like
> $HasEncryptedAttachment, which would allow multiple MUAs to share that
> metadata.  Of course the server couldn't add it, so it would only be
> present at the time the first MUA-with-keys connected and downloaded the
> message to evaluate its contents.
>

Yes, I can start the process for requesting " $HasEncryptedAttachment "be
registered by IANA, in case nobody sees an issue with it.

-Vaibhav

>
> If you're a server handling encrypted blobs, you can't do much other than
> store and forward.  Most of the complexity of JMAP is around making the
> server smarter and clients easier to write.  The place for JMAP in the case
> you're talking about would be as a local protocol between a secure crypto
> store and a client within your device - you could run an embedded JMAP
> server which did the crypto for you and more easily choose between multiple
> client implementations.
>
> There's still some value in JMAP push, even if the server can't inspect
> the message it can still push out-of-band that something is new on the
> server and the client needs to resync.
>
> Bron.
>

>
> On Wed, 25 Oct 2017, at 22:16, vaibhav singh wrote:
>
> Hi,
>
> Sorry If I sound like a broken record; I had asked this question before as
> well, maybe I wasn't specific enough, but I still feel that integrating
> S/MIME in JMAP will be a pain.
>
> The first pain point is with respect to all the metadata you are adding
> for messages; if I were to implement an S/MIME extension for JMAP I would
> probably encrypt and sign (at least some) of the metadata as well. Things
> could break at this point (sorry for sounding a bit vague; I still haven't
> gotten around to going through JMAP spec, but I am pretty sure people here
> would see the point I am trying to make here.)
>
> The second pain point (more appropriate with the subject line) is with
> attachments being present in the encrypted mime. Maybe a flag needs to be
> added by the MUA to an encrypted mail, so that server may not have to
> decrypt the mime to get to know that an attachment is present within the
> mime. This, now that I put thoughts into words, is more an optimization
> than anything else, but I would still like to have your views on this.
>
> I would again like to mention that I love what you are doing, I still
> consider myself a newbie to IETF in general, and JMAP is probably the
> working group I am most interested in. I will go through the whole spec the
> first chance I get.
>
> --
> Regards,
> Vaibhav
> *_______________________________________________*
> Jmap mailing list
> Jmap@ietf.org
> https://www.ietf.org/mailman/listinfo/jmap
>
>
> --
>   Bron Gondwana, CEO, FastMail Pty Ltd
>   brong@fastmailteam.com
>
>
>
> _______________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://www.ietf.org/mailman/listinfo/jmap
>
>


-- 

Regards,
Vaibhav Singh

--001a113f9a82bdbb86055caa890a
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><div class=3D"gmail_extra"><div class=3D"gmail_quote">=
<blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
=C2=A0 =C2=A01. Re: [JMAP] SMIME Attachments (was: Re:=C2=A0 S/MIME for JMA=
P)<br>
=C2=A0 =C2=A0 =C2=A0 (Bron Gondwana)<br>
<br><br>---------- Forwarded message ----------<br>From:=C2=A0Bron Gondwana=
 &lt;<a href=3D"mailto:brong@fastmailteam.com">brong@fastmailteam.com</a>&g=
t;<br>To:=C2=A0<a href=3D"mailto:jmap@ietf.org">jmap@ietf.org</a><br>Cc:=C2=
=A0<br>Bcc:=C2=A0<br>Date:=C2=A0Thu, 26 Oct 2017 09:04:40 +1100<br>Subject:=
=C2=A0Re: [Jmap] [JMAP] SMIME Attachments (was: Re:  S/MIME for JMAP)<br><u=
></u>




<div><div style=3D"font-family:Arial">If you want to use a JMAP server to p=
ass opaque blobs, that works fine.=C2=A0 Obviously things like hasAttachmen=
t aren&#39;t going to work, because the opaque blob doesn&#39;t have an att=
achment.=C2=A0 The mail inside may have an attachment, but the JMAP server =
doesn&#39;t know that.<br></div>
<div style=3D"font-family:Arial"><br></div>
<div style=3D"font-family:Arial">Since the same issue exists with IMAP, it =
sounds like maybe what you&#39;re suggesting is an IANA registration of a k=
eyword like $HasEncryptedAttachment, which would allow multiple MUAs to sha=
re that metadata.=C2=A0 Of course the server couldn&#39;t add it, so it wou=
ld only be present at the time the first MUA-with-keys connected and downlo=
aded the message to evaluate its contents.<br></div></div></blockquote><div=
><br></div><div>Yes, I can start the process for requesting &quot;  $HasEnc=
ryptedAttachment &quot;be registered by IANA, in case nobody sees an issue =
with it.</div><div><br></div><div>-Vaibhav<br></div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex"><div><div style=3D"font-family:Arial"></div>
<div style=3D"font-family:Arial"><br></div>
<div style=3D"font-family:Arial"> If you&#39;re a server handling encrypted=
 blobs, you can&#39;t do much other than store and forward.=C2=A0 Most of t=
he complexity of JMAP is around making the server smarter and clients easie=
r to write.=C2=A0 The place for JMAP in the case you&#39;re talking about w=
ould be as a local protocol between a secure crypto store and a client with=
in your device - you could run an embedded JMAP server which did the crypto=
 for you and more easily choose between multiple client implementations.<br=
></div>
<div style=3D"font-family:Arial"><br></div>
<div style=3D"font-family:Arial">There&#39;s still some value in JMAP push,=
 even if the server can&#39;t inspect the message it can still push out-of-=
band that something is new on the server and the client needs to resync.<br=
></div>
<div><br>Bron. <br></div></div></blockquote><blockquote class=3D"gmail_quot=
e" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204)=
;padding-left:1ex"><div><div style=3D"font-family:Arial"></div>
<div><br></div>
<div><br></div>
<div>On Wed, 25 Oct 2017, at 22:16, vaibhav singh wrote:<br></div>
<blockquote type=3D"cite"><div dir=3D"ltr"><div><div><div><div>Hi,<br></div=
>
<div style=3D"font-family:Arial"><br></div>
<div style=3D"font-family:Arial">Sorry If I sound like a broken record; I h=
ad asked this question before as well, maybe I wasn&#39;t specific enough, =
but I still feel that integrating S/MIME in JMAP will be a pain.<br></div>
<div style=3D"font-family:Arial"><br></div>
</div>
<div style=3D"font-family:Arial">The first pain point is with respect to al=
l the metadata you are adding for messages; if I were to implement an S/MIM=
E extension for JMAP I would probably encrypt and sign (at least some) of t=
he metadata as well. Things could break at this point (sorry for sounding a=
 bit vague; I still haven&#39;t gotten around to going through JMAP spec, b=
ut I am pretty sure people here would see the point I am trying to make her=
e.)<br></div>
<div style=3D"font-family:Arial"><br></div>
</div>
<div style=3D"font-family:Arial">The second pain point (more appropriate wi=
th the subject line) is with attachments being present in the encrypted mim=
e. Maybe a flag needs to be added by the MUA to an encrypted mail, so that =
server may not have to decrypt the mime to get to know that an attachment i=
s present within the mime. This, now that I put thoughts into words, is mor=
e an optimization than anything else, but I would still like to have your v=
iews on this.<br></div>
<div style=3D"font-family:Arial"><br></div>
</div>
<div style=3D"font-family:Arial">I would again like to mention that I love =
what you are doing, I still consider myself a newbie to IETF in general, an=
d JMAP is probably the working group I am most interested in. I will go thr=
ough the whole spec the first chance I get.<br></div>
<div><div><div><div><div><div><div style=3D"font-family:Arial"><br></div>
<div style=3D"font-family:Arial">-- <br></div>
<div><div dir=3D"ltr"><div style=3D"font-family:Arial">Regards,<br></div>
<div>Vaibhav<br></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div><u>______________________________<wbr>_________________</u><br></div>
<div>Jmap mailing list<br></div>
<div><a href=3D"mailto:Jmap@ietf.org" target=3D"_blank">Jmap@ietf.org</a><b=
r></div>
<div><a href=3D"https://www.ietf.org/mailman/listinfo/jmap" target=3D"_blan=
k">https://www.ietf.org/mailman/<wbr>listinfo/jmap</a><br></div>
</blockquote><div style=3D"font-family:Arial"><br></div>
<div id=3D"gmail-m_-1035958819885982311sig56629417"><div class=3D"gmail-m_-=
1035958819885982311signature">--<br></div>
<div class=3D"gmail-m_-1035958819885982311signature">=C2=A0 Bron Gondwana, =
CEO, FastMail Pty Ltd<br></div>
<div class=3D"gmail-m_-1035958819885982311signature">=C2=A0 <a href=3D"mail=
to:brong@fastmailteam.com" target=3D"_blank">brong@fastmailteam.com</a><br>=
</div>
<div class=3D"gmail-m_-1035958819885982311signature"><br></div>
</div>
<div style=3D"font-family:Arial"><br></div>
</div>

<br>______________________________<wbr>_________________<br>
Jmap mailing list<br>
<a href=3D"mailto:Jmap@ietf.org">Jmap@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/jmap" rel=3D"noreferrer" t=
arget=3D"_blank">https://www.ietf.org/mailman/<wbr>listinfo/jmap</a><br>
<br></blockquote></div><br><br clear=3D"all"><br>-- <br><div class=3D"gmail=
_signature"><div dir=3D"ltr"><div><br></div>Regards,<div>Vaibhav Singh</div=
></div></div>
</div></div>

--001a113f9a82bdbb86055caa890a--


From nobody Sun Oct 29 23:12:00 2017
Return-Path: <internet-drafts@ietf.org>
X-Original-To: jmap@ietf.org
Delivered-To: jmap@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id B4ABD1394F2; Sun, 29 Oct 2017 23:11:57 -0700 (PDT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: internet-drafts@ietf.org
To: <i-d-announce@ietf.org>
Cc: jmap@ietf.org
X-Test-IDTracker: no
X-IETF-IDTracker: 6.63.2
Auto-Submitted: auto-generated
Precedence: bulk
Message-ID: <150934391769.3441.16788593978700146048@ietfa.amsl.com>
Date: Sun, 29 Oct 2017 23:11:57 -0700
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/y6D_n1Lqs6hvEOM2b3AA4_2uFIo>
Subject: [Jmap] I-D Action: draft-ietf-jmap-core-02.txt
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Oct 2017 06:11:58 -0000

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the JSON Mail Access Protocol WG of the IETF.

        Title           : JSON Meta Application Protocol
        Author          : Neil Jenkins
	Filename        : draft-ietf-jmap-core-02.txt
	Pages           : 42
	Date            : 2017-10-29

Abstract:
   This document specifies a protocol for synchronising JSON-based data
   objects efficiently, with support for push and out-of-band binary
   data upload/download.


The IETF datatracker status page for this draft is:
https://datatracker.ietf.org/doc/draft-ietf-jmap-core/

There are also htmlized versions available at:
https://tools.ietf.org/html/draft-ietf-jmap-core-02
https://datatracker.ietf.org/doc/html/draft-ietf-jmap-core-02

A diff from the previous version is available at:
https://www.ietf.org/rfcdiff?url2=draft-ietf-jmap-core-02


Please note that it may take a couple of minutes from the time of submission
until the htmlized version and diff are available at tools.ietf.org.

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/


From nobody Sun Oct 29 23:12:50 2017
Return-Path: <internet-drafts@ietf.org>
X-Original-To: jmap@ietf.org
Delivered-To: jmap@ietfa.amsl.com
Received: from ietfa.amsl.com (localhost [IPv6:::1]) by ietfa.amsl.com (Postfix) with ESMTP id 51BBB1389E1; Sun, 29 Oct 2017 23:12:48 -0700 (PDT)
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
From: internet-drafts@ietf.org
To: <i-d-announce@ietf.org>
Cc: jmap@ietf.org
X-Test-IDTracker: no
X-IETF-IDTracker: 6.63.2
Auto-Submitted: auto-generated
Precedence: bulk
Message-ID: <150934396830.3433.12275627155161021625@ietfa.amsl.com>
Date: Sun, 29 Oct 2017 23:12:48 -0700
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/9y-yoe9NmE5P_vgFeL-lifAdEGE>
Subject: [Jmap] I-D Action: draft-ietf-jmap-mail-02.txt
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.22
List-Id: JSON Message Access Protocol <jmap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/jmap>, <mailto:jmap-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/jmap/>
List-Post: <mailto:jmap@ietf.org>
List-Help: <mailto:jmap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/jmap>, <mailto:jmap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 30 Oct 2017 06:12:48 -0000

A New Internet-Draft is available from the on-line Internet-Drafts directories.
This draft is a work item of the JSON Mail Access Protocol WG of the IETF.

        Title           : JMAP for Mail
        Author          : Neil Jenkins
	Filename        : draft-ietf-jmap-mail-02.txt
	Pages           : 41
	Date            : 2017-10-29

Abstract:
   This document specifies a data model for synchronising email data
   with a server using JMAP.


The IETF datatracker status page for this draft is:
https://datatracker.ietf.org/doc/draft-ietf-jmap-mail/

There are also htmlized versions available at:
https://tools.ietf.org/html/draft-ietf-jmap-mail-02
https://datatracker.ietf.org/doc/html/draft-ietf-jmap-mail-02

A diff from the previous version is available at:
https://www.ietf.org/rfcdiff?url2=draft-ietf-jmap-mail-02


Please note that it may take a couple of minutes from the time of submission
until the htmlized version and diff are available at tools.ietf.org.

Internet-Drafts are also available by anonymous FTP at:
ftp://ftp.ietf.org/internet-drafts/

