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 eb1e8cf47c5ec1f0bc7dc94f17d008dfc5ded728 Author: Khanh Le <b...@linagora.com> AuthorDate: Mon Aug 19 15:47:15 2019 +0700 JAMES-2862 Site documentation --- .../webadmin/routes/AddressMappingRoutesTest.java | 5 ++--- src/site/markdown/server/manage-webadmin.md | 26 +++++++++++++++++++--- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AddressMappingRoutesTest.java b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AddressMappingRoutesTest.java index c29ab9a..d677a7a 100644 --- a/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AddressMappingRoutesTest.java +++ b/server/protocols/webadmin/webadmin-data/src/test/java/org/apache/james/webadmin/routes/AddressMappingRoutesTest.java @@ -195,7 +195,7 @@ class AddressMappingRoutesTest { @Test void removeAddressMappingShouldReturnBadRequestWhenMappingSourceIsInvalid() { when() - .delete( "random@domain@domain/targets/" + ALICE_ADDRESS) + .delete("random@domain@domain/targets/" + ALICE_ADDRESS) .then() .statusCode(HttpStatus.BAD_REQUEST_400); } @@ -203,9 +203,8 @@ class AddressMappingRoutesTest { @Test void removeAddressMappingShouldReturnNotFoundWhenOneParameterIsEmpty() { when() - .delete( MAPPING_SOURCE + "/targets/") + .delete(MAPPING_SOURCE + "/targets/") .then() .statusCode(HttpStatus.NOT_FOUND_404); } - } \ No newline at end of file diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md index 628ac7f..1819ade 100644 --- a/src/site/markdown/server/manage-webadmin.md +++ b/src/site/markdown/server/manage-webadmin.md @@ -1636,6 +1636,7 @@ Here are the following actions available on address mappings: - [List all address mappings](#List_all_address_mappinig) - [Add an address mapping](#Add_an_address_mapping) + - [Remove an address mapping](#Remove_an_address_mapping) ### List all address mappings @@ -1684,6 +1685,7 @@ Response body: ``` Response code: + - 200: OK ### Add an address mapping @@ -1696,9 +1698,27 @@ Mapping source is the value of {mappingSource} Mapping destination is the value of {destinationAddress} Type of mapping destination is Address -Respond code: -- 204: NO CONTENT -- 400: INVALID PARAMETERS +Response codes: + +- 204: Action successfully performed +- 400: Invalid parameters + +### Remove an address mapping + +``` +curl -XDELETE http://ip:port/mappings/address/{mappingSource}/targets/{destinationAddress} +``` + +Remove an address mapping from the [Recipients rewrite table](/server/config-recipientrewritetable.html) +Mapping source is the value of {mappingSource} +Mapping destination is the value of {destinationAddress} +Type of mapping destination is Address + +Response codes: + +- 204: Action successfully performed +- 400: Invalid parameters + ## User Mappings --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org