Skip to content

Commit

Permalink
Take comments into account
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Ouazana authored and neilj committed Dec 18, 2019
1 parent 23a26b2 commit f65d5c2
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions spec/mdn/mdn.mdown
Expand Up @@ -24,13 +24,19 @@ The same terminology is used in this document as in the core JMAP specification.

## Addition to the capabilities object

The capabilities object is returned as part of the standard JMAP Session object; see the JMAP spec. Servers supporting *this* specification MUST add a property called `urn:ietf:params:jmap:mdn` to the capabilities object.
Capabilities are announced as part of the standard JMAP Session resource; see [@!RFC8620], section 2.

Support for the "MDN" data type and the "MDN/parse" method are represented by the capability "urn:ietf:params:jmap:mdn" being present in the "capabilities" property.
The capability "urn:ietf:params:jmap:mdn" being present in the "accountCapabilities" property of an account represents support for creating and sending MDN messages via the "MDN/set" method.
Servers that include the capability in one or more "accountCapabilities" properties MUST also include the property in the "capabilities" property.

The value of this "urn:ietf:params:jmap:mdn" property is an empty object in both the JMAP session "capabilities" property and an account's "accountCapabilities" property.

# MDN

An **MDN** object has the following properties:

- **forEmailId**: `String`
- **forEmailId**: `Id|null`
Email Id of the received email this MDN is relative to.
- **subject**: `String|null`
Subject used as `Subject` header for this MDN.
Expand All @@ -46,7 +52,7 @@ An **MDN** object has the following properties:
Original recipient address as specified by the sender of the message for which the MDN is being issued.
- **finalRecipient**: `String` (server-set)
Recipient for which the MDN is being issued.
- **originalMessageID**: `String|null` (server-set)
- **originalMessageId**: `String|null` (server-set)
Message-ID (the [@!RFC5322] header field, not the JMAP Id) of the message for which the MDN is being issued.
- **error**: `String[]|null` (server-set)
Additional information in the form of text messages when the "error" disposition modifier appears.
Expand All @@ -66,25 +72,25 @@ An **MDN** object has the following properties:

## MDN/set

Standard “/set” method as described in [@!RFC8620] where only the *create* parameter is supported.
This is a standard “/set” method as described in [@!RFC8620] where only create is supported; any attempt to update/destroy MUST be rejected with a `forbidden` SetError.

The MDN/set method generates and sends an [@!RFC5322] message from an MDN object.

The client SHOULD NOT issue a MDN/set request if the message has the `$MDNSent` keyword set. In this case, the server MUST reject the submission with a standard `alreadyExists` SetError.

When sending the MDN, the server is in charge of generating the *originalRecipient*, *finalRecipient* and *originalMessageID* fields accordingly to the [@!RFC8098] specification.
When sending the MDN, the server is in charge of generating the *originalRecipient*, *finalRecipient* and *originalMessageId* fields accordingly to the [@!RFC8098] specification.

For each `forEmailId` whose MDN where sent, the server MUST add a `$MDNSent` keyword to the email. See [@!RFC3503] for more details.
After all items in the "MDN/set" invocation have been processed, a single implicit "Email/set" call MUST be made to set the "$MDNSent" keyword on "Email" objects referenced by "MDN" objects that have been successfully created (see [@!RFC3503] for more details). The response to this MUST be returned after the "MDN/set" response.

## MDN/parse

This method allows a client to parse blobs as [@!RFC5322] messages to get MDN objects. This can be used to parse and get detailed information about blobs referenced in the *mdnBlobIds* of the EmailSubmission object, or any email the client could expect to be an MDN.

The *forEmailId* property can be null or missing if the *originalMessageID* property is missing or not referencing an existing email.
The *forEmailId* property can be null or missing if the *originalMessageId* property is missing or not referencing an existing email.

The Email/parse method takes the following arguments:
The MDN/parse method takes the following arguments:

- **accountId**: `String`
- **accountId**: `Id`
The id of the account to use.
- **blobIds**: `Id[]`
The ids of the blobs to parse.
Expand Down Expand Up @@ -134,7 +140,7 @@ If the email id matches an existing email without the `$MDNSent` keyword, the se
"created": {
"k1546": {
"finalRecipient": "rfc822; john@example.com",
"originalMessageID": "<1521557867.2614.0.camel@apache.org>"
"originalMessageId": "<1521557867.2614.0.camel@apache.org>"
}
}
}, "0" ],
Expand Down Expand Up @@ -199,7 +205,7 @@ The server responds:
"type": "displayed"
}
"finalRecipient": "rfc822; john@example.com",
"originalMessageID": "<1521557867.2614.0.camel@apache.org>"
"originalMessageId": "<1521557867.2614.0.camel@apache.org>"
}
}
}, "0" ]]
Expand Down

0 comments on commit f65d5c2

Please sign in to comment.