Re: [Jmap] I-D Action: draft-ietf-jmap-sieve-01.txt

Neil Jenkins <neilj@fastmailteam.com> Wed, 21 October 2020 03:49 UTC

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 6DAA93A0C9E for <jmap@ietfa.amsl.com>; Tue, 20 Oct 2020 20:49:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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=eIc++W83; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=EtgDr7rK
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 IVSe6AYwWqRp for <jmap@ietfa.amsl.com>; Tue, 20 Oct 2020 20:49:55 -0700 (PDT)
Received: from wout4-smtp.messagingengine.com (wout4-smtp.messagingengine.com [64.147.123.20]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id A50413A0C9D for <jmap@ietf.org>; Tue, 20 Oct 2020 20:49:55 -0700 (PDT)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 8AA8ED5F for <jmap@ietf.org>; Tue, 20 Oct 2020 23:49:54 -0400 (EDT)
Received: from imap7 ([10.202.2.57]) by compute3.internal (MEProxy); Tue, 20 Oct 2020 23:49:54 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= fastmailteam.com; h=mime-version:message-id:in-reply-to :references:date:from:to:subject:content-type; s=fm1; bh=VJzm6f/ lqenZQb6xvvsQXyMrYAURWguhXUygIJfuBIM=; b=eIc++W83GnewnlxBUPVGs3n pwngt11KEcqLPCl3vWMCj85JHVhFIWROdj1wZB+4VqQYzOnhygPjrFHJOUyJmwmZ +0fKNuVw2kiK5SQtqbYSXqxrNBRQ/uJFqwTIj2VzDONWgs4VuzpljSTVLXNv9dPJ 4p2JGjjR7DHQQi8R2mOycDMLyIht7fw0U0shpRrKinkz/E5RLLrs7xxqdwnBkk/X 2ECJyNuaKK40qkyaTgEQB+2GHS7Pt4WNVHvdv/i/F+A8BxQEVwNgJJNJK3KEurNn OuI7xwk8s+ZzLCeH187qs3xDWhNL5CdrtyRdWogKl6jrXrB4vRVCLx1P/Rda4ww= =
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=fm1; bh=VJzm6f /lqenZQb6xvvsQXyMrYAURWguhXUygIJfuBIM=; b=EtgDr7rKs1Hu5X/hARz5vJ z/JnGdBwkqGSajSxalMc/KLzLDhTWUMybwTKrckPk0NYCtuzXV9tZVVlfY8nFEia HfF7rTZs2rjzLVrGYrWRaGK/ZzZxMbfCZCdW41SjnVZR1YZQRL2yBqnKqlWK+mln UlZMdeqZ+S9nWHXGMjnWXLbcYAfvWHhBDiLEQJIqJZV3agpEIbGoEeLjD30dWi0a TEwOEaQtT2Lmjn4bi8bMzS4tZtFYTFvV+cm45daRtf/jQDJDoA0cT+qjQ+c277sL e2ZJUjacACUjWohGhcEffWGjVuO3nSjOs4/li7b366wovLpN/9PvD8REvMq47bnw ==
X-ME-Sender: <xms:4a-PX_rdZ2pkfg8gKKwM4sHckKeNZH5PEDe4kQtQ6JhmBqHr2H_geA> <xme:4a-PX5o7FlbicWYp5dDRbsgBx0VIeex2Kyw5fjpGh57Gz23boUeZ7OlDBzwGCbyP8 DOh9omditt5Fg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrjeeggdejfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvufgtsegrtderreerreejnecuhfhrohhmpedfpfgvihhl ucflvghnkhhinhhsfdcuoehnvghilhhjsehfrghsthhmrghilhhtvggrmhdrtghomheqne cuggftrfgrthhtvghrnhepheeuhfdujedtieevkedvhfffgfelfeelhfefkeehhfekleek hfefueefveffjeeinecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepnhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtohhm
X-ME-Proxy: <xmx:4a-PX8MUXBbM11iVWbGbh6kLECnd1rp21THzX07ZQUaJ1_bPk377og> <xmx:4a-PXy51g8KUgjO76pmabl7eegaRhR8ldXSkmhPP0kL5WTnCUfFQeA> <xmx:4a-PX-786xMMdNdeN2IaZZmtzwy0Cc3t9GqPXpmke0tF1UJnjK0HCQ> <xmx:4q-PXwFOtCFiQaBNR5La7HZgmQH9prn3hqEKQcG4O3O5lTvaPT43ow>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id C71EE1800B3; Tue, 20 Oct 2020 23:49:53 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.3.0-516-g928217d-fm-20201020.001-g928217d6
Mime-Version: 1.0
Message-Id: <17cefc62-502a-4832-921c-f68ac6f5dec3@dogfood.fastmail.com>
In-Reply-To: <160079973219.9216.17349013185550397825@ietfa.amsl.com>
References: <160079973219.9216.17349013185550397825@ietfa.amsl.com>
Date: Wed, 21 Oct 2020 14:49:29 +1100
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="ebe69cef4e8d416d9486108bd105a4d7"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/6u3p0fGs9cdDrBo8y6aU_8Hi2HU>
Subject: Re: [Jmap] I-D Action: draft-ietf-jmap-sieve-01.txt
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, 21 Oct 2020 03:49:58 -0000

Some comments on this draft:

>    o  Do we need/want both "content" and "blobId" in the SieveScript
      object?  It may be simpler to have just one way of specifying
      content and "blobId" is more versatile and doesn't require JSON-
      encoding of the content.  Furthermore, use of the forthcoming(?)
      Blob/set method would avoid the extra roundtrip of having to
      upload the blob first.

Yes, I think just blobId will probably be better for this, especially if we have methods for manipulating textual blobs in band.

General comments:
 1. Is the contents of the script meant to be immutable or not? The "content" property is apparently mutable, but the "blobId" property is not. This makes no sense.
 2. I find the reference to JSON in the "content" property very confusing. JSON is just the serialisation format and should not be relevant here. For that matter, the discussion of Sieve encoding is also confusing; since this is defined as just the raw octets of the script, why is there extra encoding involved? Shouldn't it just be the script data? I *think* you are just trying to remind people of how strings are written in Sieve, but that seems needless and confusing here to me.
 3. The spec says "When creating or updating a script, a client MUST include either a  _content_ or a _blobId_ property." – this means you can't just update the name of the script. But the name does look like it's meant to be mutable right?
 4. "The id of the SieveScript to activate if the create/update/destroy succeeds." <- Which create/update/destroy? All of them? Or just the one referenced by onSuccessActivateScript? I'm guessing now you mean the latter, but this was not clear to me initially (especially because "destroy" is in there, which doesn't really make sense).
 5. The "replaceOnCreate" arg feels a little ugly to me, but I get why it's there and I don't have a better suggestion.
 6. I think the semantics of the "alreadyExists" SetError is appropriate for the duplicate name issue, so no need to define a new "scriptNameExists" error.
 7. Similarly, I think the "tooManyScripts" error should be just a standard "overQuota" error.
 8. In SieveScript/validate, you specify an "invalidProperties" SetError if no content/blobId or both. This should instead be a (method-level) invalidArguments error.
 9. lastVacationResponse should be of type UTCDate, not Date. (Will need a reference for the data type too).
 10. The /test example request doesn't include an accountId.
Cheers,
Neil.