You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by "Benoit Tellier (Jira)" <se...@james.apache.org> on 2021/03/22 07:39:00 UTC
[jira] [Created] (JAMES-3520) Implement JMAP MDN draft
Benoit Tellier created JAMES-3520:
-------------------------------------
Summary: Implement JMAP MDN draft
Key: JAMES-3520
URL: https://issues.apache.org/jira/browse/JAMES-3520
Project: James Server
Issue Type: New Feature
Components: JMAP
Affects Versions: 3.6.0
Reporter: Benoit Tellier
Assignee: Antoine Duprat
Fix For: 3.7.0
h2. Why
MDN/parse allow to interpret a Mail as a **Message Delivery Notification**.
Message Disposition Notifications (MDNs) are used as "read receipts", "acknowledgements", or "receipt notifications". When receiving an email message, an MDN can be sent to the sender via the MDN/send method.
h2. How
In apache/james-project:
Write a new JMAP `Method` allowing parsing MDNs.
- Use the `MessageIdManager` class to retrieve the mail content,
- Parse it as a MDN using the `/MDN` utils
- Write the JMAP scala POJOs to represent a MDN
- JSON serialization with Play JSON for those POJOs
- Write integration tests for `MDN/parse`
Then contribute `MDN/send`:
The MDN/send method uses an MDN object defined in https://tools.ietf.org/html/draft-ietf-jmap-mdn-15.
When calling this method the "using" property of the Request object MUST contain the capabilities urn:ietf:params:jmap:mdn and
urn:ietf:params:jmap:mail
Write integration test to show that a request to MDN/Send method will update the corresponding email object.
Write integration test to show that request without the urn:ietf:params:jmap:mdn capability is rejected.
Write integration test to show that a MDN request to update an email which has the mdnsent keyword already set will return an mdnAlreadySent error.
h2. Example
{code:java}
[[ "MDN/parse", {
"accountId": "ue150411c",
"blobIds": [ "0f9f65ab-dc7b-4146-850f-6e4881093965" ]
}, "0" ]]
{code}
Will return:
{code:java}
[[ "MDN/parse", {
"accountId": "ue150411c",
"parsed": {
"0f9f65ab-dc7b-4146-850f-6e4881093965": {
"forEmailId": "Md45b47b4877521042cec0938",
"subject": "Read receipt for: World domination",
"textBody": "This receipt shows that the email has been
displayed on your recipient's computer. There is no
guaranty it has been read or understood.",
"reportingUA": "joes-pc.cs.example.com; Foomail 97.1",
"disposition": {
"actionMode": "manual-action",
"sendingMode": "mdn-sent-manually",
"type": "displayed"
},
"finalRecipient": "rfc822; john@example.com",
"originalMessageId": "<19...@example.org>"
}
}
}, "0" ]]
{code}
Regarding MDN/send:
{code:java}
[[ "MDN/send", {
"accountId": "ue150411c",
"identityId": "I64588216",
"send": {
"k1546": {
"forEmailId": "Md45b47b4877521042cec0938",
"subject": "Read receipt for: World domination",
"textBody": "This receipt shows that the email has been displayed on your recipient's computer. ",
"reportingUA": "joes-pc.cs.example.com; Foomail 97.1",
"disposition": {
"actionMode": "manual-action",
"sendingMode": "mdn-sent-manually",
"type": "displayed"
},
"extension": {
"X-EXTENSION-EXAMPLE": "example.com"
}
}
},
"onSuccessUpdateEmail": {
"#k1546": {
"keywords/$mdnsent": true
}
}
}, "0" ]]
{code}
Would return:
{code:java}
[[ "MDN/send", {
"accountId": "ue150411c",
"sent": {
"k1546": {
"finalRecipient": "rfc822; john@example.com",
"originalMessageId": "<19...@example.org>"
}
}
}, "0" ],
[ "Email/set", {
"accountId": "ue150411c",
"oldState": "23",
"newState": "42",
"updated": {
"Md45b47b4877521042cec0938": {}
}
}, "0" ]]
{code}
h2. Link to the specifications:
JMAP core: https://jmap.io/spec-core.html
JMAP MDN spec: https://datatracker.ietf.org/doc/draft-ietf-jmap-mdn/
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org