[jira] [Closed] (JAMES-4189) List user per domain

"Benoit Tellier (Jira)" <[email protected]> Fri, 13 Mar 2026 21:28:00 +0000 (UTC)
Newsgroups gmane.comp.jakarta.james.devel
Message-ID <[email protected]>
     [ https://issues.apache.org/jira/browse/JAMES-4189?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benoit Tellier closed JAMES-4189.
---------------------------------
    Resolution: Fixed

This was merged.

> List user per domain
> --------------------
>
>                 Key: JAMES-4189
>                 URL: https://issues.apache.org/jira/browse/JAMES-4189
>             Project: James Server
>          Issue Type: Improvement
>          Components: UsersStore &amp; UsersRepository
>            Reporter: Benoit Tellier
>            Priority: Major
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> h3. Why ?
> We are operating James deployments that has a large number of domains.
> We are limited by the ability to list user by domain that do not exist. Currently we can only list all users.
> THis is a problem:
>  - Operation maintenance involve loading the full list of users
>  - Some operation like updating domain limits, a common operation for us, involves notifying the quota update to domain members and iterates on all user for doing so.
> h3. What? 
> Augment UsersRepository with the ability to list users belonging to a given domain, and a default method relying on list() method + post filtering.
> Throws if virtualHosting is not enabled (IllegalStateException)
> Implement it for LDAP repositor with a clever filter on the mail address field. PG too might benefit from it ( LIKE on the user name?).
> Add a corresponding DomainUsersRoute:
> {code:java}
> GET /domains/linagora.com/users
> ["[email protected]", ...]
> {code}
> And finally use the new UsersRepository::list(Domain domain) method where relevant.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)