JAMES-2138 Documenting group feature on the website
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/55f476a6 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/55f476a6 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/55f476a6 Branch: refs/heads/master Commit: 55f476a68e3b709d00a4b2909781941474c87500 Parents: dc2ad6d Author: benwa <btell...@linagora.com> Authored: Wed Sep 6 14:09:36 2017 +0700 Committer: benwa <btell...@linagora.com> Committed: Sat Sep 9 10:46:41 2017 +0700 ---------------------------------------------------------------------- src/site/markdown/server/manage-webadmin.md | 75 ++++++++++++++++++++++++ 1 file changed, 75 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/55f476a6/src/site/markdown/server/manage-webadmin.md ---------------------------------------------------------------------- diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md index 2f9a2f6..5fb5d2c 100644 --- a/src/site/markdown/server/manage-webadmin.md +++ b/src/site/markdown/server/manage-webadmin.md @@ -425,3 +425,78 @@ Note that several calls to this endpoint will be run in a sequential pattern. If the server restarts during the migration, the migration is silently aborted. +## Creating address group + +You can use **webadmin** to define address groups. + +When a specific email is sent to the group mail address, every group member will receive it. + +This feature uses [Recipients rewrite table](/server/config-recipientrewritetable.html) and requires +the [RecipientRewriteTable mailet](https://github.com/apache/james-project/blob/master/server/mailet/mailets/src/main/java/org/apache/james/transport/mailets/RecipientRewriteTable.java) +to be configured. + +### Listing groups + +``` +curl -XGET http://ip:port/address/groups +``` + +Will return the groups as a list of JSON Strings representing mail addresses. For instance: + +``` +["gro...@domain.com", "gro...@domain.com"] +``` + +Response codes: + + - 200: Success + - 500: Internal error + +### Listing members of a group + +``` +curl -XGET http://ip:port/address/groups/gr...@domain.com +``` + +Will return the group members as a list of JSON Strings representing mail addresses. For instance: + +``` +["memb...@domain.com", "memb...@domain.com"] +``` + +Response codes: + + - 200: Success + - 400: Group structure is not valid + - 404: The group does not exist + - 500: Internal error + +### Adding a group member + +``` +curl -XPUT http://ip:port/address/groups/gr...@domain.com/mem...@domain.com +``` + +Will add mem...@domain.com to gr...@domain.com, creating the group if needed + +Response codes: + + - 200: Success + - 400: Group structure or member is not valid + - 403: Server does not own the requested domain + - 409: Requested group address is already used for another purpose + - 500: Internal error + +### Removing a group member + +``` +curl -XDELETE http://ip:port/address/groups/gr...@domain.com/mem...@domain.com +``` + +Will remove mem...@domain.com from gr...@domain.com, removing the group if group is empty after deletion + +Response codes: + + - 200: Success + - 400: Group structure or member is not valid + - 500: Internal error \ No newline at end of file --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org