draft-ietf-jmap-mail-02.txt   draft-ietf-jmap-mail-03.txt 
JMAP N. Jenkins JMAP N. Jenkins
Internet-Draft FastMail Internet-Draft FastMail
Updates: 5788 (if approved) October 30, 2017 Updates: 5788 (if approved) November 29, 2017
Intended status: Standards Track Intended status: Standards Track
Expires: May 3, 2018 Expires: June 2, 2018
JMAP for Mail JMAP for Mail
draft-ietf-jmap-mail-02 draft-ietf-jmap-mail-03
Abstract Abstract
This document specifies a data model for synchronising email data This document specifies a data model for synchronising email data
with a server using JMAP. with a server using JMAP.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 1, line 32 skipping to change at page 1, line 32
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at https://datatracker.ietf.org/drafts/current/. Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on May 3, 2018. This Internet-Draft will expire on June 2, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(https://trustee.ietf.org/license-info) in effect on the date of (https://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3 1.1. Notational Conventions . . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4 1.2. The Date datatypes . . . . . . . . . . . . . . . . . . . 4
1.3. Addition to the capabilities object . . . . . . . . . . . 4 1.3. Terminology . . . . . . . . . . . . . . . . . . . . . . . 4
1.4. Addition to the capabilities object . . . . . . . . . . . 4
2. Mailboxes . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2. Mailboxes . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.1. getMailboxes . . . . . . . . . . . . . . . . . . . . . . 8 2.1. getMailboxes . . . . . . . . . . . . . . . . . . . . . . 8
2.2. getMailboxUpdates . . . . . . . . . . . . . . . . . . . . 8 2.2. getMailboxUpdates . . . . . . . . . . . . . . . . . . . . 8
2.3. getMailboxList . . . . . . . . . . . . . . . . . . . . . 8 2.3. getMailboxList . . . . . . . . . . . . . . . . . . . . . 9
2.4. getMailboxListUpdates . . . . . . . . . . . . . . . . . . 9 2.4. getMailboxListUpdates . . . . . . . . . . . . . . . . . . 9
2.5. setMailboxes . . . . . . . . . . . . . . . . . . . . . . 9 2.5. setMailboxes . . . . . . . . . . . . . . . . . . . . . . 9
3. Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3. Threads . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
3.1. getThreads . . . . . . . . . . . . . . . . . . . . . . . 10 3.1. getThreads . . . . . . . . . . . . . . . . . . . . . . . 11
3.1.1. Example . . . . . . . . . . . . . . . . . . . . . . . 11 3.1.1. Example . . . . . . . . . . . . . . . . . . . . . . . 11
3.2. getThreadUpdates . . . . . . . . . . . . . . . . . . . . 11 3.2. getThreadUpdates . . . . . . . . . . . . . . . . . . . . 11
4. Messages . . . . . . . . . . . . . . . . . . . . . . . . . . 11 4. Messages . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.1. getMessages . . . . . . . . . . . . . . . . . . . . . . . 16 4.1. getMessages . . . . . . . . . . . . . . . . . . . . . . . 16
4.1.1. Example . . . . . . . . . . . . . . . . . . . . . . . 17 4.1.1. Example . . . . . . . . . . . . . . . . . . . . . . . 17
4.2. getMessageUpdates . . . . . . . . . . . . . . . . . . . . 17 4.2. getMessageUpdates . . . . . . . . . . . . . . . . . . . . 17
4.3. getMessageList . . . . . . . . . . . . . . . . . . . . . 17 4.3. getMessageList . . . . . . . . . . . . . . . . . . . . . 18
4.3.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 17 4.3.1. Filtering . . . . . . . . . . . . . . . . . . . . . . 18
4.3.2. Sorting . . . . . . . . . . . . . . . . . . . . . . . 20 4.3.2. Sorting . . . . . . . . . . . . . . . . . . . . . . . 21
4.3.3. Thread collapsing . . . . . . . . . . . . . . . . . . 21 4.3.3. Thread collapsing . . . . . . . . . . . . . . . . . . 22
4.3.4. Response . . . . . . . . . . . . . . . . . . . . . . 21 4.3.4. Response . . . . . . . . . . . . . . . . . . . . . . 22
4.4. getMessageListUpdates . . . . . . . . . . . . . . . . . . 22 4.4. getMessageListUpdates . . . . . . . . . . . . . . . . . . 22
4.5. setMessages . . . . . . . . . . . . . . . . . . . . . . . 22 4.5. setMessages . . . . . . . . . . . . . . . . . . . . . . . 22
4.6. importMessages . . . . . . . . . . . . . . . . . . . . . 23 4.6. importMessages . . . . . . . . . . . . . . . . . . . . . 23
4.7. copyMessages . . . . . . . . . . . . . . . . . . . . . . 25 4.7. copyMessages . . . . . . . . . . . . . . . . . . . . . . 25
5. MessageSubmission . . . . . . . . . . . . . . . . . . . . . . 27 5. MessageSubmission . . . . . . . . . . . . . . . . . . . . . . 27
5.1. getMessageSubmissions . . . . . . . . . . . . . . . . . . 31 5.1. getMessageSubmissions . . . . . . . . . . . . . . . . . . 32
5.2. getMessageSubmissionUpdates . . . . . . . . . . . . . . . 31 5.2. getMessageSubmissionUpdates . . . . . . . . . . . . . . . 32
5.3. getMessageSubmissionList . . . . . . . . . . . . . . . . 31 5.3. getMessageSubmissionList . . . . . . . . . . . . . . . . 32
5.4. getMessageSubmissionListUpdates . . . . . . . . . . . . . 32 5.4. getMessageSubmissionListUpdates . . . . . . . . . . . . . 33
5.5. setMessageSubmissions . . . . . . . . . . . . . . . . . . 32 5.5. setMessageSubmissions . . . . . . . . . . . . . . . . . . 33
6. Identities . . . . . . . . . . . . . . . . . . . . . . . . . 34 6. Identities . . . . . . . . . . . . . . . . . . . . . . . . . 35
6.1. getIdentities . . . . . . . . . . . . . . . . . . . . . . 35 6.1. getIdentities . . . . . . . . . . . . . . . . . . . . . . 36
6.2. getIdentityUpdates . . . . . . . . . . . . . . . . . . . 35 6.2. getIdentityUpdates . . . . . . . . . . . . . . . . . . . 36
6.3. setIdentities . . . . . . . . . . . . . . . . . . . . . . 35 6.3. setIdentities . . . . . . . . . . . . . . . . . . . . . . 36
7. SearchSnippets . . . . . . . . . . . . . . . . . . . . . . . 36 7. SearchSnippets . . . . . . . . . . . . . . . . . . . . . . . 36
7.1. getSearchSnippets . . . . . . . . . . . . . . . . . . . . 36 7.1. getSearchSnippets . . . . . . . . . . . . . . . . . . . . 37
8. Vacation Response . . . . . . . . . . . . . . . . . . . . . . 38 8. Vacation Response . . . . . . . . . . . . . . . . . . . . . . 38
8.1. getVacationResponse . . . . . . . . . . . . . . . . . . . 39 8.1. getVacationResponse . . . . . . . . . . . . . . . . . . . 39
8.2. setVacationResponse . . . . . . . . . . . . . . . . . . . 39 8.2. setVacationResponse . . . . . . . . . . . . . . . . . . . 39
9. Security considerations . . . . . . . . . . . . . . . . . . . 39 9. Security considerations . . . . . . . . . . . . . . . . . . . 39
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 39 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 39
10.1. Normative References . . . . . . . . . . . . . . . . . . 39 10.1. Normative References . . . . . . . . . . . . . . . . . . 39
10.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 41 10.2. URIs . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 42
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 41
1. Introduction 1. Introduction
JMAP is a generic protocol for synchronising data, such as mail, JMAP is a generic protocol for synchronising data, such as mail,
calendars or contacts, between a client and a server. It is calendars or contacts, between a client and a server. It is
optimised for mobile and web environments, and aims to provide a optimised for mobile and web environments, and aims to provide a
consistent interface to different data types. consistent interface to different data types.
This specification defines a data model for synchronising mail This specification defines a data model for synchronising mail
between a client and a server using JMAP. between a client and a server using JMAP.
skipping to change at page 4, line 16 skipping to change at page 4, line 16
The client MUST NOT send this property when creating a new object The client MUST NOT send this property when creating a new object
of this type. of this type.
o *immutable*: The value MUST NOT change after the object is o *immutable*: The value MUST NOT change after the object is
created. created.
o *default*: (This is followed by a JSON value). The value that o *default*: (This is followed by a JSON value). The value that
will be used for this property if it is omitted when creating a will be used for this property if it is omitted when creating a
new object of this type. new object of this type.
1.2. Terminology 1.2. The Date datatypes
Where "Date" is given as a type, it means a string in [RFC3339]
_date-time_ format. To ensure a normalised form, the _time-secfrac_
MUST always be omitted and any letters in the string (e.g. "T" and
"Z") MUST be upper-case. For example, ""2014-10-30T14:12:00+08:00"".
Where "UTCDate" is given as a type, it means a "Date" where the
_time-offset_ component MUST be "Z" (i.e. it must be in UTC time).
For example, ""2014-10-30T06:12:00Z"".
1.3. Terminology
The same terminology is used in this document as in the core JMAP The same terminology is used in this document as in the core JMAP
specification. specification.
1.3. Addition to the capabilities object 1.4. Addition to the capabilities object
The capabilities object is returned as part of the standard JMAP The capabilities object is returned as part of the standard JMAP
session object; see the JMAP spec. Servers supporting _this_ session object; see the JMAP spec. Servers supporting _this_
specification MUST add a property called "{TODO: URI for this spec}" specification MUST add a property called "ietf:jmapmail" to the
to the capabilities object. The value of this property is an object capabilities object. The value of this property is an object which
which SHOULD contain the following information on server MUST contain the following information on server capabilities:
capabilities:
o *maxMailboxesPerMessage*: "Number|null" The maximum number of o *maxMailboxesPerMessage*: "Number|null" The maximum number of
mailboxes that can be can assigned to a single message. This MUST mailboxes that can be can assigned to a single message. This MUST
be an integer >= 1, or "null" for no limit (or rather, the limit be an integer >= 1, or "null" for no limit (or rather, the limit
is always the number of mailboxes in the account). is always the number of mailboxes in the account).
o *maxSizeMessageAttachments*: "Number" The maximum total size of o *maxSizeAttachmentsPerMessage*: "Number" The maximum total size of
attachments, in bytes, allowed for messages. A server MAY still attachments, in bytes, allowed for a single message. A server MAY
reject messages with a lower attachment size total (for example, still reject messages with a lower attachment size total (for
if the body includes several megabytes of text, causing the size example, if the body includes several megabytes of text, causing
of the encoded MIME structure to be over some server-defined the size of the encoded MIME structure to be over some server-
limit). defined limit).
o *maxDelayedSend*: "Number" The number in seconds of the maximum o *maxDelayedSend*: "Number" The number in seconds of the maximum
delay the server supports in sending (see the MessageSubmission delay the server supports in sending (see the MessageSubmission
object). This is "0" if the server does not support delayed send. object). This is "0" if the server does not support delayed send.
o *messageListSortOptions*: "String[]" A list of all the message o *messageListSortOptions*: "String[]" A list of all the message
properties the server supports for sorting by. This MAY include properties the server supports for sorting by. This MAY include
properties the client does not recognise (for example custom properties the client does not recognise (for example custom
properties specified in a vendor extension). Clients MUST ignore properties specified in a vendor extension). Clients MUST ignore
any unknown properties in the list. any unknown properties in the list.
o *submissionExtensions*: "String[String[]]" A JMAP implementation o *submissionExtensions*: "String[String[]]" A JMAP implementation
that talks to a Submission [RFC6409] server SHOULD have a that talks to a Submission [RFC6409] server SHOULD have a
configuration setting that allows an administrator to expose a new configuration setting that allows an administrator to expose a new
submission EHLO capability in this field. This allows a JMAP submission EHLO capability in this field. This allows a JMAP
server to gain access to a new submission extension without code server to gain access to a new submission extension without code
changes. By default, the JMAP server should show only known safe- changes. By default, the JMAP server should show only known safe-
to-expose EHLO capabilities in this field, and hide EHLO to-expose EHLO capabilities in this field, and hide EHLO
capabilites that are only relevant to the JMAP server. Each key capabilities that are only relevant to the JMAP server. Each key
in the object is the _ehlo-name_, and the value is a list of in the object is the _ehlo-name_, and the value is a list of
_ehlo-args_. Examples of safe-to-expose Submission extensions _ehlo-args_. Examples of safe-to-expose Submission extensions
include: include:
* FUTURERELEASE ([RFC4865]) * FUTURERELEASE ([RFC4865])
* SIZE ([RFC1870]) * SIZE ([RFC1870])
* DSN ([RFC3461]) * DSN ([RFC3461])
skipping to change at page 7, line 6 skipping to change at page 7, line 19
mailboxes when presented in the client's UI, so it is consistent mailboxes when presented in the client's UI, so it is consistent
between devices. The number MUST be an integer in the range 0 <= between devices. The number MUST be an integer in the range 0 <=
sortOrder < 2^31. A mailbox with a lower order should be sortOrder < 2^31. A mailbox with a lower order should be
displayed before a mailbox with a higher order (that has the same displayed before a mailbox with a higher order (that has the same
parent) in any mailbox listing in the client's UI. Mailboxes with parent) in any mailbox listing in the client's UI. Mailboxes with
equal order SHOULD be sorted in alphabetical order by name. The equal order SHOULD be sorted in alphabetical order by name. The
sorting SHOULD take into account locale-specific character order sorting SHOULD take into account locale-specific character order
convention. convention.
o *mayReadItems*: "Boolean" (server-set) If true, may use this o *mayReadItems*: "Boolean" (server-set) If true, may use this
mailbox as part of a filter in a _getMessageList_ call. If a mailbox as part of a filter in a _getMessageList_ call. If a sub-
submailbox is shared but not the parent mailbox, this may be mailbox is shared but not the parent mailbox, this may be "false".
"false".
o *mayAddItems*: "Boolean" (server-set) The user may add messages to o *mayAddItems*: "Boolean" (server-set) The user may add messages to
this mailbox (by either creating a new message or moving an this mailbox (by either creating a new message or moving an
existing one). existing one).
o *mayRemoveItems*: "Boolean" (server-set) The user may remove o *mayRemoveItems*: "Boolean" (server-set) The user may remove
messages from this mailbox (by either changing the mailboxes of a messages from this mailbox (by either changing the mailboxes of a
message or deleting it). message or deleting it).
o *mayCreateChild*: "Boolean" (server-set) The user may create a o *mayCreateChild*: "Boolean" (server-set) The user may create a
skipping to change at page 10, line 38 skipping to change at page 10, line 50
o *id*: "String" (immutable) The id of the thread. o *id*: "String" (immutable) The id of the thread.
o *messageIds*: "String[]" The ids of the messages in the thread, o *messageIds*: "String[]" The ids of the messages in the thread,
sorted such that: sorted such that:
* Any message with the "$Draft" keyword that has an "In-Reply-To" * Any message with the "$Draft" keyword that has an "In-Reply-To"
header is sorted after the _first_ non-draft message in the header is sorted after the _first_ non-draft message in the
thread with the corresponding "Message-Id" header, but before thread with the corresponding "Message-Id" header, but before
any subsequent non-draft messages. any subsequent non-draft messages.
* Other than that, everything is sorted in _date_ order (as * Other than that, everything is sorted by the _receivedAt_ date
determined by the date property on the _Message_ object), of the message, oldest first.
oldest first.
* If two messages are identical under the above two conditions, * If two messages are identical under the above two conditions,
the sort is server-dependent but MUST be stable (sorting by id the sort is server-dependent but MUST be stable (sorting by id
is recommended). is recommended).
The following JMAP methods are supported: The following JMAP methods are supported:
3.1. getThreads 3.1. getThreads
Standard _getFoos_ method. Standard _getFoos_ method.
skipping to change at page 14, line 10 skipping to change at page 14, line 22
o *replyTo*: "Emailer[]|null" (immutable; default: "null") An array o *replyTo*: "Emailer[]|null" (immutable; default: "null") An array
of name/email objects (see below) representing the parsed "Reply- of name/email objects (see below) representing the parsed "Reply-
To" header of the email, in the same order as they appear in the To" header of the email, in the same order as they appear in the
header. If the email doesn't have a "Reply-To" header, this is header. If the email doesn't have a "Reply-To" header, this is
"null". If the header exists but does not have any content, the "null". If the header exists but does not have any content, the
response is an array of zero length. response is an array of zero length.
o *subject*: "String" (immutable; default: """") The subject of the o *subject*: "String" (immutable; default: """") The subject of the
message. If none, defaults to the empty string, not "null". message. If none, defaults to the empty string, not "null".
o *date*: "Date" (immutable; default: time of creation on server) o *sentAt*: "Date" (immutable; default: time of creation on server)
The date the message was sent (or saved, if the message is a The parsed date from the message's _Date_ header.
draft).
o *receivedAt*: "UTCDate" (immutable; default: time of creation on
server) The date the message was received by the message store.
This is the _internal date_ in IMAP.
o *size*: "Number" (immutable; server-set) The size in bytes of the o *size*: "Number" (immutable; server-set) The size in bytes of the
whole message as counted by the server towards the user's quota. whole message as counted by the server towards the user's quota.
o *preview*: "String" (immutable; server-set) Up to 256 characters o *preview*: "String" (immutable; server-set) Up to 256 characters
of the beginning of a plain text version of the message body. of the beginning of a plain text version of the message body.
This is intended to be shown as a preview line on a mailbox This is intended to be shown as a preview line on a mailbox
listing, and the server may choose to skip quoted sections or listing, and the server may choose to skip quoted sections or
salutations to return a more useful preview. salutations to return a more useful preview.
skipping to change at page 18, line 28 skipping to change at page 18, line 46
may be omitted: may be omitted:
o *inMailbox*: "String" A mailbox id. A message must be in this o *inMailbox*: "String" A mailbox id. A message must be in this
mailbox to match the condition. mailbox to match the condition.
o *inMailboxOtherThan*: "String" A mailbox id. A message be in any o *inMailboxOtherThan*: "String" A mailbox id. A message be in any
mailbox other than this one to match the condition. This is to mailbox other than this one to match the condition. This is to
allow messages solely in trash/spam to be easily excluded from a allow messages solely in trash/spam to be easily excluded from a
search. search.
o *before*: "Date" The date of the message (as returned on the o *before*: "UTCDate" The _receivedAt_ date of the message (as
Message object) must be before this date to match the condition. returned on the Message object) must be before this date to match
the condition.
o *after*: "Date" The date of the message (as returned on the o *after*: "UTCDate" The _receivedAt_ date of the message (as
Message object) must be on or after this date to match the returned on the Message object) must be on or after this date to
condition. match the condition.
o *minSize*: "Number" The size of the message in bytes (as returned o *minSize*: "Number" The size of the message in bytes (as returned
on the Message object) must be equal to or greater than this on the Message object) must be equal to or greater than this
number to match the condition. number to match the condition.
o *maxSize*: "Number" The size of the message in bytes (as returned o *maxSize*: "Number" The size of the message in bytes (as returned
on the Message object) must be less than this number to match the on the Message object) must be less than this number to match the
condition. condition.
o *allInThreadHaveKeyword*: "String" All messages (including this o *allInThreadHaveKeyword*: "String" All messages (including this
skipping to change at page 20, line 39 skipping to change at page 21, line 9
example a text search for "bus" would match "buses" but not example a text search for "bus" would match "buses" but not
"business"). "business").
o When searching inside the _htmlBody_ property, HTML tags and o When searching inside the _htmlBody_ property, HTML tags and
attributes SHOULD be ignored. attributes SHOULD be ignored.
4.3.2. Sorting 4.3.2. Sorting
The following properties MUST be supported for sorting: The following properties MUST be supported for sorting:
o *date* - The date as returned in the Message object. o *receivedAt* - The _receivedAt_ date as returned in the Message
object.
The following properties SHOULD be supported for sorting: The following properties SHOULD be supported for sorting:
o *size* - The size as returned in the Message object. o *size* - The size as returned in the Message object.
o *from* - This is taken to be either the "name" part of the Emailer o *from* - This is taken to be either the "name" part of the Emailer
object, or if none then the "email" part of the Emailer object object, or if none then the "email" part of the Emailer object
(see the definition of the from property in the Message object). (see the definition of the from property in the Message object).
If still none, consider the value to be the empty string. If still none, consider the value to be the empty string.
o *to* - This is taken to be either the "name" part of the *first* o *to* - This is taken to be either the "name" part of the *first*
Emailer object, or if none then the "email" part of the *first* Emailer object, or if none then the "email" part of the *first*
Emailer object (see the definition of the to property in the Emailer object (see the definition of the to property in the
Message object). If still none, consider the value to be the Message object). If still none, consider the value to be the
empty string. empty string.
o *subject* - This is taken to be the subject of the Message with o *subject* - This is taken to be the subject of the Message with
any ignoring any leading "Fwd:"s or "Re:"s (case-insensitive any ignoring any leading "Fwd:"s or "Re:"s (case-insensitive
match). match).
o *keyword:*"$keyword" - This value MUST be considered "true" if the o *sentAt* - The _sentAt_ property on the Message object.
message has the keyword, or "false" otherwise.
o *allThreadKeyword:*"$keyword" - This value MUST be considered o *hasKeyword:*"keyword" - This value MUST be considered "true" if
the message has the keyword, or "false" otherwise.
o *allInThreadHaveKeyword:*"keyword" - This value MUST be considered
"true" for the message if *all* of the messages in the same thread "true" for the message if *all* of the messages in the same thread
(regardless of mailbox) have the keyword. (regardless of mailbox) have the keyword.
o *someThreadKeyword:*"$keyword" - This value MUST be considered o *someInThreadHaveKeyword:*"keyword" - This value MUST be
"true" for the message if *any* of the messages in the same thread considered "true" for the message if *any* of the messages in the
(regardless of mailbox) have the keyword. same thread (regardless of mailbox) have the keyword.
The server MAY support sorting based on other properties as well. A The server MAY support sorting based on other properties as well. A
client can discover which properties are supported by inspecting the client can discover which properties are supported by inspecting the
server's _capabilities_ object (see section 1). server's _capabilities_ object (see section 1).
Example sort: Example sort:
`[ "someThreadKeyword:$Flagged desc", "date desc" ] `[ "someInThreadHaveKeyword:$Flagged desc", "receivedAt desc" ]
This would sort messages in flagged threads first (the thread is This would sort messages in flagged threads first (the thread is
considered flagged if any message within it is flagged), and then in considered flagged if any message within it is flagged), and then in
date order, newest first. If two messages have both identical date order, newest first. If two messages have both identical
flagged status and date, the order is server-dependent but must be flagged status and date, the order is server-dependent but must be
stable. stable.
4.3.3. Thread collapsing 4.3.3. Thread collapsing
When "collapseThreads == true", then after filtering and sorting the When "collapseThreads == true", then after filtering and sorting the
skipping to change at page 23, line 49 skipping to change at page 24, line 22
o *blobId*: "String" The id representing the raw [RFC5322] message o *blobId*: "String" The id representing the raw [RFC5322] message
(see the file upload section). (see the file upload section).
o *mailboxIds* "String[Boolean]" The ids of the mailbox(es) to o *mailboxIds* "String[Boolean]" The ids of the mailbox(es) to
assign this message to. At least one mailbox MUST be given. assign this message to. At least one mailbox MUST be given.
o *keywords*: "String[Boolean]" (default: "{}") The keywords to o *keywords*: "String[Boolean]" (default: "{}") The keywords to
apply to the message. apply to the message.
o *receivedAt*: "UTCDate" (default: time of import on server) The
_receivedAt_ date to set on the message.
Each message to import is considered an atomic unit which may succeed Each message to import is considered an atomic unit which may succeed
or fail individually. Importing successfully creates a new message or fail individually. Importing successfully creates a new message
object from the data reference by the blobId and applies the given object from the data reference by the blobId and applies the given
mailboxes and keywords. mailboxes, keywords and receivedAt date.
The server MAY forbid two messages with the same exact [RFC5322] The server MAY forbid two messages with the same exact [RFC5322]
content, or even just with the same [RFC5322] Message-Id, to coexist content, or even just with the same [RFC5322] Message-Id, to coexist
within an account. In this case, it should reject attempts to import within an account. In this case, it should reject attempts to import
a message considered a duplicate with an "alreadyExists" SetError. A a message considered a duplicate with an "alreadyExists" SetError. A
_messageId_ property of type "String" MUST be included on the error _messageId_ property of type "String" MUST be included on the error
object with the id of the existing message. object with the id of the existing message.
If the _blobId_, _mailboxIds_, or _keywords_ properties are invalid If the _blobId_, _mailboxIds_, or _keywords_ properties are invalid
(e.g. missing, wrong type, id not found), the server MUST reject the (e.g. missing, wrong type, id not found), the server MUST reject the
skipping to change at page 25, line 32 skipping to change at page 26, line 8
o *messageId*: "String" The id of the message to be copied in the o *messageId*: "String" The id of the message to be copied in the
"from" account. "from" account.
o *mailboxIds*: "String[Boolean]" The ids of the mailboxes (in the o *mailboxIds*: "String[Boolean]" The ids of the mailboxes (in the
"to" account) to add the copied message to. At least one mailbox "to" account) to add the copied message to. At least one mailbox
MUST be given. MUST be given.
o *keywords*: "String[Boolean]" (default: "{}") The _keywords_ o *keywords*: "String[Boolean]" (default: "{}") The _keywords_
property for the copy. property for the copy.
o *receivedAt*: "UTCDate" (default: _receivedAt_ date of original)
The _receivedAt_ date to set on the copy.
The server MAY forbid two messages with the same exact [RFC5322] The server MAY forbid two messages with the same exact [RFC5322]
content, or even just with the same [RFC5322] Message-Id, to coexist content, or even just with the same [RFC5322] Message-Id, to coexist
within an account. If duplicates are allowed though, the "from" within an account. If duplicates are allowed though, the "from"
account may be the same as the "to" account to copy messages within account may be the same as the "to" account to copy messages within
an account. an account.
Each message copy is considered an atomic unit which may succeed or Each message copy is considered an atomic unit which may succeed or
fail individually. Copying successfully MUST create a new message fail individually. Copying successfully MUST create a new message
object, with separate ids and mutable properties (e.g. mailboxes and object, with separate ids and mutable properties (e.g. mailboxes and
keywords) to the original message. keywords) to the original message.
skipping to change at page 28, line 26 skipping to change at page 29, line 5
the first email address in the last _Sender_/_From_ header in the first email address in the last _Sender_/_From_ header in
the [RFC5322] version of the message. If the address found the [RFC5322] version of the message. If the address found
from this is not allowed by the identity associated with this from this is not allowed by the identity associated with this
submission, the _email_ property from the identity MUST be used submission, the _email_ property from the identity MUST be used
instead. instead.
* *rcptTo*: The deduplicated set of email addresses from the * *rcptTo*: The deduplicated set of email addresses from the
_To_, _Cc_ and _Bcc_ headers, if present, with no parameters _To_, _Cc_ and _Bcc_ headers, if present, with no parameters
for any of them. for any of them.
o *sendAt*: "Date" (immutable; server-set) The date the message was/ o *sendAt*: "UTCDate" (immutable; server-set) The date the message
will be released for delivery. If the client successfully used was/will be released for delivery. If the client successfully
[RFC4865] FUTURERELEASE with the message, this MUST be the time used [RFC4865] FUTURERELEASE with the message, this MUST be the
when the server will release the message; otherwise it MUST be the time when the server will release the message; otherwise it MUST
time the MessageSubmission was created. be the time the MessageSubmission was created.
o *undoStatus*: "String" (server-set) This represents whether the o *undoStatus*: "String" (server-set) This represents whether the
submission may be canceled. This is server set and MUST be one of submission may be canceled. This is server set and MUST be one of
the following values: the following values:
* "pending": It MAY be possible to cancel this submission. * "pending": It MAY be possible to cancel this submission.
* "final": The message has been relayed to at least one recipient * "final": The message has been relayed to at least one recipient
in a manner that cannot be recalled. It is no longer possible in a manner that cannot be recalled. It is no longer possible
to cancel this submission. to cancel this submission.
skipping to change at page 30, line 50 skipping to change at page 31, line 28
affect this property. The server MAY also set this property affect this property. The server MAY also set this property
based on other feedback channels. based on other feedback channels.
* *displayed*: "String" Represents whether the message has been * *displayed*: "String" Represents whether the message has been
displayed to the recipient. This MUST be one of the following displayed to the recipient. This MUST be one of the following
values: values:
+ "unknown": The display status is unknown. This is the + "unknown": The display status is unknown. This is the
initial value. initial value.
+ "yes": The receipient's system claims the message content + "yes": The recipient's system claims the message content has
has been displayed to the recipient. Note, there is no been displayed to the recipient. Note, there is no
guarantee that the recipient has noticed, read, or guarantee that the recipient has noticed, read, or
understood the content. understood the content.
If an MDN is received for this recipient with Disposition-Type If an MDN is received for this recipient with Disposition-Type
(as per [RFC3798] section 3.2.6.2) equal to "displayed", this (as per [RFC3798] section 3.2.6.2) equal to "displayed", this
property SHOULD be set to "yes". The server MAY also set this property SHOULD be set to "yes". The server MAY also set this
property based on other feedback channels. property based on other feedback channels.
o *dsnBlobIds*: "String[]" (server-set) A list of blob ids for DSNs o *dsnBlobIds*: "String[]" (server-set) A list of blob ids for DSNs
received for this submission, in order of receipt, oldest first. received for this submission, in order of receipt, oldest first.
skipping to change at page 32, line 11 skipping to change at page 32, line 34
o *messageIds*: "String[]" The MessageSubmission _messageId_ o *messageIds*: "String[]" The MessageSubmission _messageId_
property must be in this list to match the condition. property must be in this list to match the condition.
o *threadIds*: "String[]" The MessageSubmission _threadId_ property o *threadIds*: "String[]" The MessageSubmission _threadId_ property
must be in this list to match the condition. must be in this list to match the condition.
o *undoStatus*: "String" The MessageSubmission _undoStatus_ property o *undoStatus*: "String" The MessageSubmission _undoStatus_ property
must be identical to the value given to match the condition. must be identical to the value given to match the condition.
o *before*: "Date" The _sendAt_ property of the MessageSubmission o *before*: "UTCDate" The _sendAt_ property of the MessageSubmission
object must be before this date to match the condition. object must be before this date to match the condition.
o *after*: "Date" The _sendAt_ property of the MessageSubmission o *after*: "UTCDate" The _sendAt_ property of the MessageSubmission
object must be after this date to match the condition. object must be after this date to match the condition.
A MessageSubmission object matches the filter if and only if all of A MessageSubmission object matches the filter if and only if all of
the given conditions given match. If zero properties are specified, the given conditions given match. If zero properties are specified,
it is automatically "true" for all objects. it is automatically "true" for all objects.
The following properties MUST be supported for sorting: The following properties MUST be supported for sorting:
o "messageId" o "messageId"
skipping to change at page 35, line 9 skipping to change at page 35, line 32
address ending in "@example.com". address ending in "@example.com".
o *replyTo*: "Emailer[]|null" (default: "null") The Reply-To value o *replyTo*: "Emailer[]|null" (default: "null") The Reply-To value
the client SHOULD set when creating a new message from this the client SHOULD set when creating a new message from this
identity. identity.
o *bcc*: "Emailer[]|null" (default: "null") The Bcc value the client o *bcc*: "Emailer[]|null" (default: "null") The Bcc value the client
SHOULD set when creating a new message from this identity. SHOULD set when creating a new message from this identity.
o *textSignature*: "String" (default: """") Signature the client o *textSignature*: "String" (default: """") Signature the client
SHOULD insert into new rich-text messages that will be sending SHOULD insert into new plain-text messages that will be sent from
from this identity. Clients MAY ignore this and/or combine this this identity. Clients MAY ignore this and/or combine this with a
with a client-specific signature preference. client-specific signature preference.
o *htmlSignature*: "String" (default: """") Signature the client o *htmlSignature*: "String" (default: """") Signature the client
SHOULD insert into new HTML messages that will be sending from SHOULD insert into new HTML messages that will be sent from this
this identity. This text MUST be an HTML snippet to be inserted identity. This text MUST be an HTML snippet to be inserted into
into the "<body></body>" section of the new email. Clients MAY the "<body></body>" section of the new email. Clients MAY ignore
ignore this and/or combine this with a client-specific signature this and/or combine this with a client-specific signature
preference. preference.
o *mayDelete*: "Boolean" (server-set) Is the user allowed to delete o *mayDelete*: "Boolean" (server-set) Is the user allowed to delete
this identity? Servers may wish to set this to "false" for the this identity? Servers may wish to set this to "false" for the
user's username or other default address. user's username or other default address.
Multiple identities with the same email address MAY exist, to allow Multiple identities with the same email address MAY exist, to allow
for different settings the user wants to pick between (for example for different settings the user wants to pick between (for example
with different names/signatures). with different names/signatures).
skipping to change at page 35, line 49 skipping to change at page 36, line 24
6.3. setIdentities 6.3. setIdentities
Standard _setFoos_ method. The following extra _SetError_ types are Standard _setFoos_ method. The following extra _SetError_ types are
defined: defined:
For *create*: For *create*:
o "maxQuotaReached": The user has reached a server-defined limit on o "maxQuotaReached": The user has reached a server-defined limit on
the number of identities. the number of identities.
o "emailNotPermitted": The user is not alloed to send from the o "emailNotPermitted": The user is not allowed to send from the
address given as the _email_ property of the identity. address given as the _email_ property of the identity.
For *destroy*: For *destroy*:
o "forbidden": Returned if the identity's _mayDelete_ value is o "forbidden": Returned if the identity's _mayDelete_ value is
"false". "false".
7. SearchSnippets 7. SearchSnippets
When doing a search on a "String" property, the client may wish to When doing a search on a "String" property, the client may wish to
skipping to change at page 38, line 19 skipping to change at page 38, line 43
The *VacationResponse* object represents the state of vacation- The *VacationResponse* object represents the state of vacation-
response related settings for an account. It has the following response related settings for an account. It has the following
properties: properties:
o *id*: "String" (immutable) The id of the object. There is only o *id*: "String" (immutable) The id of the object. There is only
ever one vacation response object, and its id is ""singleton"". ever one vacation response object, and its id is ""singleton"".
o *isEnabled* "Boolean" Should a vacation response be sent if a o *isEnabled* "Boolean" Should a vacation response be sent if a
message arrives between the _fromDate_ and _toDate_? message arrives between the _fromDate_ and _toDate_?
o *fromDate*: "Date|null" If _isEnabled_ is "true", the date/time o *fromDate*: "UTCDate|null" If _isEnabled_ is "true", the date/time
after which messages that arrive should receive the user's after which messages that arrive should receive the user's
vacation response, in UTC. If "null", the vacation response is vacation response, in UTC. If "null", the vacation response is
effective immediately. effective immediately.
o *toDate*: "Date|null" If _isEnabled_ is "true", the date/time o *toDate*: "UTCDate|null" If _isEnabled_ is "true", the date/time
after which messages that arrive should no longer receive the after which messages that arrive should no longer receive the
user's vacation response, in UTC. If "null", the vacation user's vacation response, in UTC. If "null", the vacation
response is effective indefinitely. response is effective indefinitely.
o *subject*: "String|null" The subject that will be used by the mail o *subject*: "String|null" The subject that will be used by the mail
sent in response to messages when the vacation response is sent in response to messages when the vacation response is
enabled. If null, an appropriate subject SHOULD be set by the enabled. If null, an appropriate subject SHOULD be set by the
server. server.
o *textBody*: "String|null" The plain text part of the message to o *textBody*: "String|null" The plain text part of the message to
skipping to change at page 40, line 5 skipping to change at page 40, line 24
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997,
<https://www.rfc-editor.org/info/rfc2119>. <https://www.rfc-editor.org/info/rfc2119>.
[RFC2852] Newman, D., "Deliver By SMTP Service Extension", RFC 2852, [RFC2852] Newman, D., "Deliver By SMTP Service Extension", RFC 2852,
DOI 10.17487/RFC2852, June 2000, DOI 10.17487/RFC2852, June 2000,
<https://www.rfc-editor.org/info/rfc2852>. <https://www.rfc-editor.org/info/rfc2852>.
[RFC3339] Klyne, G. and C. Newman, "Date and Time on the Internet:
Timestamps", RFC 3339, DOI 10.17487/RFC3339, July 2002,
<https://www.rfc-editor.org/info/rfc3339>.
[RFC3461] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service [RFC3461] Moore, K., "Simple Mail Transfer Protocol (SMTP) Service
Extension for Delivery Status Notifications (DSNs)", Extension for Delivery Status Notifications (DSNs)",
RFC 3461, DOI 10.17487/RFC3461, January 2003, RFC 3461, DOI 10.17487/RFC3461, January 2003,
<https://www.rfc-editor.org/info/rfc3461>. <https://www.rfc-editor.org/info/rfc3461>.
[RFC3463] Vaudreuil, G., "Enhanced Mail System Status Codes", [RFC3463] Vaudreuil, G., "Enhanced Mail System Status Codes",
RFC 3463, DOI 10.17487/RFC3463, January 2003, RFC 3463, DOI 10.17487/RFC3463, January 2003,
<https://www.rfc-editor.org/info/rfc3463>. <https://www.rfc-editor.org/info/rfc3463>.
[RFC3464] Moore, K. and G. Vaudreuil, "An Extensible Message Format [RFC3464] Moore, K. and G. Vaudreuil, "An Extensible Message Format
 End of changes. 39 change blocks. 
81 lines changed or deleted 106 lines changed or added

This html diff was produced by rfcdiff 1.46. The latest version is available from http://tools.ietf.org/tools/rfcdiff/