Re: [Jmap] Review: draft-murchison-jmap-sieve-01

Ken Murchison <murch@fastmail.com> Wed, 29 July 2020 13:49 UTC

Return-Path: <murch@fastmail.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 DAA893A0B33 for <jmap@ietfa.amsl.com>; Wed, 29 Jul 2020 06:49:15 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.119
X-Spam-Level:
X-Spam-Status: No, score=-2.119 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, NICE_REPLY_A=-0.001, 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=fastmail.com header.b=CX8oWCZL; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=nquaezX5
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 cnOwt7u8IT_V for <jmap@ietfa.amsl.com>; Wed, 29 Jul 2020 06:49:14 -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 2ABC23A0B2F for <jmap@ietf.org>; Wed, 29 Jul 2020 06:49:14 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 8240B5C0176 for <jmap@ietf.org>; Wed, 29 Jul 2020 09:49:13 -0400 (EDT)
Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 29 Jul 2020 09:49:13 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type; s=fm3; bh=90X6B99E5Dj9qNRRL9P4oTj5csg g1+1Srywx6l21dPk=; b=CX8oWCZLOa+Fo5IeGZbIFQo49AiTgB8C2b46E/FMroP BogOcAfdFDO+dnenY9xUisdBYd068NRln9WuBVa3tkvMBked3h5m2kKY9nYaGrZb 16s6vuKR001S45L4V6qBfVVfW05n2oTUHDFxyQIUoywMpiUwUr87h8vux7rbf/UD nWhq+Qz19UlbkwTTQMq5yAxsmiiJ3JqbzBivuxIYjrRWlZUiBMc5guPFPFiTTV+9 skLNPVVoDySbSzgxADHFRNobH9p1S502GIHbDysK98ksYLFJTiDERLh6sNQpyHUo ws25EbM0XoxEszSkRu3KWyJpkV3SJpxbPG1wiuzmRNg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=90X6B9 9E5Dj9qNRRL9P4oTj5csgg1+1Srywx6l21dPk=; b=nquaezX5SDSa+Y2v2WHIIO r1y7rhFtijN+tOVmTB2otDmFGHlixc2d5nXM1Q+z0OiOWy37Y9sxNaEjyIuhZJ7W rXI6EOkra6/pVlpLE13zmOlCeyAps7JxouPv2oLfv5pZvmeCFt6ab9DlCW0aAzdB OBoFYDazgJDHwyMnK+4AloQAevcU+R2QvB88f8lDghVUP0p2K4vOxtcVpD/4j4aL 5oCicZoV/yI8TM5l5ckJVYGBJ2JgtwY5EiMSh9haGC9xhFUuhFMmxHH4znkrXV3P 7r+T8dRR3YGIcudu8FD5D/ES+bL3al/6tMuW2Pg9oA3N7RBzTx7wLcLrxfMqGZ6A ==
X-ME-Sender: <xms:WH4hX9U4nC1T_ZbIwaF3n5W3ASl1-W0wSQ57aoyZRd6F8QHBwGYgAA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrieeggdeilecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepuffvfhfhkffffgggjggtsegrtderre dtfeejnecuhfhrohhmpefmvghnucfouhhrtghhihhsohhnuceomhhurhgthhesfhgrshht mhgrihhlrdgtohhmqeenucggtffrrghtthgvrhhnpeekheevhfduleeufeduhfellefffe eigeeguddvveekiefhvdeujeeffeejtdegfeenucfkphepjeegrdejjedrkeehrddvhedt necuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhurh gthhesfhgrshhtmhgrihhlrdgtohhm
X-ME-Proxy: <xmx:WH4hX9ms5SjRjsOi7l2_-sZeqyjMT0HWW74VlN0vvjrUvY4TQBdYSw> <xmx:WH4hX5bmgUDdIuwsgUd9iyZteFK01AkRhlYxQIftwK094TBvyuIjQw> <xmx:WH4hXwVepRcKpPfRN0g1LFCMSfLsoX8FiNbUL0_3PSESKXX0YGJMCA> <xmx:WX4hXxnE53almEGlLy77v-BFxelJum7tSlaLBsrzo7yc9FMV1vlMRw>
Received: from [192.168.1.22] (cpe-74-77-85-250.buffalo.res.rr.com [74.77.85.250]) by mail.messagingengine.com (Postfix) with ESMTPA id 627B1328005D for <jmap@ietf.org>; Wed, 29 Jul 2020 09:49:12 -0400 (EDT)
To: jmap@ietf.org
References: <1a099401-bbb6-496f-836f-033a0274b74f@dogfood.fastmail.com> <cffb80e8-f83e-4951-8dec-aa7a7cd5276e@www.fastmail.com>
From: Ken Murchison <murch@fastmail.com>
Message-ID: <9048b94a-8927-5915-b280-af5e1d7d0cfa@fastmail.com>
Date: Wed, 29 Jul 2020 09:49:11 -0400
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0
MIME-Version: 1.0
In-Reply-To: <cffb80e8-f83e-4951-8dec-aa7a7cd5276e@www.fastmail.com>
Content-Type: multipart/alternative; boundary="------------68FE4B8117BD57BD637D3318"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/ffNiSnY03ynanpPxEXMW2W-zQ5c>
Subject: Re: [Jmap] Review: draft-murchison-jmap-sieve-01
X-BeenThere: jmap@ietf.org
X-Mailman-Version: 2.1.29
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, 29 Jul 2020 13:49:16 -0000

On 7/13/20 4:08 PM, Ricardo Signes wrote:
> *I suggest instead*:
>
> 1. We drop isActive as a property from SieveScript.
> 2. We create a new type, SieveConfig
> 3. SieveConfig has exactly one instance per account, with the fixed id 
> "singleton"
> 4. The SieveScriptConfig object has one property, activeScriptId, 
> which is either a script id or null
> 5. If no "name" is provided, the server will provide a guaranteed 
> unique name.
>
> To replace the active Sieve script in the blind, you do this:
>
> SieveScript/set { create: { newScript: { content: "..." } } }
> SieveConfig/set { update: { "singleton": { activeScriptId: 
> "#newScript" } } }
>
> This is guaranteed safe.  The worst case is that you end up with a 
> uniquely-named script that is not, in fact, active.
>
> We probably also need:
>
> 6.  If the active script is deleted, the SieveScriptActive 
> activeScriptId becomes null.
>
> Alternatively, it could be illegal to destroy the active script.


As an alternative to using a new data type for setting the active 
script, we could make isActive a server-set property (not directly set 
by the client within the SieveScript/set{create|update} method) and add 
a new onSuccessActivateScript argument to the SieveScript/set method 
which only gets processed if ALL create|update|delete are successful.

-- 
Kenneth Murchison
Senior Software Developer
Fastmail US LLC