JAMES-2366 Adding documentation to forwards routes
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/150663f8 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/150663f8 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/150663f8 Branch: refs/heads/master Commit: 150663f8437609fc6696b02c7d5e2ac96ede5141 Parents: 43259b5 Author: benwa <btell...@linagora.com> Authored: Thu Mar 29 16:35:43 2018 +0700 Committer: Antoine Duprat <adup...@linagora.com> Committed: Fri Apr 6 15:04:48 2018 +0200 ---------------------------------------------------------------------- src/site/markdown/server/manage-webadmin.md | 88 ++++++++++++++++++++++++ 1 file changed, 88 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/150663f8/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 c1ecf01..cc69984 100644 --- a/src/site/markdown/server/manage-webadmin.md +++ b/src/site/markdown/server/manage-webadmin.md @@ -765,6 +765,8 @@ 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. +Note that the group mail address is virtual: it does not correspond to an existing user. + 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. @@ -837,6 +839,92 @@ Response codes: - 400: Group structure or member is not valid - 500: Internal error +## Creating address forwards + +You can use **webadmin** to define address forwards. + +When a specific email is sent to the base mail address, every forward destination addresses will receive it. + +Please note that the base address can be optionaly part of the forward destination. In that case, the base recipient +also receive a copy of the mail. Otherwise he is ommitted. + +Forwards can be defined for existing users. It then defers from "groups". + +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. + +Note that email addresses are restricted to ASCII character set. Mail addresses not matching this criteria will be rejected. + +### Listing Forwards + +``` +curl -XGET http://ip:port/address/forwards +``` + +Will return the users having forwards configured as a list of JSON Strings representing mail addresses. For instance: + +``` +["us...@domain.com", "us...@domain.com"] +``` + +Response codes: + + - 200: Success + - 500: Internal error + +### Listing destinations in a forward + +``` +curl -XGET http://ip:port/address/forwards/u...@domain.com +``` + +Will return the destination addresses of this forward as a list of JSON Strings representing mail addresses. For instance: + +``` +[ + {"mailAddres":"destinati...@domain.com"}, + {"mailAddres":"destinati...@domain.com"} +] +``` + +Response codes: + + - 200: Success + - 400: Forward structure is not valid + - 404: The given user don't have forwards or does not exist + - 500: Internal error + +### Adding a new destination to a forward + +``` +curl -XPUT http://ip:port/address/forwards/u...@domain.com/targets/destinat...@domain.com +``` + +Will add destinat...@domain.com to u...@domain.com, creating the forward if needed + +Response codes: + + - 200: Success + - 400: Forward structure or member is not valid + - 403: Server does not own the requested domain + - 404: Requested forward address does not match an existing user + - 500: Internal error + +### Removing a destination of a forward + +``` +curl -XDELETE http://ip:port/address/forwards/u...@domain.com/targets/destinat...@domain.com +``` + +Will remove destinat...@domain.com from u...@domain.com, removing the forward if forward is empty after deletion + +Response codes: + + - 200: Success + - 400: Forward structure or member is not valid + - 500: Internal error + ## Administrating mail repositories ### Listing mail repositories --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org