You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/03/11 05:05:32 UTC

[james-project] 15/15: MAILBOX-405 Document SubscribeAll task

This is an automated email from the ASF dual-hosted git repository.

btellier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 5d3a0ed3e91191bc1ea58b7507ca88a46b5ac9ad
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Mar 8 15:22:39 2021 +0700

    MAILBOX-405 Document SubscribeAll task
---
 .../pages/distributed/operate/webadmin.adoc        | 31 ++++++++++++++++++++++
 src/site/markdown/server/manage-webadmin.md        | 30 +++++++++++++++++++++
 2 files changed, 61 insertions(+)

diff --git a/docs/modules/servers/pages/distributed/operate/webadmin.adoc b/docs/modules/servers/pages/distributed/operate/webadmin.adoc
index be53056..ff3cb3f 100644
--- a/docs/modules/servers/pages/distributed/operate/webadmin.adoc
+++ b/docs/modules/servers/pages/distributed/operate/webadmin.adoc
@@ -1290,6 +1290,37 @@ Warning: While we have been trying to reduce the inconsistency window to
 a maximum (by keeping track of ongoing events), concurrent changes done
 during the reIndexing might be ignored.
 
+=== Subscribing a user to all of its mailboxes
+
+....
+curl -XPOST http://ip:port/users/{usernameToBeUsed}/mailboxes?task=subscribeAll
+....
+
+Will schedule a task for subscribing a user to all of its mailboxes.
+
+link:#_endpoints_returning_a_task[More details about endpoints returning
+a task].
+
+Most users are unaware of what an IMAP subscription is, nor how they can manage it. If the subscription list gets out
+of sync with the mailbox list, it could result in downgraded user experience (see MAILBOX-405). This task allow
+to reset the subscription list to the mailbox list on a per user basis thus working around the aforementioned issues.
+
+Response codes:
+
+- 201: Success. Corresponding task id is returned.
+- 404: No such user
+
+The scheduled task will have the following type `SubscribeAllTask` and the following `additionalInformation`:
+
+....
+{
+  "type":"SubscribeAllTask",
+  "username":"user@domain.com",
+  "subscribedCount":18,
+  "unsubscribedCount": 3
+}
+....
+
 === Recomputing User JMAP fast message view projection
 
 This action is only available for backends supporting JMAP protocol.
diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index e99f476..3e6af07 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -1136,6 +1136,36 @@ Warning: Canceling this task should be considered unsafe as it will leave the cu
 Warning: While we have been trying to reduce the inconsistency window to a maximum (by keeping track of ongoing events),
 concurrent changes done during the reIndexing might be ignored.
 
+### Subscribing a user to all of its mailboxes
+ 
+```
+curl -XPOST http://ip:port/users/{usernameToBeUsed}/mailboxes?task=subscribeAll
+```
+
+Will schedule a task for subscribing a user to all of its mailboxes.
+ 
+[More details about endpoints returning a task](#Endpoints_returning_a_task).
+
+Most users are unaware of what an IMAP subscription is, nor how they can manage it. If the subscription list gets out
+of sync with the mailbox list, it could result in downgraded user experience (see MAILBOX-405). This task allow
+to reset the subscription list to the mailbox list on a per user basis thus working around the aforementioned issues.
+
+Response codes:
+ 
+ - 201: Success. Corresponding task id is returned.
+ - 404: No such user
+
+The scheduled task will have the following type `SubscribeAllTask` and the following `additionalInformation`:
+
+```
+{
+  "type":"SubscribeAllTask",
+  "username":"user@domain.com",
+  "subscribedCount":18,
+  "unsubscribedCount": 3
+}
+```
+
 ### Recomputing User JMAP fast message view projection
 
 This action is only available for backends supporting JMAP protocol.


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@james.apache.org
For additional commands, e-mail: notifications-help@james.apache.org