A protocol ``JMAP'' that improves the connection to the mail server in a modern style instead of POP or IMAP and eliminates the need to set SMTP, it can be synchronized at high speed and the communication volume of smartphones can be reduced and efficient



There are two widely used protocols for communication between mail servers and clients:

POP and IMAP . However, POP's main specifications were formulated around 2000, making it difficult to meet modern needs such as synchronization. ' JMAP (JSON Meta Application Protocol) ' was formulated to solve such problems. The core specifications of JMAP and the specifications of JMAP for email were completed in 2019, and some clients already support JMAP.

JSON Meta Application Protocol Specification (JMAP)
https://jmap.io/



JMAP is a project led by the Fastmail team, which has been providing email services since 1999. Although the name seems to be a protocol that converts IMAP to JSON format, it is actually a completely new protocol that has the advantage of being able to use network resources efficiently and being easy for developers to handle. There are services that use similar protocols within apps, such as Gmail, but JMAP is an open standard API, and is different in that it can be connected with servers and clients created by others. .

A movie that appeals to the users of the mail service is published on YouTube.

JMAP-a better way to email-YouTube


By using JMAP, you can read mail much faster than traditional IMAP. For example, the figure below shows the result of verifying the reading speed of emails on two smartphones. The e-mail client connected with JMAP on the left completed loading in an instant, but the e-mail client using IMAP on the right took a long time.



Even if you are connected from multiple terminals, you can receive new mail all at the same time. Of course, if you delete an email on one terminal, it will be immediately reflected on another terminal. It was difficult to realize such behaviors that are considered commonplace today with IMAP.



Other advantages of JMAP are as follows.

・Stateless protocol
It is OK even if the connection is intermittent, and it is possible to reduce battery consumption, especially for mobile devices.

・Add IDs to files and folders
By giving the user an invisible ID, it is possible to easily change the name, and the cost of synchronization will be reduced.

・Batch processing is also possible
It is possible to perform commands in order while connected, but it is also possible to perform multiple commands collectively in one batch process. This makes bulk deletion or flagging operations more likely to succeed, even over unstable connections.

・Differential updates
Clients can efficiently retrieve just the data they need to synchronize from their current state to the state on the server.

・Data volume can be controlled
The client can dictate how much data the server is allowed to send.

・No custom parser required
A number of libraries already exist for using HTTPS and JSON, technologies widely used in web development. It should make working with mail services much easier for new developers.

・Backward compatible
It is backwards compatible with both IMAP folders and Gmail label formats, allowing you to implement JMAP while supporting legacy systems.

・ Responsible for sending emails
IMAP and POP could not send mail, and it was necessary to use another protocol called SMTP when sending. As a result, troubles such as 'I can receive mail but I can not send it' may occur due to failure in initial setting. JMAP, on the other hand, can handle sending emails using a single protocol, so these problems do not occur.

・Uses HTTPS and JSON
Not only does it have a large number of libraries, but it also has the advantage of being less prone to firewall problems and being able to use the functions built into the terminal to streamline HTTP connections.

・Transmit binary data directly
In conventional e-mails, attached files are converted into character strings in Base64 format before being sent, but conversion results in a large amount of data. On the other hand, JMAP can upload and download binary data as it is, and parallel processing is possible even if there are many attached files.

The details of the specification are hosted on GitHub , and for developers who want to create an email client using JMAP, there is a developer's guide with many examples of the JSON that is actually sent. I'm here. A list of mail clients, servers, libraries, etc. that are already compatible with JMAP is also posted, and at the time of article creation, it was as follows.

◆ Client
JMAP Demo Webmail (JavaScript, MIT)
JMAP::Tester (Perl, Perl5)
Cypht (PHP & JavaScript)
Ltt.rs (Java, Apache)
Group-Office (Javascript)
meli (Rust, GPLv3)
Mailtemi
tmail-flutter (Dart)
mujmap (Rust)

◆ Server
JMAP Proxy (Perl, MIT)
Cyrus IMAP (C, BSD-style)
Apache James (Java, Apache)
Group-Office (PHP)
atmail (golang, proprietary)
tmail-backend (Java, Apache)
hyper-auth-proxy (Rust)
Stalwart JMAP (Rust, AGPLv3)

◆ Library
JMAP-JS (JavaScript, MIT)
jmap-client-ts (TypeScript, MIT)
zend-jmap (PHP, New BSD)
Java JMAP Library (Java 7, Apache)
melib (Rust, GPLv3)
jmap-rs (Rust; in development)
jmapc (Python; partially implemented)
jmap client (Rust, Apache/MIT)

◆ Proxy
Stalwart IMAP (Rust, AGPLv3)

In addition to e-mail, sub-protocols for WebSocket have been completed in the JMAP protocol, and specifications for other uses such as ' JMAP Calendars ', ' JMAP Sharing ', ' JMAP Contacts ', ' JMAP Tasks ', and ' JMAP Quotas ' It is said that formulation is in progress.

in Software, Posted by log1d_ts