Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-2884 Update JMAP implementation to conform to RFC 8620/8621
  3. JAMES-3358

Mailbox/set delete: onDestroyRemoveEmails argument implementation

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Done
    • None
    • 3.6.0
    • None
    • None

    Description

      Property:  onDestroyRemoveEmails: Boolean

      Determine whether the emails in a mailbox should be removed/destroyed when that mailbox got destroyed.

      • SHOULD default to false
      • If false, any attempt to destroy a Mailbox that still has Emails in it will be rejected with a {{mailboxHasEmail}}SetError.
      • If true, any Emails that were in the Mailbox will be removed from it, and if in no other Mailboxes, they will be destroyed when the Mailbox is destroyed.

      Request

      {
         "using": [ "urn:ietf:params:jmap:core", "urn:ietf:params:jmap:mail" ],
         "methodCalls": [
             [
                 "Mailbox/set", 
                 {
                      "accountId": "JMAP-ID",
                      "ifInState": "123",
                      "create": null,
                      "destroy": [ "0001" ],
                      "onDestroyRemoveEmails": true
                 }
             ]
         ]
      }
      

      Response

       

      {
         "methodResponses": [
             [
                 "Mailbox/set", 
                 {
                      "accountId": "JMAP-ID", // the requested accountId
                      "oldState": "123",
                      "newState": "124",
                      "created": null,
                      "destroyed": [ "0001" ]
                 }
             ]
         ], 
         "sessionState": "abc"
      }
      

       DOD:
      Integration tests + proof of email deletion when the property is true

      Proof of reject of the request if the property is false (with emails still present in the mailbox)

      Attachments

        Activity

          People

            Unassigned Unassigned
            dlkhuat Lan Khuat
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: