idnits 2.17.1 draft-ietf-jmap-mdn-07.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([RFC8098]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 18, 2020) is 1499 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) No issues found here. Summary: 1 error (**), 0 flaws (~~), 1 warning (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 JMAP R. Ouazana, Ed. 3 Internet-Draft Linagora 4 Intended status: Standards Track March 18, 2020 5 Expires: September 19, 2020 7 Handling Message Disposition Notification with JMAP 8 draft-ietf-jmap-mdn-07 10 Abstract 12 This document specifies a data model for handling [RFC8098] MDN 13 messages with a server using JMAP. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at https://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on September 19, 2020. 32 Copyright Notice 34 Copyright (c) 2020 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (https://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 1.1. Notational conventions . . . . . . . . . . . . . . . . . 3 51 1.2. Terminology . . . . . . . . . . . . . . . . . . . . . . . 3 52 1.3. Addition to the capabilities object . . . . . . . . . . . 3 53 2. MDN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 54 2.1. MDN/send . . . . . . . . . . . . . . . . . . . . . . . . 5 55 2.2. MDN/parse . . . . . . . . . . . . . . . . . . . . . . . . 6 56 3. Samples . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 57 3.1. Sending an MDN for a received email . . . . . . . . . . . 7 58 3.2. Asking for MDN when sending an email . . . . . . . . . . 8 59 3.3. Parsing a received MDN . . . . . . . . . . . . . . . . . 9 60 4. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 10 61 4.1. JMAP Capability Registration for "mdn" . . . . . . . . . 10 62 4.2. JMAP Error Codes Registry . . . . . . . . . . . . . . . . 11 63 4.2.1. mdnAlreadySent . . . . . . . . . . . . . . . . . . . 11 64 5. Security considerations . . . . . . . . . . . . . . . . . . . 11 65 6. References . . . . . . . . . . . . . . . . . . . . . . . . . 11 66 6.1. Normative References . . . . . . . . . . . . . . . . . . 11 67 6.2. Informative References . . . . . . . . . . . . . . . . . 12 68 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 12 70 1. Introduction 72 JMAP ([RFC8620] - JSON Meta Application Protocol) is a generic 73 protocol for synchronising data, such as mail, calendars or contacts, 74 between a client and a server. It is optimised for mobile and web 75 environments, and aims to provide a consistent interface to different 76 data types. 78 MDN are defined in [RFC8098] and are used as "read receipts", 79 "acknowledgements", or "receipt notifications". 81 A client can have to deal with MDN in different ways: 83 1. When receiving an email, an MDN can be sent to the sender. This 84 specification defines an MDN/send method to cover this case. 86 2. When sending an email, an MDN can be requested. This must be 87 done with the help of a header, and is already specified by 88 [RFC8098] and can already be handled by [RFC8621] this way. 90 3. When receiving an MDN, the MDN could be related to an existing 91 sent mail. This is already covered by [RFC8621] in the 92 EmailSubmission object. Client could want to display detailed 93 information about a received MDN. This specification defines an 94 MDN/parse method to cover this case. 96 1.1. Notational conventions 98 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 99 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 100 "OPTIONAL" in this document are to be interpreted as described in BCP 101 14 [RFC2119] [RFC8174] when, and only when, they appear in all 102 capitals, as shown here. 104 Type signatures, examples and property descriptions in this document 105 follow the conventions established in section 1.1 of [RFC8620]. Data 106 types defined in the core specification are also used in this 107 document. 109 Servers MUST support all properties specified for the new data types 110 defined in this document. 112 1.2. Terminology 114 The same terminology is used in this document as in the core JMAP 115 specification. 117 Keywords being case insensitive in IMAP but JSON being case 118 sensitive, the "$mdnsent" keyword MUST always be used in lowercase. 120 1.3. Addition to the capabilities object 122 Capabilities are announced as part of the standard JMAP Session 123 resource; see [RFC8620], section 2. 125 Support for the "MDN" data type and the "MDN/parse" method are 126 represented by the capability "urn:ietf:params:jmap:mdn" being 127 present in the "capabilities" property. The capability 128 "urn:ietf:params:jmap:mdn" being present in the "accountCapabilities" 129 property of an account represents support for creating and sending 130 MDN messages via the "MDN/send" method. Servers that include the 131 capability in one or more "accountCapabilities" properties MUST also 132 include the property in the "capabilities" property. 134 The value of this "urn:ietf:params:jmap:mdn" property is an empty 135 object in both the JMAP session "capabilities" property and an 136 account's "accountCapabilities" property. 138 2. MDN 140 An *MDN* object has the following properties: 142 o forEmailId: "Id|null" Email Id of the received email this MDN is 143 relative to. This argument can only be null when the MDN object 144 is a server response for the "MDN/parse" method. 146 o subject: "String|null" Subject used as "Subject" header for this 147 MDN. 149 o textBody: "String|null" Human readable part of the MDN, as plain 150 text. 152 o includeOriginalMessage: "Boolean" (default: false). If "true", 153 the content of the original message will appear in the third 154 component of the multipart/report generated for the MDN. See 155 [RFC8098] for details and security considerations. 157 o reportingUA: "String|null" Name of the MUA creating this MDN. It 158 is used to build the MDN Report part of the MDN. 160 o disposition: "Disposition" Object containing the diverse MDN 161 disposition options. 163 o mdnGateway: "String|null" (server-set) Name of the gateway or MTA 164 that translated a foreign (non-Internet) message disposition 165 notification into this MDN. 167 o originalRecipient: "String|null" (server-set) Original recipient 168 address as specified by the sender of the message for which the 169 MDN is being issued. 171 o finalRecipient: "String" (server-set) Recipient for which the MDN 172 is being issued. 174 o originalMessageId: "String|null" (server-set) Message-ID (the 175 [RFC5322] header field, not the JMAP Id) of the message for which 176 the MDN is being issued. 178 o error: "String[]|null" (server-set) Additional information in the 179 form of text messages when the "error" disposition modifier 180 appears. 182 o extensionFields: "String[String]|null" (server-set) Object where 183 keys are extension-field names and values are extension-field 184 values. 186 A *Disposition* object has the following properties: 188 o actionMode: "String" This MUST be one of the following strings: 189 "manual-action" / "automatic-action" 191 o sendingMode: "String" This MUST be one of the following strings: 192 "MDN-sent-manually" / "MDN-sent-automatically" 194 o type: "String" This MUST be one of the following strings: 195 "deleted" / "dispatched" / "displayed" / "processed" 197 See [RFC8098] for the exact meaning of these different fields. 199 2.1. MDN/send 201 The MDN/send method sends an [RFC5322] message from an MDN object. 202 When calling this method the "using" property of the Request object 203 MUST contain the capabilities "urn:ietf:params:jmap:mdn" and 204 "urn:ietf:params:jmap:mail". The latter because of the implicit call 205 to Email/set, described below. The method takes the following 206 arguments: 208 o accountId: "Id" The id of the account to use. 210 o send: "Id[MDN]" A map of creation id (client specified) to MDN 211 objects. 213 The response has the following arguments: 215 o accountId: "Id" The id of the account used for the call. 217 o sent: "Id[MDN]|null" A map of creation id to MDN containing any 218 properties that were not set by the client. This includes any 219 properties that were omitted by the client and thus set to a 220 default by the server. This argument is null if no MDN objects 221 were successfully sent. 223 o notSent: "Id[MDNError]|null" A map of the creation id to an 224 MDNError object for each record that failed to be sent, or null if 225 all successful. 227 The following MDNError types are defined: 229 o mdnAlreadySent: The message has the "$mdnsent" keyword already 230 set. 232 o notFound: The reference Email Id cannot be found, or has no valid 233 "Disposition-Notification-To" header. 235 o forbidden: MDN/send would violate an ACL or other permissions 236 policy. 238 o overQuota: MDN/send would exceed a server-defined limit on the 239 number or total size of sent MDN. It could include limitations on 240 sent emails. 242 o tooLarge: MDN/send would result in an MDN that exceeds a server- 243 defined limit for the maximum size of an MDN, or more generally on 244 emails. 246 o rateLimit: Too many MDN or emails have been created recently, and 247 a server-defined rate limit has been reached. It may work if 248 tried again later. 250 o invalidProperties: The record given is invalid in some way. 252 The client SHOULD NOT issue an MDN/send request if the message has 253 the "$mdnsent" keyword set. 255 When sending the MDN, the server is in charge of generating the 256 "originalRecipient", "finalRecipient" and "originalMessageId" fields 257 accordingly to the [RFC8098] specification. 259 After all items in the "MDN/send" invocation have been processed, a 260 single implicit "Email/set" call MUST be made to set the "$mdnsent" 261 keyword on "Email" objects referenced by "MDN" objects that have been 262 successfully created (see [RFC3503] for more details). The response 263 to this MUST be returned after the "MDN/send" response. 265 2.2. MDN/parse 267 This method allows a client to parse blobs as [RFC5322] messages to 268 get MDN objects. This can be used to parse and get detailed 269 information about blobs referenced in the "mdnBlobIds" of the 270 EmailSubmission object, or any email the client could expect to be an 271 MDN. 273 The "forEmailId" property can be null or missing if the 274 "originalMessageId" property is missing or not referencing an 275 existing email. 277 The MDN/parse method takes the following arguments: 279 o accountId: "Id" The id of the account to use. 281 o blobIds: "Id[]" The ids of the blobs to parse. 283 The response has the following arguments: 285 o accountId: "Id" The id of the account used for the call. 287 o parsed: "Id[MDN]|null" A map of blob id to parsed MDN 288 representation for each successfully parsed blob, or null if none. 290 o notParsable: "Id[]|null" A list of ids given that corresponded to 291 blobs that could not be parsed as MDNs, or null if none. 293 o notFound: "Id[]|null" A list of blob ids given that could not be 294 found, or null if none. 296 The following additional error may be returned instead of the MDN/ 297 parse response: 299 o requestTooLarge: The number of ids requested by the client exceeds 300 the maximum number the server is willing to process in a single 301 method call. 303 3. Samples 305 3.1. Sending an MDN for a received email 307 A client can use the following request to send an MDN back to the 308 sender: 310 [[ "MDN/send", { 311 "accountId": "ue150411c", 312 "send": { 313 "k1546": { 314 "forEmailId": "Md45b47b4877521042cec0938", 315 "subject": "Read receipt for: World domination", 316 "textBody": "This receipt shows that the email has been 317 displayed on your recipient's computer. There is no 318 guaranty it has been read or understood.", 319 "reportingUA": "linagora.com; OpenPaaS", 320 "disposition": { 321 "actionMode": "manual-action", 322 "sendingMode": "MDN-sent-manually", 323 "type": "displayed" 324 } 325 } 326 } 327 }, "0" ]] 329 If the email id matches an existing email without the "$mdnsent" 330 keyword, the server can answer: 332 [[ "MDN/send", { 333 "accountId": "ue150411c", 334 "sent": { 335 "k1546": { 336 "finalRecipient": "rfc822; john@example.com", 337 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 338 } 339 } 340 }, "0" ], 341 [ "Email/set", { 342 "accountId": "ue150411c", 343 "oldState": "23", 344 "newState": "42", 345 "updated": { 346 "Md45b47b4877521042cec0938": { 347 "keywords": { 348 "$mdnsent": true 349 } 350 } 351 } 352 }, "0" ]] 354 If the "$mdnsent" keyword has already been set, the server can answer 355 an error: 357 [[ "MDN/send", { 358 "accountId": "ue150411c", 359 "notSent": { 360 "k1546": { 361 "type": "mdnAlreadySent", 362 "description" : "$mdnsent keyword is already present" 363 } 364 } 365 }, "0" ]] 367 3.2. Asking for MDN when sending an email 369 This is done with the [RFC8621] "Email/set" "create" method. 371 [[ "Email/set", { 372 "accountId": "ue150411c", 373 "create": { 374 "k1546": { 375 "mailboxIds": { 376 "2ea1ca41b38e": true 377 }, 378 "keywords": { 379 "$seen": true, 380 "$draft": true 381 }, 382 "from": [{ 383 "name": "Joe Bloggs", 384 "email": "joe@example.com" 385 }], 386 "to": [{ 387 "name": "John", 388 "email": "john@example.com" 389 }], 390 "header:Disposition-Notification-To:asText": "joe@example.com", 391 "subject": "World domination", 392 ... 393 } 394 } 395 }, "0" ]] 397 Note the specified "Disposition-Notification-To" header indicating 398 where to send MDN back (usually the sender of the email). 400 3.3. Parsing a received MDN 402 The client issues a parse request: 404 [[ "MDN/parse", { 405 "accountId": "ue150411c", 406 "blobIds: [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 407 }, "0" ]] 409 The server responds: 411 [[ "MDN/parse", { 412 "accountId": "ue150411c", 413 "parsed": { 414 "0f9f65ab-dc7b-4146-850f-6e4881093965": { 415 "forEmailId": "Md45b47b4877521042cec0938", 416 "subject": "Read receipt for: World domination", 417 "textBody": "This receipt shows that the email has been 418 displayed on your recipient's computer. There is no 419 guaranty it has been read or understood.", 420 "reportingUA": "linagora.com; OpenPaaS", 421 "disposition": { 422 "actionMode": "manual-action", 423 "sendingMode": "MDN-sent-manually", 424 "type": "displayed" 425 } 426 "finalRecipient": "rfc822; john@example.com", 427 "originalMessageId": "<1521557867.2614.0.camel@apache.org>" 428 } 429 } 430 }, "0" ]] 432 In case of a not found blobId, the server would respond: 434 [[ "MDN/parse", { 435 "accountId": "ue150411c", 436 "notFound": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 437 }, "0" ]] 439 If the blobId has been found but is not parsable, the server would 440 respond: 442 [[ "MDN/parse", { 443 "accountId": "ue150411c", 444 "notParsable": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ] 445 }, "0" ]] 447 4. IANA Considerations 449 4.1. JMAP Capability Registration for "mdn" 451 IANA will register the "mdn" JMAP Capability as follows: 453 Capability Name: "urn:ietf:params:jmap:mdn" 455 Specification document: this document 457 Intended use: common 458 Change Controller: IETF 460 Security and privacy considerations: this document, section 5. 462 4.2. JMAP Error Codes Registry 464 The following subsection register one new error code in the "JMAP 465 Error Codes" registry, as defined in [RFC8620]. 467 4.2.1. mdnAlreadySent 469 JMAP Error Code: mdnAlreadySent 471 Intended use: common 473 Change controller: IETF 475 Reference: This document, Section 2.1 477 Description: The message has the "$mdnsent" keyword already set. The 478 client MUST NOT try again to send an MDN for this message. 480 5. Security considerations 482 The same considerations regarding MDN (see [RFC8098] and [RFC3503]) 483 apply to this document. 485 6. References 487 6.1. Normative References 489 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 490 Requirement Levels", BCP 14, RFC 2119, 491 DOI 10.17487/RFC2119, March 1997, 492 . 494 [RFC3503] Melnikov, A., "Message Disposition Notification (MDN) 495 profile for Internet Message Access Protocol (IMAP)", 496 RFC 3503, DOI 10.17487/RFC3503, March 2003, 497 . 499 [RFC5322] Resnick, P., Ed., "Internet Message Format", RFC 5322, 500 DOI 10.17487/RFC5322, October 2008, 501 . 503 [RFC8098] Hansen, T., Ed. and A. Melnikov, Ed., "Message Disposition 504 Notification", STD 85, RFC 8098, DOI 10.17487/RFC8098, 505 February 2017, . 507 [RFC8620] Jenkins, N. and C. Newman, "The JSON Meta Application 508 Protocol (JMAP)", RFC 8620, DOI 10.17487/RFC8620, July 509 2019, . 511 [RFC8621] Jenkins, N. and C. Newman, "The JSON Meta Application 512 Protocol (JMAP) for Mail", RFC 8621, DOI 10.17487/RFC8621, 513 August 2019, . 515 6.2. Informative References 517 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 518 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 519 May 2017, . 521 Author's Address 523 Raphael Ouazana (editor) 524 Linagora 525 100 Terrasse Boieldieu - Tour Franklin 526 Paris - La Defense CEDEX 92042 527 France 529 Email: rouazana@linagora.com 530 URI: https://www.linagora.com