Re: [Jmap] Attachments and composing more complex MIME structures

Neil Jenkins <neilj@fastmailteam.com> Wed, 09 August 2017 08:03 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 5847D131E08 for <jmap@ietfa.amsl.com>; Wed, 9 Aug 2017 01:03:36 -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=jWrQAkmr; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=HdvM2Ys3
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 ZDFWboGBddor for <jmap@ietfa.amsl.com>; Wed, 9 Aug 2017 01:03: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 C36BB127868 for <jmap@ietf.org>; Wed, 9 Aug 2017 01:03:32 -0700 (PDT)
Received: from betaweb1.internal (betaweb1.nyi.internal [10.202.2.10]) by mailout.nyi.internal (Postfix) with ESMTP id 316AD21EBA for <jmap@ietf.org>; Wed, 9 Aug 2017 04:03:32 -0400 (EDT)
Received: from betaweb1 ([::ffff:10.202.2.10]) by betaweb1.internal (MEProxy); Wed, 09 Aug 2017 04:03:32 -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=Z7jIqWtQ0Dp4S1D5i +9I8aDUSte6c8wMriWBfpyDUHc=; b=jWrQAkmr8oh9dsfoKrduW/IE9bkg2s1p0 o7F2VJQr9i0FFwOd8U54FHjRgF4/8YK1hv9h1Fn9+MxVJk3TT3zMcfBbZNCGtOcS mTCh66MyLK0Pbw3bPWlAyFPctZz7iekTM8/CWmwYD3ip0lhlUH75/eHlVaomXgey xLtgVJUR3efu44mmztjzX0P+ARj2MOEIum6fzgmqDTKtekQggZK0I/TyNkKidL46 fdbz5xkirqiO1dH2WAYieUHbFzdo7eF7ArBjvh+Zfxidix/ovamC8jhTjA7Cqt9S S+G5+de6/gBG7UGvWJ0eT5mnG3RynJqzpmtJTSRg5aNc2/huhEGpQ==
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=Z7jIqW tQ0Dp4S1D5i+9I8aDUSte6c8wMriWBfpyDUHc=; b=HdvM2Ys3mS9SxXcUfkSXX/ TiVqg524hE8gqmOu1JE47GiVQtx0WziR7k/jXgkj/0pXm5GaPef+vECGDE9vBJ7e E1HSGrm6X4SCMMToGp7A+q6CStzwdQIT4PrB3eLmNn/dGwEWXc2eh7FOxADGwN/i r3Pu674z2UVzmVewSinVMROhll3L+o8AyxmhOr03BagNX982eiGF+xHlFw2IUsfq LKCME6iMtBSOlB0O+a8k2mr+4FmDU8s4r98nVz7k/Ng2ZlBFc/44wazJIYuL6Xob BLv2ZgOX/hZZII3t13oitvwrtMWRZRZde8BACxUtN3MsLWwATO5MbqeJSj9c3A2g ==
X-ME-Sender: <xms:1MGKWZ6NVKNmFxURn97sPJrlbfoP-Nj42zCBOiev95mfS2ojGnRA2A>
Received: by mailuser.nyi.internal (Postfix, from userid 99) id D5739E223E; Wed, 9 Aug 2017 04:03:31 -0400 (EDT)
Message-Id: <1502265811.1510508.1067740024.5044583F@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="_----------=_150226581115105082"
X-Mailer: MessagingEngine.com Webmail Interface - ajax-f209590a
Date: Wed, 09 Aug 2017 18:03:31 +1000
In-Reply-To: <20170808123146.GD1457@meili>
References: <20170808092341.GB1457@meili> <1502188117.322839.1066636392.362BFD31@webmail.messagingengine.com> <20170808123146.GD1457@meili>
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/iFzTd0WwXlP5Dgu5wlNFJmx_Iqc>
Subject: Re: [Jmap] Attachments and composing more complex MIME structures
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, 09 Aug 2017 08:03:36 -0000

On Tue, 8 Aug 2017, at 10:31 PM, Josef 'Jeff' Sipek wrote:
> Is there a MIME-aware client that breaks with what the iOS client
> generates?
I don't know; I haven't tested this exhaustively. I know we had bugs
with this multipart/mixed style at one point, since it was pretty
uncommon so I wouldn't be surprised if there were bugs or lack of
support elsewhere too.
More importantly, plain text is deeply problematic on mobile because of
hard wrapping. Format=flowed has zero traction[1], so you mostly end up
with hard wrapping that breaks in *really* awkward positions on many
mobile screens, as it normally presumes you can fit 80 chars in a
single line.
> In theory the multipart/mixed approach should be **more** compatible
> than HTML, since the client doesn't have to deal with HTML on top of
> dealing with MIME anyway.
Maybe, but I wouldn't be surprised if the MIME handling in some clients
extended only to "find the right part to show".
> As a mutt user that likes text/plain emails... it'd be great if these
> generated emails displayed nicely with non-HTML based MUAs. :)
There's no reason why the server can't generate a reasonable textBody
component as well (it will have to do this as well as htmlBody in this
case anyway). I believe you could build an excellent plain-text only
client on JMAP if you wanted, although realistically all modern email
clients have to deal with HTML.
> Is the goal to make only the simplest of clients easy to implement?
> Where does one draw the line between simple enough to use the nice
> jmap interface and too complex (IOW: just implement the whole RFC
> 5322/MIME/etc. stack and use the blob API)?
I believe you could implement the functionality of most modern GUI email
clients without resorting to MIME parsing. This is basically the goal:
most clients never need to deal with the raw message, but some with
support for less common features can do so if they want (like for
S/MIME). For example, I believe you could implement all the
functionality in the iOS/macOS Mail apps using the JMAP Message object,
although the implementation underneath might vary in some aspects like
the one we're discussing.  (Neil, do you agree?).
Neil.

Links:

  1. https://blog.fastmail.com/2016/12/17/format-flowed/