Re: [Jmap] I made a tool to convert email to JMAP compatible JSON

marc@marclaporte.com Sat, 13 June 2020 11:37 UTC

Return-Path: <marc@marclaporte.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 A5F943A0801 for <jmap@ietfa.amsl.com>; Sat, 13 Jun 2020 04:37:57 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.897
X-Spam-Level:
X-Spam-Status: No, score=-1.897 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_NONE=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 G7ParSE7bOdS for <jmap@ietfa.amsl.com>; Sat, 13 Jun 2020 04:37:55 -0700 (PDT)
Received: from usskm12.fastbighost.net (usskm12.fastbighost.net [216.155.147.116]) (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 B60CB3A07F8 for <jmap@ietf.org>; Sat, 13 Jun 2020 04:37:55 -0700 (PDT)
Received: from li288-253.members.linode.com ([66.228.38.253]:48736 helo=avan.tech) by usskm12.fastbighost.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from <marc@marclaporte.com>) id 1jk4Ty-0001p2-BI; Sat, 13 Jun 2020 14:37:54 +0300
X-Mailer: Cypht
MIME-Version: 1.0
Cc: jmap@ietf.org
In-Reply-To: <4cf2591e-e2d6-4149-a604-e0f6dbd8be71@www.fastmail.com>
From: marc@marclaporte.com
Reply-To: marc@marclaporte.com
To: Seph Gentle <me@josephg.com>
Date: Sat, 13 Jun 2020 07:37:54 -0400
Message-Id: <3af39b224ce9ed212ee53271d5abc17a@avan.tech>
Content-Type: text/plain; charset="UTF-8"; format="flowed"
Content-Transfer-Encoding: quoted-printable
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - usskm12.fastbighost.net
X-AntiAbuse: Original Domain - ietf.org
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - marclaporte.com
X-Get-Message-Sender-Via: usskm12.fastbighost.net: authenticated_id: marc@marclaporte.com
X-Authenticated-Sender: usskm12.fastbighost.net: marc@marclaporte.com
X-Source:
X-Source-Args:
X-Source-Dir:
Archived-At: <https://mailarchive.ietf.org/arch/msg/jmap/aJU9V-oTn00IVGUBUg0FHq9Ngmk>
Subject: Re: [Jmap] I made a tool to convert email to JMAP compatible JSON
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: Sat, 13 Jun 2020 11:37:58 -0000

Dear Seth,

Thank you very much for your contribution! Interesting use of WASM.

Can you add here?
https://jmap.io/software.html

Best regards,

Marc


On Sat, 13 Jun 2020 06:23:06 +0000 Seph Gentle me@josephg.com said

> Hi everyone!
> 
> At the hackathon in Singapore last year Neil Jenkins and I tried to make a
> JMAP wrapper around gmail's API. But we ran into a problem converting RFC822
> message envelopes into JMAP objects.
> 
> So with a bit of help from Bron (brong) I extracted the email-to-JMAP
> codepath out of cyrus-imapd. (Cyrus underpins Fastmail). Anyway the end
> result is now we have a spec compliant, standalone C library / tool to
> convert email objects to JMAP-compatible json. It gives nice, clean, usable
> HTML from any email, extracts attachments, and all the other good stuff.
> 
> I'd love to see some alternate implementations in other languages. The
> extracted C code isn't particularly maintainable, but I figure this would
> provide a great basis for spec conformance testing. And its definitely usable
> on its own.
> 
> I also compiled the code to WASM and wrapped it in a nodejs library so you
> can convert emails to jmap json from nodejs or directly from the browser.
> 
> If you have some emails kicking around, have a play! This is a browser-only
> email viewer which internally loads and displays emails via jmap's format:
> 
> https://josephg.com/mail-viewer/
> 
> Code:
> https://github.com/josephg/mime-to-jmap
> 
> NPM package (containing pre-compiled wasm bundle. Building it yourself is a
> huge pain because of libicu):
> https://www.npmjs.com/package/mime-to-jmap
> 
> Hope someone finds it useful!
> -Seph
> 
> _______________________________________________
> Jmap mailing list
> Jmap@ietf.org
> https://www.ietf.org/mailman/listinfo/jmap