Re: [Jmap] [Jmap for Sieve] Binary/blob vs. Inline

Neil Jenkins <neilj@fastmailteam.com> Tue, 26 October 2021 04:43 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 A259D3A0DD9 for <jmap@ietfa.amsl.com>; Mon, 25 Oct 2021 21:43:17 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.1
X-Spam-Level:
X-Spam-Status: No, score=-2.1 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_H2=-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=BewIASq4; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=TccHO0oN
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 oZvVbvkEdtg0 for <jmap@ietfa.amsl.com>; Mon, 25 Oct 2021 21:43:12 -0700 (PDT)
Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 79A6B3A0DD6 for <jmap@ietf.org>; Mon, 25 Oct 2021 21:43:12 -0700 (PDT)
Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C620D5C0383 for <jmap@ietf.org>; Tue, 26 Oct 2021 00:43:10 -0400 (EDT)
Received: from imap43 ([10.202.2.93]) by compute3.internal (MEProxy); Tue, 26 Oct 2021 00:43:10 -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=zdGYYFE 9Tv0xZd2cz6UFvh0oC49zfY4unv9ZnO6Bogc=; b=BewIASq4geO/yHv9Hm9d7JO uhb6pGgpSq6ZlkTd08HhI48q9pb+cnBUXiTcDFk1Tmxqpij5Z8Qv7g5FJ//lpNzb Nl5SS4PD5qT9dw6Ilns5/MREjtFFV9KzU26DUNcdWJajuw14F/73XK06OIRG9KXV uFjMzLQbFpl51FMEUk7YJt3JLlCRaS/RL8+ZZiUcSXDV0/z+m4ggG11OCJgvTIoV 59gAZoWDcE3qqh/Bc5SkCr1yN/gb/+Il5kRObeplY/kaj+3dfiqDcPh441+2JjY2 Kf/IvOLiYMxKWWxXy9MIeHKUO52mD82f7fbcqoruJsEUZ2FS6JX090vCcMZ+2yQ= =
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=zdGYYF E9Tv0xZd2cz6UFvh0oC49zfY4unv9ZnO6Bogc=; b=TccHO0oNIEpPN7+ST7X5Gb v0WZMzlv4JjdSxxoGxYGfp8Pey1Qm0rHZlN3XoePTNbLreGxCH0GayUIHUeWJACn 7ygrr/EgjkUP/CKOi5qEjvFoCRYS6tzNMWbCWDwgKEXUCCCpKH0bSEzHVHnii8kB Av6t8dJUd/0fPA1YGab4C/Ln8K8fxJClwaqN7FSrOr6BIr2lfcfw53ysdKuDMhht Y4kRkEjmV0lDQ8uNIjV0aFvwGqyy4zE7ibqdsGwPQm4PwZOzINQ+G2DAlvklWqKR mFG5obKyOTNxiVxgdgkHVZC3QpFb3htFuT+ZeGpU3d9Ozx7IgrFq9sWu80Ysiunw ==
X-ME-Sender: <xms:Xod3YSrIXEW1TBoRaNt0yBSIEluo4j04Td8B3mmzuyoAHIUvLArtiQ> <xme:Xod3YQoSBR-bGzso9ENzkGgHq3l7P8rOkCiAXYjBynanZE0hglflWg-PqBKxKAZhF hcHpnfbUHbt7g>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrvdefiedgjeeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgesrgdtreerreerjeenucfhrhhomhepfdfpvghi lhculfgvnhhkihhnshdfuceonhgvihhljhesfhgrshhtmhgrihhlthgvrghmrdgtohhmqe enucggtffrrghtthgvrhhnpeehuefhudejtdeiveekvdfhfffgleeflefhfeekhefhkeel kefhfeeufeevffejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpehnvghilhhjsehfrghsthhmrghilhhtvggrmhdrtghomh
X-ME-Proxy: <xmx:Xod3YXMC9gcHyPvqtLW6OIoNbPU5cyF-C4_EUF6Aq1e4Wr8RqjY-og> <xmx:Xod3YR7J2apJVveUaQuSjMB0VI2qBqgxvzzQikVnz3DOvQdCGff-fQ> <xmx:Xod3YR5aVxEzaLkpce0rsiMJjPLqosyaRcQZmYeSMIO4GvCqbjzSyA> <xmx:Xod3YTFOqiFAAK78lTTUfClIonLr2YsGwV0uNMYgh_Z3Ug-qp3Y0ug>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 92600AC03DB; Tue, 26 Oct 2021 00:43:10 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.5.0-alpha0-1399-ga34296eb8f-fm-20211021.002-ga34296eb
Mime-Version: 1.0
Message-Id: <ea9ad429-df42-4c51-8345-542aa1624c8d@dogfood.fastmail.com>
In-Reply-To: <a192b2f3-4b4c-1d94-7302-fab59749528a@audriga.com>
References: <a192b2f3-4b4c-1d94-7302-fab59749528a@audriga.com>
Date: Tue, 26 Oct 2021 15:43:09 +1100
From: Neil Jenkins <neilj@fastmailteam.com>
To: IETF JMAP Mailing List <jmap@ietf.org>
Content-Type: multipart/alternative; boundary="99d3bbf915b147c1a8dc71c67e6f8ddf"
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/xMgHDh_OUGUfS5pf1RNYJzyFaTc>
Subject: Re: [Jmap] [Jmap for Sieve] Binary/blob vs. Inline
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: Tue, 26 Oct 2021 04:43:18 -0000

On Fri, 22 Oct 2021, at 03:41, Hans-Joerg Happel wrote:
> => We'd argue that this process is both complex to implement plus it's 
> not particularly elegant to create a need for storing a temporary file. 

Depends how you look at it; it *is* elegant to have a single consistent method for referencing binary data. I think the answer here if you are trying to add support on a legacy system where this is difficult is to make the Sieve its own account. Then when you upload a blob to that account you know it can only be a sieve script, which should allow you to do something reasonable.

> It would therefore be good if it is possible to (alternatively?) submit 
> the script inline in the "SieveScript/set" command instead of a blobid.

Using Bron's blob extension you can create a blob in-band and then backreference it from the SieveScript/set command. But I wouldn't want to say that was the only way you could do it; that breaks the consistency of the blob handling.

> ps.: A more general question of the "write blob first" approach is 
> (beyond just uploading Sieve scripts) in how far quotas are respected. 
> If blob storage can be used for all types of data, but quota (both total 
> and max-element-size) may differ for email attachments, Sieve scripts or 
> files - how is the initial blob storage supposed to "know" which quota 
> to check against?

You just want a quota somewhat larger than the largest single file the user would be permitted to upload for any of these contexts. 

—Neil.