draft-ietf-jmap-mdn-15.txt   draft-ietf-jmap-mdn-16.txt 
JMAP R. Ouazana, Ed. JMAP R. Ouazana, Ed.
Internet-Draft Linagora Internet-Draft Linagora
Intended status: Standards Track July 27, 2020 Intended status: Standards Track December 10, 2020
Expires: January 28, 2021 Expires: June 13, 2021
Handling Message Disposition Notification with JMAP Handling Message Disposition Notification with JMAP
draft-ietf-jmap-mdn-15 draft-ietf-jmap-mdn-16
Abstract Abstract
This document specifies a data model for handling Message Disposition This document specifies a data model for handling Message Disposition
Notifications (MDNs, RFC 8098) in the JSON Meta Application Protocol Notifications (MDNs, RFC 8098) in the JSON Meta Application Protocol
(JMAP, RFCs 8620 and 8621). (JMAP, RFCs 8620 and 8621).
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
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 January 28, 2021. This Internet-Draft will expire on June 13, 2021.
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 42 skipping to change at page 2, line 42
JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP) JMAP for Mail ([RFC8621] - The JSON Meta Application Protocol (JMAP)
for Mail) specifies a data model for synchronising email data with a for Mail) specifies a data model for synchronising email data with a
server using JMAP. Clients can use this to efficiently search, server using JMAP. Clients can use this to efficiently search,
access, organise, and send messages. access, organise, and send messages.
Message Disposition Notifications (MDNs) are defined in [RFC8098] and Message Disposition Notifications (MDNs) are defined in [RFC8098] and
are used as "read receipts", "acknowledgements", or "receipt are used as "read receipts", "acknowledgements", or "receipt
notifications". notifications".
A client can have to deal with MDNs in different ways: A client can come across MDNs in different ways:
1. When receiving an email message, an MDN can be sent to the 1. When receiving an email message, an MDN can be sent to the
sender. This specification defines an MDN/send method to cover sender. This specification defines an MDN/send method to cover
this case. this case.
2. When sending an email message, an MDN can be requested. This 2. When sending an email message, an MDN can be requested. This
must be done with the help of a header, and is already specified must be done with the help of a header field, and is already
by [RFC8098] and can already be handled by [RFC8621] this way. specified by [RFC8098] and can already be handled by [RFC8621]
this way.
3. When receiving an MDN, the MDN could be related to an existing 3. When receiving an MDN, the MDN could be related to an existing
sent message. This is already covered by [RFC8621] in the sent message. This is already covered by [RFC8621] in the
EmailSubmission object. A client might want to display detailed EmailSubmission object. A client might want to display detailed
information about a received MDN. This specification defines an information about a received MDN. This specification defines an
MDN/parse method to cover this case. MDN/parse method to cover this case.
1.1. Notational conventions 1.1. Notational conventions
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
skipping to change at page 3, line 50 skipping to change at page 3, line 50
The capability "urn:ietf:params:jmap:mdn" being present in the The capability "urn:ietf:params:jmap:mdn" being present in the
"accountCapabilities" property of an account represents support for "accountCapabilities" property of an account represents support for
the "MDN" data type, parsing MDNs via the "MDN/parse" method, and the "MDN" data type, parsing MDNs via the "MDN/parse" method, and
creating and sending MDN messages via the "MDN/send" method. Servers creating and sending MDN messages via the "MDN/send" method. Servers
that include the capability in one or more "accountCapabilities" that include the capability in one or more "accountCapabilities"
properties MUST also include the property in the "capabilities" properties MUST also include the property in the "capabilities"
property. 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 the account's "accountCapabilities" property. object both in the account's "accountCapabilities" property and in
the "capabilities" 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 message this MDN is o forEmailId: "Id|null" Email id of the received message this MDN is
relative to. This property MUST NOT be null for "MDN/send", but relative to. This property MUST NOT be null for "MDN/send", but
may be null in the response from 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 field for
MDN. this 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
[RFC8098] for details and security considerations. [RFC8098] for details and security considerations.
o reportingUA: "String|null" Name of the MUA creating this MDN. It o reportingUA: "String|null" Name of the MUA creating this MDN. It
is used to build the MDN Report part of the MDN. is used to build the MDN Report part of the MDN. Note that a
"null" value may have better privacy properties.
o disposition: "Disposition" Object containing the diverse MDN o disposition: "Disposition" Object containing the diverse MDN
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|null" Recipient for which the MDN is being o finalRecipient: "String|null" Recipient for which the MDN is being
issued. if set, it overrides the value that would be calculated issued. If set, it overrides the value that would be calculated
by the server from the Identity. by the server from the Identity defined in the "MDN/Send" method,
unless explicitly set by the client.
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" Object where keys are o extensionFields: "String[String]|null" Object where keys are
extension-field names and values are extension-field values. extension-field names and values are extension-field values (see
[RFC8098] Section 3.3).
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:
skipping to change at page 5, line 26 skipping to change at page 5, line 30
See [RFC8098] for the exact meaning of these different fields. These See [RFC8098] for the exact meaning of these different fields. These
fields are defined case insensitive in [RFC8098] but are case fields are defined case insensitive in [RFC8098] but are case
sensitive in this RFC and MUST be converted to lowercase by "MDN/ sensitive in this RFC and MUST be converted to lowercase by "MDN/
parse". 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
MDNs. The server will use this identity to define the sender of MDNs. The server will use this identity to define the sender of
the MDNs and to set the finalRecipient field. the MDNs 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 id to an o onSuccessUpdateEmail: "Id[PatchObject]|null" A map of id to an
object containing properties to update on the Email object object containing properties to update on the Email object
referenced by the "MDN/send" if the sending succeeds. This will referenced by the "MDN/send" if the sending succeeds. This will
always be a backward reference to the creation id (see example always be a backward reference to the email id (see example below
below in Section 3.1). in Section 3.1).
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[SetError]|null" A map of the creation id to a o notSent: "Id[SetError]|null" A map of the creation id to a
SetError 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 already registered SetError would mean: In this context, the existing SetError types defined in [RFC8620] and
[RFC8621] are interpreted as follows:
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 field.
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 o forbiddenFrom: The user is not allowed to use the given
finalRecipient property. 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 MDNs. It could include limitations number or total size of sent MDNs. It could include limitations
on sent messages. on sent messages.
skipping to change at page 6, line 48 skipping to change at page 7, line 6
o mdnAlreadySent: The message has the "$mdnsent" keyword already o mdnAlreadySent: The message has the "$mdnsent" keyword already
set. set.
If the accountId or identityId given cannot be found, the method call If the accountId or identityId given cannot be found, the method call
is rejected with an "invalidArguments" error. is rejected with an "invalidArguments" error.
The client MUST NOT issue an MDN/send request if the message has the The client MUST NOT issue an MDN/send request if the message has the
"$mdnsent" keyword set. "$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" and "originalMessageId" fields according to the
according to the [RFC8098] specification. [RFC8098] specification. "finalRecipient" will also generally be
generated by the server based on the provided identity, but if
specified by the client and allowed (see Section 5) the server will
use the client provided value.
The client is expected to explicitly update each "Email" for which an The client is expected to explicitly update each "Email" for which an
"MDN/send" has been invoked in order to set the "$mdnsent" keyword on "MDN/send" has been invoked in order to set the "$mdnsent" keyword on
these messages. To ensure that, the server MUST reject an "MDN/send" these messages. To ensure that, the server MUST reject an "MDN/send"
which does not result in setting the keyword "$mdnsent". Thus the which does not result in setting the keyword "$mdnsent". Thus the
server MUST check that the "onSuccessUpdateEmail" property of the server MUST check that the "onSuccessUpdateEmail" property of the
method is correctly set to update this keyword. 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 message the client could expect EmailSubmission object, or any email message the client could expect
to be an MDN. to be an 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 does not refer to an "originalMessageId" property is missing or does not refer to an
existing message, or if the server cannot efficiently calculate the existing message, or if the server cannot efficiently calculate the
related message (for example, if several messages get the same related message (for example, if several messages get the same
"Message-Id" header). "Message-Id" header field).
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 8, line 32 skipping to change at page 8, line 39
"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": "joes-pc.cs.example.com; Foomail 97.1", "reportingUA": "joes-pc.cs.example.com; Foomail 97.1",
"disposition": { "disposition": {
"actionMode": "manual-action", "actionMode": "manual-action",
"sendingMode": "mdn-sent-manually", "sendingMode": "mdn-sent-manually",
"type": "displayed" "type": "displayed"
}, },
"extension": { "extension": {
"X-EXTENSION-EXAMPLE": "example.com" "EXTENSION-EXAMPLE": "example.com"
} }
} }
}, },
"onSuccessUpdateEmail": { "onSuccessUpdateEmail": {
"#k1546": { "Md45b47b4877521042cec0938": {
"keywords/$mdnsent": true "keywords/$mdnsent": true
} }
} }
}, "0" ]] }, "0" ]]
If the email id matches an existing email message without the If the email id matches an existing email message without the
"$mdnsent" keyword, the server can answer: "$mdnsent" keyword, the server can answer:
[[ "MDN/send", { [[ "MDN/send", {
"accountId": "ue150411c", "accountId": "ue150411c",
skipping to change at page 10, line 8 skipping to change at page 10, line 8
} }
}, "0" ]] }, "0" ]]
3.2. Asking for MDN when sending an email message 3.2. Asking for MDN when sending an email message
This is done with the [RFC8621] "Email/set" "create" method. This is done with the [RFC8621] "Email/set" "create" method.
[[ "Email/set", { [[ "Email/set", {
"accountId": "ue150411c", "accountId": "ue150411c",
"create": { "create": {
"k1546": { "k2657": {
"mailboxIds": { "mailboxIds": {
"2ea1ca41b38e": true "2ea1ca41b38e": true
}, },
"keywords": { "keywords": {
"$seen": true, "$seen": true,
"$draft": true "$draft": true
}, },
"from": [{ "from": [{
"name": "Joe Bloggs", "name": "Joe Bloggs",
"email": "joe@example.com" "email": "joe@example.com"
skipping to change at page 10, line 31 skipping to change at page 10, line 31
"name": "John", "name": "John",
"email": "john@example.com" "email": "john@example.com"
}], }],
"header:Disposition-Notification-To:asText": "joe@example.com", "header:Disposition-Notification-To:asText": "joe@example.com",
"subject": "World domination", "subject": "World domination",
... ...
} }
} }
}, "0" ]] }, "0" ]]
Note the specified "Disposition-Notification-To" header indicating Note the specified "Disposition-Notification-To" header field
where to send MDN back (usually the sender of the message). indicating where to send MDN back (usually the sender of the
message).
3.3. Parsing a received MDN 3.3. Parsing a received MDN
The client issues a parse request: The client issues a parse request:
[[ "MDN/parse", { [[ "MDN/parse", {
"accountId": "ue150411c", "accountId": "ue150411c",
"blobIds": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] "blobIds": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ]
}, "0" ]] }, "0" ]]
skipping to change at page 12, line 29 skipping to change at page 12, line 29
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 In order to reinforce trust regarding the relation between the user
sending an email message and the identity of this user, the server sending an email message and the identity of this user, the server
SHOULD validate in conformance to the provided Identity that the user SHOULD validate in conformance to the provided Identity that the user
is permitted to use the finalRecipient value and return a is permitted to use the finalRecipient value and return a
forbiddenFrom error if not. forbiddenFrom error if not.
6. Normative References 6. 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,
 End of changes. 24 change blocks. 
32 lines changed or deleted 42 lines changed or added

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