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 "Felix Auringer (Jira)" <se...@james.apache.org> on 2026/09/22 14:41:00 UTC
[jira] [Resolved] (JAMES-4229) WebAPI for DomainMapping mixes domain mappings and domain alias mappings
[ https://issues.apache.org/jira/browse/JAMES-4229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Auringer resolved JAMES-4229.
-----------------------------------
Assignee: Felix Auringer
Resolution: Fixed
Fixed via https://github.com/apache/james-project/pull/3186
> WebAPI for DomainMapping mixes domain mappings and domain alias mappings
> ------------------------------------------------------------------------
>
> Key: JAMES-4229
> URL: https://issues.apache.org/jira/browse/JAMES-4229
> Project: James Server
> Issue Type: Bug
> Reporter: Felix
> Assignee: Felix Auringer
> Priority: Minor
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The RRT has two types of domain mappings defined in server/data/data-api/src/main/java/org/apache/james/rrt/lib/Mapping.java. There is the `Type.DomainAlias` and the `Type.Domain`.
> The web API offers the route `/domainMappings` to edit these mappings (https://james.apache.org/server/manage-webadmin.html#Creating_domain_mappings).
> From the name and description, I would guess that the API creates `Type.Domain`.
> However, the API actually uses a wild mix of the two types:
> - PUT calls `recipientRewriteTable.addDomainAliasMapping`: It creates a new `Type.DomainAlias`.
> - DELETE calls `recipientRewriteTable.removeDomainMapping`: It removes an existing `Type.Domain` and can therefore not remove mappings created with PUT.
> - GET (all) filters mappings for `Type.Domain`, so it can not list mappings created with PUT.
> - GET (specific source) filters mappings for `Type.Domain`, so it can not list mappings created with PUT.
> I would assume that the usage of `Type.DomainAlias` in the PUT endpoint is a bug. If you see it the same way, I would offer to fix it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org