james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Edgar Asatryan (JIRA)" <server-...@james.apache.org>
Subject [jira] [Commented] (JAMES-2149) Create domain mappings via webadmin
Date Fri, 08 Jun 2018 23:03:00 GMT

    [ https://issues.apache.org/jira/browse/JAMES-2149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16506668#comment-16506668
] 

Edgar Asatryan commented on JAMES-2149:
---------------------------------------

[~BTellier] I've started my work on this.

I guess currently
{noformat}
RecipientsRewriteTable#addAliasDomainMapping(MappingSource, Domain)
{noformat}
all implementations of that method does store data according to _one-to-many_ semantics, in
other words one *MappingSource* can be mapped to multiple *Domain* s.

According to task definition:
{noformat}
GET /domainMappings/
{"fromDomain1":"toDomain1", "fromDomain2": "toDomain2"}
{noformat}
this is _one-to-one_ semantics.

Of course *PUT* method can be used either for create and update resource. What semantics should
follow our *PUT* request?

If we should follow _one-to-one_ as a suggestion I can propose just update/override existing
mapping (if *RecipientsRewriteTable* supports single row update), also we can respond with
*409*.
  

> Create domain mappings via webadmin
> -----------------------------------
>
>                 Key: JAMES-2149
>                 URL: https://issues.apache.org/jira/browse/JAMES-2149
>             Project: James Server
>          Issue Type: New Feature
>          Components: webadmin
>    Affects Versions: master
>            Reporter: Tellier Benoit
>            Priority: Major
>              Labels: feature, newbie
>
> Nowadays, the Rewrite Table engine supports domain redirections. That is to say any@domain.com
will be rewritten as any@otherDomain.com.
> However, such a feature is not exposed via webadmin.
> You will need to :
>  - Create a new **DomainMappingsRoutes** in webadmin-data
>  - You will expose in this routes, using directly RecipientsRewriteTable, the endpoitns
for adding, removing and listing domain mappings.
> {code:java}
> GET /domainMappings/
> {"fromDomain1":"toDomain1", "fromDomain2": "toDomain2"}
> PUT /domainMappings/fromDomain
> "toDomain"
> DELETE /domainMappings/fromDomain
> "toDomain"
> {code}
> You will write a test class from your endpoints. See *GroupsRoutesTest*.
> Don't hesitate to ask for help on the *Gitter* chat.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
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