[
https://issues.apache.org/jira/browse/JAMES-3358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Lan Khuat updated JAMES-3358:
-----------------------------
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)
was:
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)
> Mailbox/set delete: onDestroyRemoveEmails argument implementation
> -----------------------------------------------------------------
>
> Key: JAMES-3358
> URL: https://issues.apache.org/jira/browse/JAMES-3358
> Project: James Server
> Issue Type: Improvement
> Reporter: Lan Khuat
> Priority: Major
>
> 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)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]