draft-ietf-jmap-mdn-09.txt   draft-ietf-jmap-mdn-10.txt 
JMAP R. Ouazana, Ed. JMAP R. Ouazana, Ed.
Internet-Draft Linagora Internet-Draft Linagora
Intended status: Standards Track April 30, 2020 Intended status: Standards Track June 16, 2020
Expires: November 1, 2020 Expires: December 18, 2020
Handling Message Disposition Notification with JMAP Handling Message Disposition Notification with JMAP
draft-ietf-jmap-mdn-09 draft-ietf-jmap-mdn-10
Abstract Abstract
This document specifies a data model for handling [RFC8098] MDN JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic
protocol for synchronising data, such as mail, calendars or contacts,
between a client and a server. It is optimised for mobile and web
environments, and aims to provide a consistent interface to different
data types.
JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP)
for Mail) specifies a data model for synchronising email data with a
server using JMAP. Clients can use this to efficiently search,
access, organise, and send messages.
MDN are defined in [RFC8098] and are used as "read receipts",
"acknowledgements", or "receipt notifications".
MDN have a specific format that must be parsed or generated. The
goal of this document is to specify a data model for handling MDN
messages with a server using JMAP. messages 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.
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 November 1, 2020. This Internet-Draft will expire on December 18, 2020.
Copyright Notice Copyright Notice
Copyright (c) 2020 IETF Trust and the persons identified as the Copyright (c) 2020 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
skipping to change at page 2, line 10 skipping to change at page 2, line 25
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 . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1. Notational conventions . . . . . . . . . . . . . . . . . 3 1.1. Notational conventions . . . . . . . . . . . . . . . . . 3
1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3
1.3. Addition to the capabilities object . . . . . . . . . . . 3 1.3. Addition to the capabilities object . . . . . . . . . . . 4
2. MDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. MDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.1. MDN/send . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1. MDN/send . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2. MDN/parse . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2. MDN/parse . . . . . . . . . . . . . . . . . . . . . . . . 7
3. Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3. Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.1. Sending an MDN for a received email . . . . . . . . . . . 7 3.1. Sending an MDN for a received email . . . . . . . . . . . 8
3.2. Asking for MDN when sending an email . . . . . . . . . . 9 3.2. Asking for MDN when sending an email . . . . . . . . . . 9
3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 9 3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 10
4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 11
4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 11 4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 11
4.2. JMAP Error Codes Registry . . . . . . . . . . . . . . . . 11 4.2. JMAP Error Codes Registry . . . . . . . . . . . . . . . . 12
4.2.1. mdnAlreadySent . . . . . . . . . . . . . . . . . . . 11 4.2.1. mdnAlreadySent . . . . . . . . . . . . . . . . . . . 12
5. Security considerations . . . . . . . . . . . . . . . . . . . 11 5. Security considerations . . . . . . . . . . . . . . . . . . . 12
6. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 12
6.1. Normative References . . . . . . . . . . . . . . . . . . 11 6.1. Normative References . . . . . . . . . . . . . . . . . . 12
6.2. Informative References . . . . . . . . . . . . . . . . . 12 6.2. Informative References . . . . . . . . . . . . . . . . . 13
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 12 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 13
1. Introduction 1. Introduction
JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic
protocol for synchronising data, such as mail, calendars or contacts, protocol for synchronising data, such as mail, calendars or contacts,
between a client and a server. It is optimised for mobile and web between a client and a server. It is optimised for mobile and web
environments, and aims to provide a consistent interface to different environments, and aims to provide a consistent interface to different
data types. data types.
JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP)
for Mail) specifies a data model for synchronising email data with a
server using JMAP. Clients can use this to efficiently search,
access, organise, and send messages.
MDN are defined in [RFC8098] and are used as "read receipts", MDN are defined in [RFC8098] and are used as "read receipts",
"acknowledgements", or "receipt notifications". "acknowledgements", or "receipt notifications".
A client can have to deal with MDN in different ways: A client can have to deal with MDN in different ways:
1. When receiving an email, an MDN can be sent to the sender. This 1. When receiving an email, an MDN can be sent to the sender. This
specification defines an MDN/send method to cover this case. specification defines an MDN/send method to cover this case.
2. When sending an email, an MDN can be requested. This must be 2. When sending an email, an MDN can be requested. This must be
done with the help of a header, and is already specified by done with the help of a header, and is already specified by
skipping to change at page 3, line 34 skipping to change at page 4, line 10
specification. specification.
Keywords being case insensitive in IMAP but JSON being case Keywords being case insensitive in IMAP but JSON being case
sensitive, the "$mdnsent" keyword MUST always be used in lowercase. sensitive, the "$mdnsent" keyword MUST always be used in lowercase.
1.3. Addition to the capabilities object 1.3. Addition to the capabilities object
Capabilities are announced as part of the standard JMAP Session Capabilities are announced as part of the standard JMAP Session
resource; see [RFC8620], section 2. resource; see [RFC8620], section 2.
Support for the "MDN" data type and the "MDN/parse" method are The capability "urn:ietf:params:jmap:mdn" being present in the
represented by the capability "urn:ietf:params:jmap:mdn" being "accountCapabilities" property of an account represents support for
present in the "capabilities" property. The capability the "MDN" data type, parsing MDN via the "MDN/parse" method, and
"urn:ietf:params:jmap:mdn" being present in the "accountCapabilities" creating and sending MDN messages via the "MDN/send" method. Servers
property of an account represents support for creating and sending that include the capability in one or more "accountCapabilities"
MDN messages via the "MDN/send" method. Servers that include the properties MUST also include the property in the "capabilities"
capability in one or more "accountCapabilities" properties MUST also property.
include the property in the "capabilities" property.
The value of this "urn:ietf:params:jmap:mdn" property is an empty The value of this "urn:ietf:params:jmap:mdn" property is an empty
object in both the JMAP session "capabilities" property and an object in the account's "accountCapabilities" property.
account's "accountCapabilities" property.
2. MDN 2. MDN
An *MDN* object has the following properties: An *MDN* object has the following properties:
o forEmailId: "Id|null" Email Id of the received email this MDN is o forEmailId: "Id|null" Email Id of the received email this MDN is
relative to. This argument can only be null when the MDN object relative to. This property MUST NOT be null for "MDN/send", but
is a server response for the "MDN/parse" method. may be null in the response from the "MDN/parse" method.
o subject: "String|null" Subject used as "Subject" header for this o subject: "String|null" Subject used as "Subject" header for this
MDN. MDN.
o textBody: "String|null" Human readable part of the MDN, as plain o textBody: "String|null" Human readable part of the MDN, as plain
text. text.
o includeOriginalMessage: "Boolean" (default: false). If "true", o includeOriginalMessage: "Boolean" (default: false). If "true",
the content of the original message will appear in the third the content of the original message will appear in the third
component of the multipart/report generated for the MDN. See component of the multipart/report generated for the MDN. See
skipping to change at page 4, line 34 skipping to change at page 5, line 5
disposition options. disposition options.
o mdnGateway: "String|null" (server-set) Name of the gateway or MTA o mdnGateway: "String|null" (server-set) Name of the gateway or MTA
that translated a foreign (non-Internet) message disposition that translated a foreign (non-Internet) message disposition
notification into this MDN. notification into this MDN.
o originalRecipient: "String|null" (server-set) Original recipient o originalRecipient: "String|null" (server-set) Original recipient
address as specified by the sender of the message for which the address as specified by the sender of the message for which the
MDN is being issued. MDN is being issued.
o finalRecipient: "String" (server-set) Recipient for which the MDN o finalRecipient: "String|null" Recipient for which the MDN is being
is being issued. issued. if set, it overrides the value that would be calculated
by the server from the Identity.
o originalMessageId: "String|null" (server-set) Message-ID (the o originalMessageId: "String|null" (server-set) Message-ID (the
[RFC5322] header field, not the JMAP Id) of the message for which [RFC5322] header field, not the JMAP Id) of the message for which
the MDN is being issued. the MDN is being issued.
o error: "String[]|null" (server-set) Additional information in the o error: "String[]|null" (server-set) Additional information in the
form of text messages when the "error" disposition modifier form of text messages when the "error" disposition modifier
appears. appears.
o extensionFields: "String[String]|null" (server-set) Object where o extensionFields: "String[String]|null" (server-set) Object where
keys are extension-field names and values are extension-field keys are extension-field names and values are extension-field
values. values.
A *Disposition* object has the following properties: A *Disposition* object has the following properties:
o actionMode: "String" This MUST be one of the following strings: o actionMode: "String" This MUST be one of the following strings:
"manual-action" / "automatic-action" "manual-action" / "automatic-action"
o sendingMode: "String" This MUST be one of the following strings: o sendingMode: "String" This MUST be one of the following strings:
"MDN-sent-manually" / "MDN-sent-automatically" "mdn-sent-manually" / "mdn-sent-automatically"
o type: "String" This MUST be one of the following strings: o type: "String" This MUST be one of the following strings:
"deleted" / "dispatched" / "displayed" / "processed" "deleted" / "dispatched" / "displayed" / "processed"
See [RFC8098] for the exact meaning of these different fields. See [RFC8098] for the exact meaning of these different fields. These
fields are defined case insensitive in [RFC8098] but are case
sensitive in this RFC and MUST be converted to lowercase by "MDN/
parse".
2.1. MDN/send 2.1. MDN/send
The MDN/send method sends an [RFC5322] message from an MDN object. The MDN/send method sends an [RFC5322] message from an MDN object.
When calling this method the "using" property of the Request object When calling this method the "using" property of the Request object
MUST contain the capabilities "urn:ietf:params:jmap:mdn" and MUST contain the capabilities "urn:ietf:params:jmap:mdn" and
"urn:ietf:params:jmap:mail". The latter because of the implicit call "urn:ietf:params:jmap:mail". The latter because of the implicit call
to Email/set and the use of Identities, described below. The method to Email/set and the use of Identities, described below. The method
takes the following arguments: takes the following arguments:
o accountId: "Id" The id of the account to use. o accountId: "Id" The id of the account to use.
o identityId: "Id" The id of the Identity to associate with these o identityId: "Id" The id of the Identity to associate with these
MDN. The server will use this identity to define the sender of MDN. The server will use this identity to define the sender of
the MDN and to set the finalRecipient field. the MDN and to set the finalRecipient field.
o send: "Id[MDN]" A map of creation id (client specified) to MDN o send: "Id[MDN]" A map of creation id (client specified) to MDN
objects. objects.
o onSuccessUpdateEmail: "Id[PatchObject]|null" A map of creation id
to an object containing properties to update on the Email object
referenced by the "MDN/send" if the sending succeeds.
The response has the following arguments: The response has the following arguments:
o accountId: "Id" The id of the account used for the call. o accountId: "Id" The id of the account used for the call.
o sent: "Id[MDN]|null" A map of creation id to MDN containing any o sent: "Id[MDN]|null" A map of creation id to MDN containing any
properties that were not set by the client. This includes any properties that were not set by the client. This includes any
properties that were omitted by the client and thus set to a properties that were omitted by the client and thus set to a
default by the server. This argument is null if no MDN objects default by the server. This argument is null if no MDN objects
were successfully sent. were successfully sent.
o notSent: "Id[MDNError]|null" A map of the creation id to an o notSent: "Id[SetError]|null" A map of the creation id to a
MDNError object for each record that failed to be sent, or null if SetError object for each record that failed to be sent, or null if
all successful. all successful.
The following MDNError types are defined: The following already registered SetError would mean:
o mdnAlreadySent: The message has the "$mdnsent" keyword already
set.
o notFound: The reference Email Id cannot be found, or has no valid o notFound: The reference Email Id cannot be found, or has no valid
"Disposition-Notification-To" header. "Disposition-Notification-To" header.
o forbidden: MDN/send would violate an ACL or other permissions o forbidden: MDN/send would violate an ACL or other permissions
policy. policy.
o forbiddenFrom: The user is not allowed to use the given
finalRecipient property.
o overQuota: MDN/send would exceed a server-defined limit on the o overQuota: MDN/send would exceed a server-defined limit on the
number or total size of sent MDN. It could include limitations on number or total size of sent MDN. It could include limitations on
sent emails. sent emails.
o tooLarge: MDN/send would result in an MDN that exceeds a server- o tooLarge: MDN/send would result in an MDN that exceeds a server-
defined limit for the maximum size of an MDN, or more generally on defined limit for the maximum size of an MDN, or more generally on
emails. emails.
o rateLimit: Too many MDN or emails have been created recently, and o rateLimit: Too many MDN or emails have been created recently, and
a server-defined rate limit has been reached. It may work if a server-defined rate limit has been reached. It may work if
tried again later. tried again later.
o invalidProperties: The record given is invalid in some way. o invalidProperties: The record given is invalid in some way.
If the Account Id or Identity id given cannot be found, the MDN The following is a new SetError:
sending is rejected with an "invalidProperties" error.
o mdnAlreadySent: The message has the "$mdnsent" keyword already
set.
If the accountId or identityId given cannot be found, the method call
is rejected with an "invalidArguments" error.
The client SHOULD NOT issue an MDN/send request if the message has The client SHOULD NOT issue an MDN/send request if the message has
the "$mdnsent" keyword set. the "$mdnsent" keyword set.
When sending the MDN, the server is in charge of generating the When sending the MDN, the server is in charge of generating the
"originalRecipient", "finalRecipient" and "originalMessageId" fields "originalRecipient", "finalRecipient" and "originalMessageId" fields
according to the [RFC8098] specification. according to the [RFC8098] specification.
After all items in the "MDN/send" invocation have been processed, a The client is expected to explicitly update each "Email" for which an
single implicit "Email/set" call MUST be made to set the "$mdnsent" "MDN/send" has been invoked in order to set the "$mdnsent" keyword on
keyword on "Email" objects referenced by "MDN" objects that have been these emails. To ensure that, the server MUST reject an "MDN/send"
successfully created (see [RFC3503] for more details). The response which does not result in setting the keyword "$mdnsent". Thus the
to this MUST be returned after the "MDN/send" response. server MUST check that the "onSuccessUpdateEmail" property of the
method is correctly set to update this keyword.
2.2. MDN/parse 2.2. MDN/parse
This method allows a client to parse blobs as [RFC5322] messages to This method allows a client to parse blobs as [RFC5322] messages to
get MDN objects. This can be used to parse and get detailed get MDN objects. This can be used to parse and get detailed
information about blobs referenced in the "mdnBlobIds" of the information about blobs referenced in the "mdnBlobIds" of the
EmailSubmission object, or any email the client could expect to be an EmailSubmission object, or any email the client could expect to be an
MDN. MDN.
The "forEmailId" property can be null or missing if the The "forEmailId" property can be null or missing if the
"originalMessageId" property is missing or not referencing an "originalMessageId" property is missing, not referencing an existing
existing email. email or if the server cannot efficiently calculate the related email
(for example if several emails get the same "Message-Id" header).
The MDN/parse method takes the following arguments: The MDN/parse method takes the following arguments:
o accountId: "Id" The id of the account to use. o accountId: "Id" The id of the account to use.
o blobIds: "Id[]" The ids of the blobs to parse. o blobIds: "Id[]" The ids of the blobs to parse.
The response has the following arguments: The response has the following arguments:
o accountId: "Id" The id of the account used for the call. o accountId: "Id" The id of the account used for the call.
skipping to change at page 7, line 27 skipping to change at page 8, line 15
o notFound: "Id[]|null" A list of blob ids given that could not be o notFound: "Id[]|null" A list of blob ids given that could not be
found, or null if none. found, or null if none.
The following additional errors may be returned instead of the MDN/ The following additional errors may be returned instead of the MDN/
parse response: parse response:
o requestTooLarge: The number of ids requested by the client exceeds o requestTooLarge: The number of ids requested by the client exceeds
the maximum number the server is willing to process in a single the maximum number the server is willing to process in a single
method call. method call.
o invalidProperties: If the Account Id given cannot be found, the o invalidArguments: If the accountId given cannot be found, the MDN
MDN parsing is rejected with an "invalidProperties" error. parsing is rejected with an "invalidArguments" error.
3. Samples 3. Samples
3.1. Sending an MDN for a received email 3.1. Sending an MDN for a received email
A client can use the following request to send an MDN back to the A client can use the following request to send an MDN back to the
sender: sender:
[[ "MDN/send", { [[ "MDN/send", {
"accountId": "ue150411c", "accountId": "ue150411c",
skipping to change at page 8, line 18 skipping to change at page 8, line 38
"send": { "send": {
"k1546": { "k1546": {
"forEmailId": "Md45b47b4877521042cec0938", "forEmailId": "Md45b47b4877521042cec0938",
"subject": "Read receipt for: World domination", "subject": "Read receipt for: World domination",
"textBody": "This receipt shows that the email has been "textBody": "This receipt shows that the email has been
displayed on your recipient's computer. There is no displayed on your recipient's computer. There is no
guaranty it has been read or understood.", guaranty it has been read or understood.",
"reportingUA": "linagora.com; OpenPaaS", "reportingUA": "linagora.com; OpenPaaS",
"disposition": { "disposition": {
"actionMode": "manual-action", "actionMode": "manual-action",
"sendingMode": "MDN-sent-manually", "sendingMode": "mdn-sent-manually",
"type": "displayed" "type": "displayed"
} }
} }
},
"onSuccessUpdateEmail": {
"#k1546": {
"keywords/$mdnsent": true
}
} }
}, "0" ]] }, "0" ]]
If the email id matches an existing email without the "$mdnsent" If the email id matches an existing email without the "$mdnsent"
keyword, the server can answer: keyword, the server can answer:
[[ "MDN/send", { [[ "MDN/send", {
"accountId": "ue150411c", "accountId": "ue150411c",
"sent": { "sent": {
"k1546": { "k1546": {
skipping to change at page 10, line 24 skipping to change at page 11, line 17
"parsed": { "parsed": {
"0f9f65ab-dc7b-4146-850f-6e4881093965": { "0f9f65ab-dc7b-4146-850f-6e4881093965": {
"forEmailId": "Md45b47b4877521042cec0938", "forEmailId": "Md45b47b4877521042cec0938",
"subject": "Read receipt for: World domination", "subject": "Read receipt for: World domination",
"textBody": "This receipt shows that the email has been "textBody": "This receipt shows that the email has been
displayed on your recipient's computer. There is no displayed on your recipient's computer. There is no
guaranty it has been read or understood.", guaranty it has been read or understood.",
"reportingUA": "linagora.com; OpenPaaS", "reportingUA": "linagora.com; OpenPaaS",
"disposition": { "disposition": {
"actionMode": "manual-action", "actionMode": "manual-action",
"sendingMode": "MDN-sent-manually", "sendingMode": "mdn-sent-manually",
"type": "displayed" "type": "displayed"
} }
"finalRecipient": "rfc822; john@example.com", "finalRecipient": "rfc822; john@example.com",
"originalMessageId": "<1521557867.2614.0.camel@apache.org>" "originalMessageId": "<1521557867.2614.0.camel@apache.org>"
} }
} }
}, "0" ]] }, "0" ]]
In case of a not found blobId, the server would respond: In case of a not found blobId, the server would respond:
skipping to change at page 11, line 41 skipping to change at page 12, line 31
Reference: This document, Section 2.1 Reference: This document, Section 2.1
Description: The message has the "$mdnsent" keyword already set. The Description: The message has the "$mdnsent" keyword already set. The
client MUST NOT try again to send an MDN for this message. client MUST NOT try again to send an MDN for this message.
5. Security considerations 5. Security considerations
The same considerations regarding MDN (see [RFC8098] and [RFC3503]) The same considerations regarding MDN (see [RFC8098] and [RFC3503])
apply to this document. apply to this document.
In order to enforce trust regarding the relation between the user
sending an email and the identity of this user, the server SHOULD
validate in conformance to the provided Identity that the user is
permitted to use the finalRecipient value and return a forbiddenFrom
error if not.
6. References 6. References
6.1. Normative References 6.1. Normative References
[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>.
[RFC3503] Melnikov, A., "Message Disposition Notification (MDN) [RFC3503] Melnikov, A., "Message Disposition Notification (MDN)
 End of changes. 27 change blocks. 
54 lines changed or deleted 98 lines changed or added

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