You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2019/05/16 08:48:19 UTC

[james-project] 04/23: JAMES-2149 Website documentation for Domain aliases

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 df68593cdbe9c5ff083e4131c7232ef4de3a5439
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue May 14 10:41:02 2019 +0700

    JAMES-2149 Website documentation for Domain aliases
---
 src/site/markdown/server/manage-webadmin.md | 64 +++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 05f87b5..77a3ee4 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -124,6 +124,9 @@ Response codes:
    - [Delete a domain](#Delete_a_domain)
    - [Test if a domain exists](#Test_if_a_domain_exists)
    - [Get the list of domains](#Get_the_list_of_domains)
+   - [Get the list of aliases for a domain](#Get_the_list_of_aliases_for_a_domain)
+   - [Create an alias for a domain](#Create_an_alias_for_a_domain)
+   - [Delete an alias for a domain](#Delete_an_alias_for_a_domain)
 
 ### Create a domain
 
@@ -180,6 +183,67 @@ Response codes:
 
  - 200: The domain list was successfully retrieved
 
+### Get the list of aliases for a domain
+
+```
+curl -XGET http://ip:port/domains/destination.domain.tld/aliases
+```
+
+Possible response:
+
+```
+[
+  {"source": "source1.domain.tld"},
+  {"source": "source2.domain.tld"}
+]
+```
+
+When sending an email to an email address having source1.domain.tld or source2.domain.tld as a domain part (exemple: benwa@source1.domain.tld), then
+the domain part will be rewritten into destination.domain.tld (so into benwa@destination.domain.tld).
+
+Response codes:
+
+ - 200: The domain aliases was successfully retrieved
+ - 400: destination.domain.tld has an invalid syntax
+ - 404: destination.domain.tld is not part of handled domains or does not have local domains as aliases.
+
+### Create an alias for a domain
+
+To create a domain alias execute the following query:
+
+```
+curl -XPUT http://ip:port/domains/destination.domain.tld/aliases/source.domain.tld
+```
+
+When sending an email to an email address having source.domain.tld as a domain part (exemple: benwa@source.domain.tld), then
+the domain part will be rewritten into destination.domain.tld (so into benwa@destination.domain.tld).
+
+
+Response codes:
+
+ - 204: The redirection now exists
+ - 400: source.domain.tld or destination.domain.tld have an invalid syntax
+ - 404: source.domain.tld are not part of handled domains.
+
+### Delete an alias for a domain
+
+
+To delete a domain alias execute the following query:
+
+```
+curl -XDELETE http://ip:port/domains/destination.domain.tld/aliases/source.domain.tld
+```
+
+When sending an email to an email address having source.domain.tld as a domain part (exemple: benwa@source.domain.tld), then
+the domain part will be rewritten into destination.domain.tld (so into benwa@destination.domain.tld).
+
+
+Response codes:
+
+ - 204: The redirection now exists
+ - 400: source.domain.tld or destination.domain.tld have an invalid syntax
+ - 404: source.domain.tld are not part of handled domains.
+
 ## Administrating users
 
    - [Create a user](#Create_a_user)


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