[ 
https://issues.apache.org/jira/browse/JAMES-3211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lan Khuat updated JAMES-3211:
-----------------------------
    Description: 
User email storage usage is limited both in size and count via quotas (IMAP 
RFC-2087). In order to ease administrating large user bases, the quota search 
extension allows administrator to retrieve all users whose email usages are 
exceeding a given occupation ratio.

When searching for users by quota ratio if we set the value of the parameters 
to 0, for example: {{/quotas/users?minOccupationRatio=0&maxOccupationRatio=0}}, 
the search feature is supposed to return newly created users who have not 
received any email yet at that point. However, this is not the case because the 
quotas are currently being initialized only after a user has received the first 
email.

We need to initialize user quotas upon user creation time. The problem is there 
is currently no event at user creation and since the quota-search feature is a 
plugin of James, it cannot be hardwired into the domain logic of user 
management to initialize the quota for a just created user.

For quota-search to be initialized/removed for a given user while keeping this 
feature as a plugin, we decided to adopt the Event Driven pattern we already 
use in mailbox-api. We can create new events related to user management.

*DOD:* 
 * Extract the EventBus out of mailbox-api in order to make it a utility 
component (eventbus-api), then mailbox-api and data-api will depend on that new 
module.
 * Define a common Event interface in eventbus-api, then each event-bus usage 
will define its own sealed event hierarchy implementing Event.

  was:
When searching for users by quota ratio if we set the value of the parameters 
to 0, the search feature is supposed to return newly created users who have not 
receive any email yet at that point.

However, this is not the case due to the quotas are currently being initialize 
only after an user receive the first email.

We need an event-driven system to initialize the quotas after an user has been 
created successfully. The EventBus in mailbox-api could be generalized so we 
can implement it to solve this problem without having to depend on this module.

 

 


> Extends mailbox-api EventBus interface
> --------------------------------------
>
>                 Key: JAMES-3211
>                 URL: https://issues.apache.org/jira/browse/JAMES-3211
>             Project: James Server
>          Issue Type: Improvement
>            Reporter: Lan Khuat
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> User email storage usage is limited both in size and count via quotas (IMAP 
> RFC-2087). In order to ease administrating large user bases, the quota search 
> extension allows administrator to retrieve all users whose email usages are 
> exceeding a given occupation ratio.
> When searching for users by quota ratio if we set the value of the parameters 
> to 0, for example: 
> {{/quotas/users?minOccupationRatio=0&maxOccupationRatio=0}}, the search 
> feature is supposed to return newly created users who have not received any 
> email yet at that point. However, this is not the case because the quotas are 
> currently being initialized only after a user has received the first email.
> We need to initialize user quotas upon user creation time. The problem is 
> there is currently no event at user creation and since the quota-search 
> feature is a plugin of James, it cannot be hardwired into the domain logic of 
> user management to initialize the quota for a just created user.
> For quota-search to be initialized/removed for a given user while keeping 
> this feature as a plugin, we decided to adopt the Event Driven pattern we 
> already use in mailbox-api. We can create new events related to user 
> management.
> *DOD:* 
>  * Extract the EventBus out of mailbox-api in order to make it a utility 
> component (eventbus-api), then mailbox-api and data-api will depend on that 
> new module.
>  * Define a common Event interface in eventbus-api, then each event-bus usage 
> will define its own sealed event hierarchy implementing Event.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to