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 Tellier Benoit <bt...@apache.org> on 2019/11/04 09:13:46 UTC

Re: Delete after 90 Days Task

Hi Aaron,

We get this working great with the Cassandra/ElasticSearch setup.

Are you sure:
 - That ElasticSearch indexing is working fine (ERROR logs + dead-letter
[1])
 - That these mail accounts are not empty?

I'm quite surprise that you get no results for this well tested method...

[1]
https://github.com/apache/james-project/blob/master/src/site/markdown/server/manage-webadmin.md#event-dead-letter

Regards,

Benoit

On 29/10/2019 17:23, Regan, Aaron wrote:
> Hi,
> 
> Would this API work with the Cassandra implementation? Using the search method returns empty lists, even when using the simple get All search query.
> 
> Regards,
> Aaron
> 
> On 25.10.19, 11:40, "Raphaël Ouazana-Sustowski" <ro...@apache.org> wrote:
> 
>     Hi,
>     
>     Le 2019-10-21 08:12, Regan, Aaron a écrit :
>     > I wrote on the Gitter last Friday about wanting to create a function
>     > for deleting messages not collected from the server after 90 days. It
>     > was mentioned that this may be a job for a task.
>     >
>     > I have written a task with a API that while delete all message within
>     > all mailboxes. This was achieved by editing the Merge Ghost mailbox
>     > function.
>     >
>     > The goal is now to filter each method by the internalDate when greater
>     > than 90 days. Would you have any advice on whether this is a good
>     > approach, and if yes, the best way to access the internalDate
>     > variable. The function currently use the composeMessageIDwithMetaData
>     > model in a similar fashion to the merge mailboxes task.
>     
>     Writing a task seems to be the good way to do that. Regarding your 
>     question about how to get mails in a time range, maybe you can have a 
>     look at the following method of MailboxManager:
>     
>     List<MessageId> search(MultimailboxesSearchQuery expression, 
>     MailboxSession session, long limit)
>     
>     Regards,
>     Raphaël Ouazana.
>     
>     
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
>     For additional commands, e-mail: server-dev-help@james.apache.org
>     
>     
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 

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