james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adup...@apache.org
Subject [11/24] james-project git commit: JAMES-2366 Adding documentation to forwards routes
Date Fri, 06 Apr 2018 13:20:30 GMT
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 <btellier@linagora.com>
Authored: Thu Mar 29 16:35:43 2018 +0700
Committer: Antoine Duprat <aduprat@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:
+
+```
+["user1@domain.com", "user2@domain.com"]
+```
+
+Response codes:
+
+ - 200: Success
+ - 500: Internal error
+
+### Listing destinations in a forward
+
+```
+curl -XGET http://ip:port/address/forwards/user@domain.com
+```
+
+Will return the destination addresses of this forward as a list of JSON Strings representing
mail addresses. For instance:
+
+```
+[
+  {"mailAddres":"destination1@domain.com"},
+  {"mailAddres":"destination2@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/user@domain.com/targets/destination@domain.com
+```
+
+Will add destination@domain.com to user@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/user@domain.com/targets/destination@domain.com
+```
+
+Will remove destination@domain.com from user@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-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message