Description
We should be able to update aliases using the webadmin protocol
Here is the proposed API:
PUT /address/aliases/bob@domain.tld/sources/bob-alias@domain.tld Adds a `bob-alias` alias pointing to `bob@domain.tld` main mail address 204 400 if the alias source (`bob-alias@domain.tld`) is contained in UsersRepository 400 if source or destination domain is not handled by James No content
(implement PUT in a separate pull request as this is an emergency?)
GET /address/aliases Returns the mailAddresses having aliases configured. 200 ["bob@domain.tld", "cedric@domain.tld"]
DELETE /address/aliases/bob@domain.tld/sources/bob-alias@domain.tld Deletes the `bob-alias` alias pointing to `bob@domain.tld` main mail address 204 No content
GET /address/aliases/bob@domain.tld Will return all the aliases pointing to bob@domain.tld main mail address 200 [ {"source":"bob-alias@domain.tld"}, ... ]
Create a `AliasRoutes` class in `/server/protocols/webadmin/webadmin-data` and the corresponding tests using the MemoryRecipientRewriteTable.
Have a look to `ForwardsRoutes` for guidance