%%% title = "JMAP Extension for imap data" abbrev = "JMAP IMAPData" category = "std" docName = "draft-gondwana-jmap-imapdata-00" updates = [] ipr= "trust200902" area = "Applications" workgroup = "JMAP" keyword = ["IMAP", "JMAP", "email"]
date = 2018-03-19T00:00:00Z
[[author]]
initials="B."
surname="Gondwana"
fullname="Bron Gondwana"
role="editor"
organization = "FastMail"
[author.address]
email = "[email protected]"
uri = "https://www.fastmail.com"
[author.address.postal]
street = "Level 2, 114 William St"
city = "Melbourne"
code = "VIC 3000"
country = "Australia"
%%%
.# Abstract
This document adds additional properties to the JMAP Email and Mailbox objects so that servers which also support IMAP can expose metadata about the IMAP Mailstore via JMAP.
{mainmatter}
[@!I-D.ietf-jmap-mail] JMAP datastores may be built in such a way that they also allow [@!RFC3501] IMAP access to the underlying data.
IMAP mailboxes have some STATUS data which is not required for JMAP and hence not exposed by default. This document provides a way to access those values via JMAP.
IMAP mailboxes contain individual messages by UID, and those can have properties which specific to the individual message. If the server supports multiple IMAP messages collapsed into a single JMAP message (due to identical Email/id or [@!I-D.gondwana-imap-uniqueid] MSGID) then it can be useful to expose the underlying IMAP data via JMAP.
In examples, "C:" indicates data sent by a client that is connected to a server. "S:" indicates data sent by the server to the client.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [@!RFC2119] when they appear in ALL CAPS. These words may also appear in this document in lower case as plain English words, absent their normative meanings.
This extension adds a single property to the Email object:
- imapdata: String[Interger[ImapData]] This is a map of mailbox id to a map of uid to ImapData Object
The ImapData Object has the following properties:
-
internaldate: Date This is the date at which the message was created. This may be the same as the JMAP createdAt value, or different if the underlying store has different internaldates for different messages.
-
keywords: String[Boolean] This is identical to the "keywords" fetch item at the top level, but contains the set of keywords on each individual IMAP message. This may be the same for all messages, depending on the underlying storage mechanics.
-
modseq: Integer|null This is the modseq of the individual message within the IMAP store, or null if the server doesn't support [@!RFC7162].
-
savedate: Date|null This is the date at which the message was added to this mailbox, or null if the server doesn't support [@!I-D.ietf-extra-imap-savedate].
This extension adds a single property to the Mailbox object:
- imapstatus: ImapStatus|null
If the mailbox is not accessible via IMAP (e.g. a virtual mailbox) then it MUST have a null ImapStatus.
The ImapStatus Object has the following properties:
-
imapname: String The name of the mailbox in modified UTF7. "SELECT {imapname}" via IMAP would work if given this name.
-
highestmodseq: Integer|null The HIGHESTMODSEQ of the mailbox, or null if the mailbox does not support [@!RFC7162].
-
messages: Integer The MESSAGES status item (number of messages in mailbox) as defined in [@!RFC3501] for the underlying mailbox.
-
uidvalidity: Integer The UIDVALIDITY as defined in [@!RFC3501] for the underlying mailbox.
-
uidnext: Integer The UIDNEXT as defined in [@!RFC3501] for the underlying mailbox.
If the same message occurs multiple times in an IMAP store with different keywords, the combined keyword contents might be best calculated in different ways for different keywords, for example:
- $flagged should be set if any IMAP record has $flagged set
- $seen should only be set if ALL messages have $seen set (because users are generally actually interested in "unseen")
There will be a registration of an ID, but there's not yet a JMAP registry to add the it into. Maybe something like "ietf:jmap:imapdata".
All this data is visible via IMAP already for users with the same authentication rights, however implementations must ensure that if a message is both in mailboxes where the user has the [@!RFC4314] READ ACL and other mailboxes where the use does not have read access, that the imapdata response is filtered to avoid leaking information about non-visible mailboxes.
TBD.
{backmatter}