[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Description: 
We have an issue when mail client integrate with jmap/imap server some kind of 
synchronization:

when i rename a folder - which have sub folder in it, things happened make imap 
synchronization of mail client (out look app in window 10) are not correct, it 
keep the old folder and new updated folder.

I need to investigate more on this.

*On OpenPaas (mail client):*

  !image3.png!

*On Outlook (**mail client)**:*

!image4.png!

 

  was:
We have an issue when mail client integrate with jmap/imap server some kind of 
synchronization:

when i rename a folder - which have sub folder in it, things happened make imap 
synchronization of mail client (out look app in window 10) are not correct, it 
keep the old folder and new updated folder.

I need to investigate more on this.

*On OpenPaas (mail client):*

  !image3.png!

*On Outlook (**mail client)**:*

!image4.png!

 
 * Add to Phrasebook
 
 ** No word lists for English (USA) -> Vietnamese...
 
 ** Create a new word list...
 * Copy

 * Add to Phrasebook
 
 ** No word lists for English (USA) -> Vietnamese...
 
 ** Create a new word list...
 * Copy

 * Add to Phrasebook
 
 ** No word lists for English (USA) -> Vietnamese...
 
 ** Create a new word list...
 * Copy


> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
> Attachments: image3.png, image4.png
>
>
> We have an issue when mail client integrate with jmap/imap server some kind 
> of synchronization:
> when i rename a folder - which have sub folder in it, things happened make 
> imap synchronization of mail client (out look app in window 10) are not 
> correct, it keep the old folder and new updated folder.
> I need to investigate more on this.
> *On OpenPaas (mail client):*
>   !image3.png!
> *On Outlook (**mail client)**:*
> !image4.png!
>  



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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Description: 
We have an issue when mail client integrate with jmap/imap server some kind of 
synchronization:

when i rename a folder - which have sub folder in it, things happened make imap 
synchronization of mail client (out look app in window 10) are not correct, it 
keep the old folder and new updated folder.

I need to investigate more on this.

*On OpenPaas (mail client):*

  !image3.png!

*On Outlook (**mail client)**:*

!image4.png!

 
 * Add to Phrasebook
 
 ** No word lists for English (USA) -> Vietnamese...
 
 ** Create a new word list...
 * Copy

 * Add to Phrasebook
 
 ** No word lists for English (USA) -> Vietnamese...
 
 ** Create a new word list...
 * Copy

 * Add to Phrasebook
 
 ** No word lists for English (USA) -> Vietnamese...
 
 ** Create a new word list...
 * Copy

  was:
*Preconditions*

A folder has been created on Outlook and synchronize to OpenPaas.

*Description*

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

*On OpenPaas:*

  !image3.png!

*On Outlook:*

!image4.png!

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

*Expected result*

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

*Reproduction Steps*

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.

*Environment*
 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10


> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
> Attachments: image3.png, image4.png
>
>
> We have an issue when mail client integrate with jmap/imap server some kind 
> of synchronization:
> when i rename a folder - which have sub folder in it, things happened make 
> imap synchronization of mail client (out look app in window 10) are not 
> correct, it keep the old folder and new updated folder.
> I need to investigate more on this.
> *On OpenPaas (mail client):*
>   !image3.png!
> *On Outlook (**mail client)**:*
> !image4.png!
>  
>  * Add to Phrasebook
>  
>  ** No word lists for English (USA) -> Vietnamese...
>  
>  ** Create a new word list...
>  * Copy
>  * Add to Phrasebook
>  
>  ** No word lists for English (USA) -> Vietnamese...
>  
>  ** Create a new word list...
>  * Copy
>  * Add to Phrasebook
>  
>  ** No word lists for English (USA) -> Vietnamese...
>  
>  ** Create a new word list...
>  * Copy



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



Re: Distributed James: make ElasticSearch indexing optional?

2020-06-11 Thread Tellier Benoit
+1

On 11/06/2020 23:01, Raphaël Ouazana-Sustowski wrote:
> Hi,
> 
> Here is a proposal to make ElasticSearch optional in our distributed
> product/flavor/server.
> 
> Comments are welcome.
> 
> 
> ## Why?
> 
> Some people have expressed the need of using a distributed James without
> ElasticSearch:
> - in some comment here: https://issues.apache.org/jira/browse/JAMES-3086
> - one of our customers plan to deploy a distributed James server for
> serving POP3 encrypted emails. This deployment does not rely on
> searching features. However as part of current Distributed James server
> he is forced to rely on ElasticSearch email indexing.
> 
> This results in wasted resources as maintaining an ElasticSearch cluster
> to keep up with the volume is expensive.
> Maintaining an ElasticSearch cluster when not needed is costly at
> several levels:
> - cost of infrastructure to deploy it
> - cost of people having to maintain it
> - performance cost on James to unnecessarily index data
> 
> ## How ?
> 
> Scanning search is a search implementation that is running on top of any
> mailbox implementation, even distributed ones and does not require to
> index data.
> 
> Scanning Search is tested both at the component level (unit test) but
> also passes IMAP (MPT) tests on top of Cassandra implementation, as well
> as JMAP memory tests, thus delivers correct results. Of course it does
> not support full text search.
> 
> We should allow Distributed James to optionally rely on scanning search
> instead of ElasticSearch.
> 
>  - Scanning search should be advised for deployments rarely searching data
>  - ElasticSearch should be advised when search is frequent or requires
> high performance
> 
> We could use module choosing [1] to choose between scanning search and
> ElasticSearch.
> 
> To be noted that scanning search introduces no other dependencies as it
> is part of mailbox-store thus causes no risk of library clashes.
> 
> To be noted also that metric collection and log collection using
> ElasticSearch is unaffected.
> 
> ## Alternative
> 
> The alternative would be to build a different product/flavor/server than
> the distributed one, where the only difference with the distributed one
> is that indexing will rely on scanning instead of ElasticSearch.
> 
> The maintenance cost of such a product/flavor/server is higher than of a
> configuration option (Docker images to release, time and energy to run
> integration tests on it).
> 
> Such a product/flavor is hard to brand because even if it answers a
> need, it is not so far of the distributed one, and does not answer needs
> that are very far from it neither.
> 
> The advantage is that is would allow to more fine tune this solution to
> answer to the exact needs.
> 
> ## Work in Progress
> 
> See pull request: https://github.com/linagora/james-project/pull/3425
> 
> Regards,
> 
> Raphaël.
> 
> 
> 
> [1]
> https://github.com/apache/james-project/blob/master/src/adr/0036-against-use-of-conditional-statements-in-guice-modules.md
> 
> 
> 
> -
> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
> For additional commands, e-mail: server-dev-h...@james.apache.org
> 

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



[jira] [Commented] (JAMES-3213) Prevent non-participant add in Sabre

2020-06-11 Thread Benoit Tellier (Jira)


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

Benoit Tellier commented on JAMES-3213:
---

Please be more careful when you feed Apache James bugtracker. ESN, Sabre are 
not part of the Apache James project and thus are not relevant in this context.

> Prevent non-participant add in Sabre
> 
>
> Key: JAMES-3213
> URL: https://issues.apache.org/jira/browse/JAMES-3213
> Project: James Server
>  Issue Type: Improvement
>Reporter: Gautier DI FOLCO
>Priority: Minor
>
> When an attendee changes his participant status, there is a notification 
> email is sent to the event organizer from the attendee.
> Then ESN send an ITIP request to Sabre to handle realtime update.
> If the sender email does not exist in the list attendee, Sabre ITIP broker 
> will add him to the attendee list. 
> [https://github.com/sabre-io/vobject/blob/master/lib/ITip/Broker.php#L373-L382]
> This is not correct in cases:
>  * When an external attendee accept the event, the notification email should 
> send from OpenPaaS system 
> ([no-re...@open-paas.org|mailto:no-re...@open-paas.org])
>  * When the attendee forwards the invitation email to an external user, then 
> the external user (is not included in attendee list) accepts.
> Both cases above should not lead to the behavior that adding the sender to 
> the attendee list.



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



[jira] [Commented] (JAMES-3209) Auth Module to make James usable with Nginx mail proxy for TLS termination

2020-06-11 Thread David Leangen (Jira)


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

David Leangen commented on JAMES-3209:
--

I tried the process without using Docker Compose, and nginx does indeed make 
the call to my auth server, so there must be a problem with the Docker Compose 
configuration in the files I attached.

> Auth Module to make James usable with Nginx mail proxy for TLS termination 
> ---
>
> Key: JAMES-3209
> URL: https://issues.apache.org/jira/browse/JAMES-3209
> Project: James Server
>  Issue Type: New Feature
>Reporter: Ioan Eugen Stan
>Priority: Major
> Attachments: docker-compose.yaml, nginx.conf
>
>
> Apache James needs to be deployed with TLS encryption to ensure security of 
> emails during transport. 
> We could use Nginx as a mail proxy and use it for TLS termination. 
> However we need to implement an HTTP auth service for that to work. 
> This issue should cover work on making Nginx a valid mail proxy in front of 
> Apache James.
> References:
> https://docs.nginx.com/nginx/admin-guide/mail-proxy/mail-proxy/ 
> https://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html#protocol
> == Context
> Unfortunately, Java has only the keystore for managing TLS certificates. This 
> is makes deploying TLS certificates hard for Apache James since the internet 
> does not use. keystore format. 
> We could use Nginx as a amil proxy. Nginx supports the certificate format 
> that all other tools use. (add format here - PKCS #XXX ). People know how to 
> setup Nginx with LetsEncrypt and benefit from free TLS certificates with 
> automatic renewal. 
> However we need an integration piece: the nginx auth service. It's an http 
> service that works only with headers. It should be simple to write and work 
> integrate.



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



[jira] [Commented] (JAMES-3206) Keystore Exception when running the "Basic" Server

2020-06-11 Thread David Leangen (Jira)


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

David Leangen commented on JAMES-3206:
--

Yes, I did indeed use that password. I even `docker exec`ed into the container 
to double check.

> Keystore Exception when running the "Basic" Server
> --
>
> Key: JAMES-3206
> URL: https://issues.apache.org/jira/browse/JAMES-3206
> Project: James Server
>  Issue Type: Bug
>Reporter: David Leangen
>Priority: Blocker
>
> When attempting to run the "Basic" server (jpa-guice) out-of-the-box, I am 
> unable to get the server running due to a password exception:
> {code:java}
> 12:13:26.044 [ERROR] o.a.j.GuiceJamesServer - Fatal error while starting James
> java.security.UnrecoverableKeyException: failed to decrypt safe contents 
> entry: java.lang.IllegalStateException: password has been cleared
>  ... 32 common frames omitted
> Wrapped by: java.io.IOException: keystore password was incorrect
>  at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(Unknown Source)
>  at java.base/sun.security.util.KeyStoreDelegator.engineLoad(Unknown Source)
>  at java.base/java.security.KeyStore.load(Unknown Source)
>  at 
> org.apache.james.protocols.lib.netty.AbstractConfigurableAsyncServer.buildSSLContext(AbstractConfigurableAsyncServer.java:396)
>  at 
> org.apache.james.protocols.lib.netty.AbstractConfigurableAsyncServer.init(AbstractConfigurableAsyncServer.java:264)
>  at 
> org.apache.james.protocols.lib.netty.AbstractServerFactory.init(AbstractServerFactory.java:58)
>  at 
> org.apache.james.modules.protocols.IMAPServerModule.lambda$configureImap$0(IMAPServerModule.java:93)
>  at 
> org.apache.james.utils.InitilizationOperationBuilder$PrivateImpl.initModule(InitilizationOperationBuilder.java:52)
>  at 
> com.github.fge.lambdas.consumers.ConsumerChainer.lambda$sneakyThrow$9(ConsumerChainer.java:73)
>  at java.base/java.util.stream.ReferencePipeline$11$1.accept(Unknown Source)
>  at java.base/java.util.stream.DistinctOps$1$2.accept(Unknown Source)
>  at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(Unknown 
> Source)
>  at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
>  at 
> java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown 
> Source)
>  at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
>  at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown 
> Source)
>  at 
> java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown 
> Source)
>  at 
> java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown
>  Source)
>  at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
>  at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
>  at java.base/java.util.stream.ReferencePipeline$7$1.accept(Unknown Source)
>  at 
> java.base/java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown 
> Source)
>  at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
>  at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown 
> Source)
>  at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown 
> Source)
>  at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
>  at java.base/java.util.stream.ReferencePipeline.collect(Unknown Source)
>  at 
> org.apache.james.utils.InitializationOperations.processConfigurables(InitializationOperations.java:53)
>  at 
> org.apache.james.utils.InitializationOperations.initModules(InitializationOperations.java:43)
>  at org.apache.james.GuiceJamesServer.start(GuiceJamesServer.java:93)
>  at org.apache.james.JamesServerMain.main(JamesServerMain.java:24)
>  at org.apache.james.JPAJamesServerMain.main(JPAJamesServerMain.java:105)
> 12:14:23.287 [ERROR] o.a.j.PeriodicalHealthChecks - UNHEALTHY: Guice 
> application lifecycle : James server is not started.
> {code}
>  I opened a session into the docker container to test the keystore. It exists 
> in the conf directory and works as intended with the default password.
> So I do not know why this exception occurs and the server does not start. :(



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



Distributed James: make ElasticSearch indexing optional?

2020-06-11 Thread Raphaël Ouazana-Sustowski

Hi,

Here is a proposal to make ElasticSearch optional in our distributed 
product/flavor/server.


Comments are welcome.


## Why?

Some people have expressed the need of using a distributed James without 
ElasticSearch:

- in some comment here: https://issues.apache.org/jira/browse/JAMES-3086
- one of our customers plan to deploy a distributed James server for 
serving POP3 encrypted emails. This deployment does not rely on 
searching features. However as part of current Distributed James server 
he is forced to rely on ElasticSearch email indexing.


This results in wasted resources as maintaining an ElasticSearch cluster 
to keep up with the volume is expensive.
Maintaining an ElasticSearch cluster when not needed is costly at 
several levels:

- cost of infrastructure to deploy it
- cost of people having to maintain it
- performance cost on James to unnecessarily index data

## How ?

Scanning search is a search implementation that is running on top of any 
mailbox implementation, even distributed ones and does not require to 
index data.


Scanning Search is tested both at the component level (unit test) but 
also passes IMAP (MPT) tests on top of Cassandra implementation, as well 
as JMAP memory tests, thus delivers correct results. Of course it does 
not support full text search.


We should allow Distributed James to optionally rely on scanning search 
instead of ElasticSearch.


 - Scanning search should be advised for deployments rarely searching data
 - ElasticSearch should be advised when search is frequent or requires 
high performance


We could use module choosing [1] to choose between scanning search and 
ElasticSearch.


To be noted that scanning search introduces no other dependencies as it 
is part of mailbox-store thus causes no risk of library clashes.


To be noted also that metric collection and log collection using 
ElasticSearch is unaffected.


## Alternative

The alternative would be to build a different product/flavor/server than 
the distributed one, where the only difference with the distributed one 
is that indexing will rely on scanning instead of ElasticSearch.


The maintenance cost of such a product/flavor/server is higher than of a 
configuration option (Docker images to release, time and energy to run 
integration tests on it).


Such a product/flavor is hard to brand because even if it answers a 
need, it is not so far of the distributed one, and does not answer needs 
that are very far from it neither.


The advantage is that is would allow to more fine tune this solution to 
answer to the exact needs.


## Work in Progress

See pull request: https://github.com/linagora/james-project/pull/3425

Regards,

Raphaël.



[1] 
https://github.com/apache/james-project/blob/master/src/adr/0036-against-use-of-conditional-statements-in-guice-modules.md



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



Re: James architecture: core components, sub-components and utility components

2020-06-11 Thread Raphaël Ouazana-Sustowski

Hello,

Even if I globally agree with your definition of extension, I think 
import/export is a very valuable feature and should be promoted (when 
finished). Of course from an architecture point of view it could be seen 
as an extension but for an admin it should be well integrated and easy 
to use.


Regards,

Raphaël.

Le 11/06/2020 à 08:21, Tellier Benoit a écrit :


On 10/06/2020 22:49, Raphaël Ouazana-Sustowski wrote:

Hi Benoît,

This inventory is amazing, thanks for having issued it.

For my part it's just missing the LDAP read only user repository as an
implementation of the user repository.

True.


But I probably missed things :)

Oh for example the (unfinished?) import / export mechanism.

I would count it as a mailbox extension. I did not listed them on
purpose as I think these subproject parts address very specific needs
and should not be packaged as part of out-of-the-box servers.

I rather think that each server should have a list of extensions that we
can use with it.

So far I can come up with the following list of extensions candidates
(not only mailbox ones):
  - Data Leak Prevention
  - SpamAssassin
  - OverQuota mailing
  - Quota search
  - Of course mailbox import/export
  - DeletedMessages vault
  - Maybe even Sieve support could live as an extension?
  - WKD would IMO also qualify...
  - ...

As a regular user, I don't really care about them. They should not
complexify the configuration, documentation or the server itself that I
am running.

I started detailing my thoughts about extension mechanism in this email
https://www.mail-archive.com/server-dev@james.apache.org/msg66206.html

I believe that extracting extensions out of default servers would ease
reducing build time.

But I also believe it would help us building (guice based) servers that
are easier to extend.

Regards,

Benoit


Regards,

Raphaël.

Le 25/05/2020 à 07:00, Tellier Benoit a écrit :

Hi David,

I gave a shot at defining:

   - Core components, that offers services at heart of James
   - Utility components, that offers services core-components
implementations can rely on.
   - Mailbox sub-components.

Here is the result. I encourage other project members to review it.

   - Did I forgot some components?
   - Is the way I split them relevant?
   - Is the way to describe a component (descriptions, entities, key
interfaces, plugin) relevant? Would you add/remove something?
   - Of course all the component level details...

I hope it helps your documentation effort.

Best regards,

Benoit

-

# Core components

## MailetContainer

Enables mail processing.

Entity:
   - **Mails**: Message transiting between a sender and recipients

Key interfaces:
   - **Mailet**: Enables to act upon an email: modify it, trigger side
effects
   - **Matcher**: Condition to trigger a mailet action

Plugin: A user can register their own mailets / matchers

Here is a list of mailets providing central services, and bridges other
core components defined here after :

   - **RemoteDelivery** enables sending emails to other mail servers,
using the SMTP protocol.
   - **LocalDelivery** enables delivering emails to local user mailboxes.
   - **RecipientRewriteTable** queries and applied recipient rewritting
rules.
   - **ToMailRepository** stores emails in a given mail repository.
   - **Sieve** executes stored sieve scripts against incoming emails.

## MailQueue

Enables asynchronous mail processing. Enables review and administration
of mail traffic awaiting processing.

Entity: **Mails**

Key interface: **MailQueue**, **ManageableMailQueue**

Implementations:
   - Memory
   - (embedded) ActiveMQ
   - Distributed (RabbitMQ + Cassandra)
   - Files

## MailRepositories

Enables storing emails, along with their processing context. Enables
traffic review.

Can be used to recover error, stores spam, etc...

Entity: **Mails**

Key interfaces:
   - **MailRepository**
   - **MailRepositoryStore**: enables instanciation of MailRepositories

Plugins:
   - A user can register new classes of MailRepository, that he can then
configure within it's Mailet Container

Bundled implementation:
   - Memory
   - Cassandra
   - JDBC
   - File

## Mailbox

The mailbox stores user messages for later retrieval.

Entities:
   - **Messages**: a mime message belonging to a user, along with their
mailbox context.
   - **Mailboxes**: a group of messages

Sample operations:
   - Mailboxes can be created, deleted, renamed
   - Messages can be appended, deleted, moved, copied, their flags can be
modified

Key interfaces:
   - **MailboxManager**: Enable managing and accessing mailboxes
   - **MessageManager**: Enables accessing messages within a given
mailbox. Can be obtained via the MailboxManager.
   - **MessageIdManager**: Enables accessing messages by their unique
identifier.. Can be obtained via the MailboxManager.

Implementations:
   - Memory implementation
   - Maildir implementation
   - JPA implementation
   - Cassandra implementa

[jira] [Commented] (JAMES-3204) CassandraMessageMapper badly applies LIMIT

2020-06-11 Thread Raphael Ouazana (Jira)


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

Raphael Ouazana commented on JAMES-3204:


[https://github.com/linagora/james-project/pull/3428] should have taken care of 
it, but we still need to run some load testing to check the global behavior

> CassandraMessageMapper badly applies LIMIT
> --
>
> Key: JAMES-3204
> URL: https://issues.apache.org/jira/browse/JAMES-3204
> Project: James Server
>  Issue Type: Improvement
>  Components: cassandra, mailbox
>Affects Versions: 3.5.0
>Reporter: Benoit Tellier
>Priority: Major
> Fix For: 3.6.0
>
>
> We noticed some `BusyPool` exceptions filling up the driver queue upon IMAP 
> query (FETCH flags for all the messages in the mailbox).
> The MessageManager do batch those reads (by default by 200 for metadata)., 
> wich then call the MessageMapper with this limit.
> Some unit tests performed at the Cassandra mailbox level proved the soft 
> filtering did badly applies, and that we were performing uneeded extra reads 
> for the full batch read from the database.
> One good mitigation strategy is to push the limit to the Cassandra query, and 
> ensures filtering happens before the extra reads are performed.
> https://projectreactor.io/docs/core/release/api/reactor/core/publisher/Flux.html#take-long-
>  documents that it just don't propagate downstream request once a given 
> amount is reached however it do not ensure any form of backpressure. We might 
> want to further audit our code, looking for similar take mis-usages. 



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



[jira] [Commented] (JAMES-3194) Rely on DTOConverter in TaskRoute

2020-06-11 Thread Raphael Ouazana (Jira)


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

Raphael Ouazana commented on JAMES-3194:


[https://github.com/linagora/james-project/pull/3382] takes care of this, 
please close this issue

> Rely on DTOConverter in TaskRoute
> -
>
> Key: JAMES-3194
> URL: https://issues.apache.org/jira/browse/JAMES-3194
> Project: James Server
>  Issue Type: Improvement
>  Components: task, webadmin
>Affects Versions: master
>Reporter: Benoit Tellier
>Priority: Major
> Fix For: 3.6.0
>
>
> The taskManager defines task serialization, used to persist a task and 
> additional information, in order to be accessible in a distributed context.
> However, we rely on implicit Jackson serialization for returning task details 
> over webadmin.
> This results in confusing expectation as a developer. We furthermore "leak" 
> jackson annotation in the details models.
> We should rely on the DTOs for details serialization over webadmin.
> https://github.com/linagora/james-project/pull/3382 is a trial to reach this 
> prurpose.



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



[jira] [Commented] (JAMES-3182) Fetching message in getMessageList ignore inMailbox filter when in a combination of filter

2020-06-11 Thread Raphael Ouazana (Jira)


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

Raphael Ouazana commented on JAMES-3182:


[https://github.com/linagora/james-project/pull/3427] fixes some related issues

> Fetching message in getMessageList ignore inMailbox filter when in a 
> combination of filter
> --
>
> Key: JAMES-3182
> URL: https://issues.apache.org/jira/browse/JAMES-3182
> Project: James Server
>  Issue Type: Test
>  Components: JMAP
>Affects Versions: 3.6.0
>Reporter: Rémi Kowalski
>Assignee: Antoine Duprat
>Priority: Major
> Fix For: 3.6.0
>
>
> The  inMailbox, notInMailbox filters are ignored when they are placed in a 
> combination of filter.
> The reason is :
>  * Mailboxes the query is run against are resolved against cassandra before 
> being pushed to the search index.
>  * The bit of code handling this conversion only take into consideration TOP 
> LEVEL liters and not those wrapped by some FilterOperatrs (AND, OR, NOT)
> for more context see  #3180: 
>  [https://github.com/linagora/james-project/pull/3374]
> DOD : 
>  make
> {color:#00627a}`GetMessageListMethodTest.getMessageListShouldFetchUnreadMessagesInMailboxUsingACombinationOfFilter`
>  
>  pass and add test to ensure the notInMailbox filter is handled as well.
>  
>  
>  create some other tests with nested mailbox filters
>  {color}



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



[james-project] 04/17: JAMES-3194 Inject DTOConverter for every product

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 7c1adec91f44c237d60d989a63326ff7faaab327
Author: Benoit Tellier 
AuthorDate: Fri May 15 15:51:03 2020 +0700

JAMES-3194 Inject DTOConverter for every product

Note that is requires splitting guice injections for it
---
 .../org/apache/james/CassandraJamesServerMain.java |   2 +
 ...assandraConsistencyTaskSerializationModule.java | 110 +
 .../james/CassandraRabbitMQJamesServerMain.java|   4 +-
 .../modules/DistributedTaskManagerModule.java  |   3 +
 .../DistributedTaskSerializationModule.java| 107 +
 .../james/modules/TaskSerializationModule.java | 475 -
 server/container/guice/guice-common/pom.xml|   4 +
 .../james/modules/server/TaskManagerModule.java|   2 +
 .../modules/server/TaskSerializationModule.java}   |  36 +-
 .../modules/mailbox/LuceneSearchMailboxModule.java |   2 +
 .../modules/vault/DeletedMessageVaultModule.java   |   1 +
 .../vault/VaultTaskSerializationModule.java|  82 
 server/container/guice/mailbox/pom.xml |   4 +
 .../mailbox/ReIndexingTaskSerializationModule.java | 110 +
 .../server/JmapTaskSerializationModule.java|  56 +++
 .../james/modules/server/JmapTasksModule.java  |   2 +
 .../james/modules/server/MailboxRoutesModule.java  |   2 +
 .../server/MailboxesExportRoutesModule.java|   1 +
 ...adminMailboxExportTaskSerializationModule.java} |  32 +-
 .../WebadminMailboxTaskSerializationModule.java|  79 
 .../modules/server/MailQueueRoutesModule.java  |   2 +
 .../server/MailQueueTaskSerializationModule.java   |  57 +++
 .../server/MailRepositoriesRoutesModule.java   |   2 +
 .../MailRepositoryTaskSerializationModule.java |  71 +++
 24 files changed, 739 insertions(+), 507 deletions(-)

diff --git 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
index 8ecdf1a..167bb2e 100644
--- 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
+++ 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
@@ -24,6 +24,7 @@ import java.util.Set;
 import org.apache.james.eventsourcing.eventstore.cassandra.EventNestedTypes;
 import org.apache.james.json.DTOModule;
 import org.apache.james.modules.BlobExportMechanismModule;
+import org.apache.james.modules.CassandraConsistencyTaskSerializationModule;
 import org.apache.james.modules.MailboxModule;
 import org.apache.james.modules.activemq.ActiveMQQueueModule;
 import org.apache.james.modules.data.CassandraDLPConfigurationStoreModule;
@@ -139,6 +140,7 @@ public class CassandraJamesServerMain implements 
JamesServerMain {
 CASSANDRA_EVENT_STORE_JSON_SERIALIZATION_DEFAULT_MODULE);
 
 public static final Module CASSANDRA_MAILBOX_MODULE = Modules.combine(
+new CassandraConsistencyTaskSerializationModule(),
 new CassandraMailboxModule(),
 new CassandraDeletedMessageVaultModule(),
 new ElasticSearchClientModule(),
diff --git 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/CassandraConsistencyTaskSerializationModule.java
 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/CassandraConsistencyTaskSerializationModule.java
new file mode 100644
index 000..2b565c2
--- /dev/null
+++ 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/CassandraConsistencyTaskSerializationModule.java
@@ -0,0 +1,110 @@
+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *
+ * KIND, either express or implied.  See the License for the*
+ * specific language governing permissions and limitations  *
+ * under the License.   *
+ 

[james-project] 01/17: JAMES-3150 Add ScalaCheck for the garbadge collector

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 0769feee3aa2c89ca70bf0ccfccf5bb03d1409be
Author: Matthieu Baechler 
AuthorDate: Thu Feb 27 11:24:20 2020 +0100

JAMES-3150 Add ScalaCheck for the garbadge collector
---
 gc-properties.adoc |  23 +
 server/blob/blob-deduplicating/pom.xml | 106 
 .../src/test/scala/GCPropertiesTest.scala  | 107 +
 server/blob/pom.xml|   1 +
 4 files changed, 237 insertions(+)

diff --git a/gc-properties.adoc b/gc-properties.adoc
new file mode 100644
index 000..7c69c01
--- /dev/null
+++ b/gc-properties.adoc
@@ -0,0 +1,23 @@
+= GC properties
+
+1. the execution time of the GC should be linked to
+active dataset but not to global dataset
+(for scalability purpose)
+
+2. GC should run on live dataset
+
+ 2.1. GC should not delete data being referenced by a pending process or
+still referenced
+
+ 2.2. GC should be idempotent: 2 concurrent or sequential runs should
+not have a different outcome than a single one
+
+3. GC should remove data from the underlying store
+
+ 3.1. an unreferenced piece of data should be removed after 1 day
+
+ 3.2. less than 10% of unreferenced data of a significant dataset
+should persist after three GC executions
+
+4. GC should report what it does
+
diff --git a/server/blob/blob-deduplicating/pom.xml 
b/server/blob/blob-deduplicating/pom.xml
new file mode 100644
index 000..e849535
--- /dev/null
+++ b/server/blob/blob-deduplicating/pom.xml
@@ -0,0 +1,106 @@
+
+
+http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+4.0.0
+
+
+james-server-blob
+org.apache.james
+3.5.0-SNAPSHOT
+../pom.xml
+
+
+blob-deduplicating
+jar
+
+Apache James :: Server :: Blob :: Deduplicating Blob Storage
+
+An implementation of BlobStore which deduplicate the stored blobs and 
use a garbage collector
+to ensure their effective deletion.
+
+
+
+
+${james.groupId}
+blob-api
+
+
+${james.groupId}
+blob-api
+test-jar
+test
+
+
+${james.groupId}
+blob-memory
+test
+
+
+${james.groupId}
+james-server-testing
+test
+
+
+${james.groupId}
+james-server-util
+
+
+${james.groupId}
+testing-base
+test
+
+
+org.scala-lang
+scala-library
+
+
+org.scala-lang.modules
+scala-java8-compat_${scala.base}
+
+
+org.scalactic
+scalactic_2.13
+3.1.1
+test
+
+
+org.scalatest
+scalatest_2.13
+3.1.1
+test
+
+
+org.scalacheck
+scalacheck_2.13
+1.14.3
+test
+
+
+
+
+
+
+net.alchim31.maven
+scala-maven-plugin
+
+
+
+
+
diff --git 
a/server/blob/blob-deduplicating/src/test/scala/GCPropertiesTest.scala 
b/server/blob/blob-deduplicating/src/test/scala/GCPropertiesTest.scala
new file mode 100644
index 000..5de3f44
--- /dev/null
+++ b/server/blob/blob-deduplicating/src/test/scala/GCPropertiesTest.scala
@@ -0,0 +1,107 @@
+import org.apache.james.blob.api.{BlobId, TestBlobId}
+import org.scalacheck.Gen
+import org.scalatest.funsuite.AnyFunSuite
+
+case class Generation(id: Long)
+case class Iteration(id: Long)
+case class ExternalID(id: String) // TODO
+
+sealed trait Event
+case class Reference(externalId: ExternalID, blobId: BlobId, generation: 
Generation) extends Event
+case class Deletion(generation: Generation, reference: Reference) extends Event
+
+case class Report(iteration: Iteration,
+  blobsToDelete: Set[(Generation, BlobId)]
+ )
+
+object Generators {
+
+  val smallInteger = Gen.choose(0L,100L)
+  var current = 0;
+  val generationsGen: Gen[LazyList[Generation]] = 
Gen.infiniteLazyList(Gen.frequency((90, Gen.const(0)), (9, Gen.const(1)), (1, 
Gen.const(2
+.map(list => list.scanLeft(0)(_ + _))
+.map(list => list.map(_.toLong).map(Generation.apply))
+
+  val iterationGen = smallInteger.map(Iteration.apply)
+
+  val blobIdFactory = new TestBlobId.Factory
+
+  def blobIdGen(generation: Generation) : Gen[BlobId] = Gen.uuid.map(uuid =>
+blobIdFactory.from(s"${generation}_$uuid"))
+
+  val externalIDGen = Gen.uuid.map(uuid

[james-project] 12/17: JAMES-3204 additionalInformation.failures should be renamed to messageFailures

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit a4625e1666ecbb481f7b75f804b13946653374fa
Author: Benoit Tellier 
AuthorDate: Wed Jun 10 13:43:55 2020 +0700

JAMES-3204 additionalInformation.failures should be renamed to 
messageFailures

This avoids confusions with additionalInformation.mailboxFailures
---
 .../RabbitMQWebAdminServerTaskSerializationIntegrationTest.java   | 8 
 .../webadmin/dto/WebAdminReprocessingContextInformationDTO.java   | 2 +-
 ...bAdminSingleMailboxReindexingTaskAdditionalInformationDTO.java | 4 ++--
 .../dto/WebAdminUserReindexingTaskAdditionalInformationDTO.java   | 4 ++--
 .../dto/WebAdminReprocessingContextInformationDTOTest.java| 4 ++--
 .../webadmin/dto/WebAdminSingleMailboxReprocessingDTOTest.java| 3 +--
 .../james/webadmin/dto/WebAdminUserReprocessingDTOTest.java   | 4 +---
 .../org/apache/james/webadmin/routes/MailboxesRoutesTest.java | 6 +++---
 .../org/apache/james/webadmin/routes/UserMailboxesRoutesTest.java | 2 +-
 src/site/markdown/server/manage-webadmin.md   | 8 
 10 files changed, 21 insertions(+), 24 deletions(-)

diff --git 
a/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQWebAdminServerTaskSerializationIntegrationTest.java
 
b/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQWebAdminServerTaskSerializationIntegrationTest.java
index 0c165d2..753f992 100644
--- 
a/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQWebAdminServerTaskSerializationIntegrationTest.java
+++ 
b/server/protocols/webadmin-integration-test/distributed-webadmin-integration-test/src/test/java/org/apache/james/webadmin/integration/rabbitmq/RabbitMQWebAdminServerTaskSerializationIntegrationTest.java
@@ -148,7 +148,7 @@ class 
RabbitMQWebAdminServerTaskSerializationIntegrationTest {
 .body("type", is("full-reindexing"))
 .body("additionalInformation.successfullyReprocessedMailCount", 
is(0))
 .body("additionalInformation.failedReprocessedMailCount", is(0))
-.body("additionalInformation.failures", is(anEmptyMap()));
+.body("additionalInformation.messageFailures", is(anEmptyMap()));
 }
 
 @Test
@@ -338,7 +338,7 @@ class 
RabbitMQWebAdminServerTaskSerializationIntegrationTest {
 .body("additionalInformation.successfullyReprocessedMailCount", 
is(0))
 .body("additionalInformation.failedReprocessedMailCount", is(0))
 .body("additionalInformation.username", is(USERNAME))
-.body("additionalInformation.failures", is(anEmptyMap()));
+.body("additionalInformation.messageFailures", is(anEmptyMap()));
 }
 
 @Test
@@ -438,7 +438,7 @@ class 
RabbitMQWebAdminServerTaskSerializationIntegrationTest {
 .body("type", is("error-recovery-indexation"))
 .body("additionalInformation.successfullyReprocessedMailCount", 
is(0))
 .body("additionalInformation.failedReprocessedMailCount", is(0))
-.body("additionalInformation.failures", is(anEmptyMap()));
+.body("additionalInformation.messageFailures", is(anEmptyMap()));
 }
 
 @Test
@@ -669,7 +669,7 @@ class 
RabbitMQWebAdminServerTaskSerializationIntegrationTest {
 .body("additionalInformation.successfullyReprocessedMailCount", 
is(0))
 .body("additionalInformation.failedReprocessedMailCount", is(0))
 .body("additionalInformation.mailboxId", is(mailboxId.serialize()))
-.body("additionalInformation.failures", is(anEmptyMap()));
+.body("additionalInformation.messageFailures", is(anEmptyMap()));
 }
 
 @Test
diff --git 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminReprocessingContextInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminReprocessingContextInformationDTO.java
index 1b43b3e..124fec3 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminReprocessingContextInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminReprocessingContextInformationDTO.java
@@ -110,7 +110,7 @@ public class WebAdminReprocessingContextInformationDTO 
implements AdditionalInfo
 return failedReprocessedMailCount;
 }
 
-public SerializableReIndexingExecutionFailures getFailures() {
+public SerializableReIndexingExecutionFailures getMessageFailures() {
 return messageFa

[james-project] 05/17: JAMES-3194 Remove Jackson annotations from AdditionalInformation

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 4d529f74497b42c10247f8f6f651a2d658b42409
Author: Benoit Tellier 
AuthorDate: Mon May 18 13:33:56 2020 +0700

JAMES-3194 Remove Jackson annotations from AdditionalInformation
---
 .../cassandra/mail/task/RecomputeMailboxCountersTask.java| 3 ---
 .../cassandra/mail/task/SolveMailboxInconsistenciesTask.java | 6 --
 .../cassandra/mail/task/SolveMessageInconsistenciesTask.java | 9 -
 .../mailbox/tools/indexer/ReprocessingContextInformation.java| 3 ---
 .../james/mailbox/quota/task/RecomputeCurrentQuotasTask.java | 3 ---
 .../EventDeadLettersRedeliveryTaskAdditionalInformation.java | 4 
 6 files changed, 28 deletions(-)

diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/RecomputeMailboxCountersTask.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/RecomputeMailboxCountersTask.java
index c93e1ea..e7433de 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/RecomputeMailboxCountersTask.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/RecomputeMailboxCountersTask.java
@@ -32,7 +32,6 @@ import org.apache.james.task.TaskType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.collect.ImmutableList;
 
@@ -58,12 +57,10 @@ public class RecomputeMailboxCountersTask implements Task {
 return instant;
 }
 
-@JsonProperty("processedMailboxes")
 long getProcessedMailboxes() {
 return processedMailboxes;
 }
 
-@JsonProperty("failedMailboxes")
 ImmutableList getFailedMailboxes() {
 return failedMailboxes;
 }
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMailboxInconsistenciesTask.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMailboxInconsistenciesTask.java
index 2139d25..d68b800 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMailboxInconsistenciesTask.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMailboxInconsistenciesTask.java
@@ -30,7 +30,6 @@ import org.apache.james.task.TaskType;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.collect.ImmutableList;
 
@@ -62,27 +61,22 @@ public class SolveMailboxInconsistenciesTask implements 
Task {
 return instant;
 }
 
-@JsonProperty("processedMailboxEntries")
 long getProcessedMailboxEntries() {
 return processedMailboxEntries;
 }
 
-@JsonProperty("processedMailboxPathEntries")
 long getProcessedMailboxPathEntries() {
 return processedMailboxPathEntries;
 }
 
-@JsonProperty("fixedInconsistencies")
 ImmutableList getFixedInconsistencies() {
 return fixedInconsistencies;
 }
 
-@JsonProperty("conflictingEntries")
 ImmutableList getConflictingEntries() {
 return conflictingEntries;
 }
 
-@JsonProperty("errors")
 long getErrors() {
 return errors;
 }
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMessageInconsistenciesTask.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMessageInconsistenciesTask.java
index c56b8b3..d85805d 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMessageInconsistenciesTask.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/task/SolveMessageInconsistenciesTask.java
@@ -31,7 +31,6 @@ import org.apache.james.task.Task;
 import org.apache.james.task.TaskExecutionDetails;
 import org.apache.james.task.TaskType;
 
-import com.fasterxml.jackson.annotation.JsonProperty;
 import com.github.steveash.guavate.Guavate;
 import com.google.common.collect.ImmutableList;
 
@@ -69,42 +68,34 @@ public class SolveMessageInconsistenciesTask implements 
Task {
 return instant;
 }
 
-@JsonProperty("processedImapUidEntries")
 public long getProcessedImapUidEntries() {
 return processedImapUidEntries;
 }
 
-@JsonProperty("processedMessageIdEntries")
 public long getProcessedMessageIdEntries() {
 return processedMessageIdEntries;
 }
 
-@JsonProperty("addedMessageIdEntries")
 public long ge

[james-project] 06/17: JAMES-3194 Leverage named injection to uncouple storage and presentation DTOs for additional tasks

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 76ffc2106c1f4ed4c5275d91e04bcfbb8464d048
Author: Benoit Tellier 
AuthorDate: Mon Jun 1 16:09:49 2020 +0700

JAMES-3194 Leverage named injection to uncouple storage and presentation 
DTOs for additional tasks
---
 .../org/apache/james/CassandraJamesServerMain.java |  2 +
 ...assandraConsistencyTaskSerializationModule.java | 39 
 .../java/org/apache/james/JPAJamesServerMain.java  |  4 +-
 .../vault/VaultTaskSerializationModule.java| 28 +
 .../server/JmapTaskSerializationModule.java| 14 +
 .../WebAdminReIndexingTaskSerializationModule.java | 73 ++
 ...badminMailboxExportTaskSerializationModule.java |  8 +++
 .../WebadminMailboxTaskSerializationModule.java| 26 
 .../server/MailQueueTaskSerializationModule.java   | 15 +
 .../MailRepositoryTaskSerializationModule.java | 21 +++
 .../james/modules/server/TaskRoutesModule.java | 19 ++
 .../james/webadmin/dto/DTOModuleInjections.java}   | 19 +-
 .../apache/james/webadmin/routes/TasksRoutes.java  |  5 +-
 .../WebAdminReprocessingContextInformationDTO.java | 29 ++---
 ...lboxReindexingTaskAdditionalInformationDTO.java | 26 
 ...UserReindexingTaskAdditionalInformationDTO.java | 21 ---
 ...AdminReprocessingContextInformationDTOTest.java | 23 +--
 .../WebAdminSingleMailboxReprocessingDTOTest.java  | 15 -
 .../dto/WebAdminUserReprocessingDTOTest.java   | 17 +++--
 19 files changed, 346 insertions(+), 58 deletions(-)

diff --git 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
index 167bb2e..2c2e189 100644
--- 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
+++ 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java
@@ -69,6 +69,7 @@ import org.apache.james.modules.server.ReIndexingModule;
 import org.apache.james.modules.server.SieveRoutesModule;
 import org.apache.james.modules.server.SwaggerRoutesModule;
 import org.apache.james.modules.server.TaskManagerModule;
+import 
org.apache.james.modules.server.WebAdminReIndexingTaskSerializationModule;
 import org.apache.james.modules.server.WebAdminServerModule;
 import org.apache.james.modules.spamassassin.SpamAssassinListenerModule;
 import org.apache.james.modules.vault.DeletedMessageVaultRoutesModule;
@@ -100,6 +101,7 @@ public class CassandraJamesServerMain implements 
JamesServerMain {
 new SieveRoutesModule(),
 new SwaggerRoutesModule(),
 new WebAdminServerModule(),
+new WebAdminReIndexingTaskSerializationModule(),
 new MessagesRoutesModule());
 
 public static final Module PROTOCOLS = Modules.combine(
diff --git 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/CassandraConsistencyTaskSerializationModule.java
 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/CassandraConsistencyTaskSerializationModule.java
index 2b565c2..7c1546b 100644
--- 
a/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/CassandraConsistencyTaskSerializationModule.java
+++ 
b/server/container/guice/cassandra-guice/src/main/java/org/apache/james/modules/CassandraConsistencyTaskSerializationModule.java
@@ -42,10 +42,13 @@ import org.apache.james.server.task.json.dto.TaskDTO;
 import org.apache.james.server.task.json.dto.TaskDTOModule;
 import org.apache.james.task.Task;
 import org.apache.james.task.TaskExecutionDetails;
+import org.apache.james.webadmin.dto.DTOModuleInjections;
+import 
org.apache.james.webadmin.dto.WebAdminMigrationTaskAdditionalInformationDTO;
 import 
org.apache.james.webadmin.service.CassandraMappingsSolveInconsistenciesTask;
 
 import com.google.inject.AbstractModule;
 import com.google.inject.multibindings.ProvidesIntoSet;
+import com.google.inject.name.Named;
 
 public class CassandraConsistencyTaskSerializationModule extends 
AbstractModule {
 @ProvidesIntoSet
@@ -83,28 +86,64 @@ public class CassandraConsistencyTaskSerializationModule 
extends AbstractModule
 return 
MappingsSourcesMigrationTaskAdditionalInformationDTO.serializationModule(CassandraMappingsSolveInconsistenciesTask.TYPE);
 }
 
+@Named(DTOModuleInjections.WEBADMIN_DTO)
+@ProvidesIntoSet
+public AdditionalInformationDTOModule 
webAdminCassandraMappingsSolveInconsistenciesAdditionalInformation() {
+return 
MappingsSourcesMigrationTaskAdditionalInformationDTO.serializationModule(CassandraMappingsSolveInconsistenciesTask.TYPE);
+}
+
 @ProvidesIntoSet
 public AdditionalInformationDTOModule mailboxMergingAdditionalInformat

[james-project] 07/17: JAMES-3194 Add missing licenses

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 48baa237fa420fc6fa7ee8068de076d2d307a590
Author: Benoit Tellier 
AuthorDate: Tue Jun 2 11:02:20 2020 +0700

JAMES-3194 Add missing licenses
---
 ...ailsFromMailQueueTaskAdditionalInformationDTO.java | 19 +++
 .../service/DeleteMailsFromMailQueueTaskDTO.java  | 19 +++
 ...ailsFromMailQueueTaskAdditionalInformationDTO.java | 19 +++
 3 files changed, 57 insertions(+)

diff --git 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
index a35c65f..077c1df 100644
--- 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
@@ -1,3 +1,22 @@
+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *
+ * KIND, either express or implied.  See the License for the*
+ * specific language governing permissions and limitations  *
+ * under the License.   *
+ /
+
 package org.apache.james.webadmin.service;
 
 import java.time.Instant;
diff --git 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskDTO.java
 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskDTO.java
index fc30ab9..54f3287 100644
--- 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/DeleteMailsFromMailQueueTaskDTO.java
@@ -1,3 +1,22 @@
+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *
+ * KIND, either express or implied.  See the License for the*
+ * specific language governing permissions and limitations  *
+ * under the License.   *
+ /
+
 package org.apache.james.webadmin.service;
 
 import java.util.Optional;
diff --git 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/WebAdminDeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/WebAdminDeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
index dd62fdb..fbd858e 100644
--- 
a/server/protocols/webadmin/webadmin-mailqueue/src/main/java/org/apache/james/webadmin/service/WebAdminDeleteMailsFromMailQueueTaskAdditionalInformationDTO.java
+++ 
b/se

[james-project] branch master updated (9b9a07f -> db80c6c)

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git.


from 9b9a07f  JAMES-3201 Vavr Either adoption
 new 0769fee  JAMES-3150 Add ScalaCheck for the garbadge collector
 new 58a8c25  JAMES-3150 Add the first garbadge collection properties
 new d2d2e86  JAMES-3194 Rely on DTOConverter in TaskRoute
 new 7c1adec  JAMES-3194 Inject DTOConverter for every product
 new 4d529f7  JAMES-3194 Remove Jackson annotations from 
AdditionalInformation
 new 76ffc21  JAMES-3194 Leverage named injection to uncouple storage and 
presentation DTOs for additional tasks
 new 48baa23  JAMES-3194 Add missing licenses
 new e6ae7eb  JAMES-3194 Homogeneous naming for Additional Information 
serialization modules
 new c9b0a70  JAMES-3194 Rename SingleMailboxReindexingTask TYPE
 new 24e6833  JAMES-3201 Add missign tests for ReIndexing tasks 
mailboxFailures
 new 36fcc9f  JAMES-3201 Document mailboxFailures for ReIndexing tasks
 new a4625e1  JAMES-3204 additionalInformation.failures should be renamed 
to messageFailures
 new 8f86732  JAMES-3182 Detail filter visit algorithm in method name
 new c4b95da  JAMES-3204 Allow recording executed Cassandra statements
 new 3781196  JAMES-3204 Demonstrate CassandraMessageMapper partially 
applies limit
 new 4c093a4  JAMES-3204 Flatten reactive calls in 
CassandraMailboxMapper::findInMailboxReactive
 new db80c6c  JAMES-3204 Push limit to Cassandra backend when reading 
messages

The 17 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../MigrationTaskAdditionalInformationDTO.java |   2 +-
 .../james/backends/cassandra/CassandraCluster.java |   4 +-
 .../cassandra/CassandraClusterExtension.java   |   2 +-
 .../backends/cassandra/StatementRecorder.java  |  30 +-
 .../james/backends/cassandra/TestingSession.java   |  23 +
 .../backends/cassandra/TestingSessionTest.java |  42 ++
 .../migration/MigrationTaskSerializationTest.java  |   2 +-
 .../mailbox/cassandra/DeleteMessageListener.java   |   3 +-
 .../cassandra/mail/CassandraMessageIdDAO.java  |  95 +++--
 .../cassandra/mail/CassandraMessageMapper.java |  13 +-
 ...MailboxMergingTaskAdditionalInformationDTO.java |   6 +-
 .../mail/task/MailboxMergingTaskRunner.java|   3 +-
 .../mail/task/RecomputeMailboxCountersService.java |   3 +-
 .../mail/task/RecomputeMailboxCountersTask.java|   3 -
 ...ailboxCountersTaskAdditionalInformationDTO.java |   6 +-
 .../mail/task/SolveMailboxInconsistenciesTask.java |   6 -
 ...nconsistenciesTaskAdditionalInformationDTO.java |   7 +-
 .../mail/task/SolveMessageInconsistenciesTask.java |   9 -
 ...nconsistenciesTaskAdditionalInformationDTO.java |   6 +-
 .../cassandra/CassandraMailboxManagerTest.java |  15 +-
 .../cassandra/mail/CassandraMessageIdDAOTest.java  | 111 -
 .../mail/CassandraMessageIdMapperTest.java |   9 +-
 .../cassandra/mail/CassandraMessageMapperTest.java |  51 ++-
 .../mail/task/MailboxMergingTaskTest.java  |   2 +-
 ...omputeMailboxCountersTaskSerializationTest.java |   2 +-
 ...ailboxInconsistenciesTaskSerializationTest.java |   2 +-
 ...essageInconsistenciesTaskSerializationTest.java |   4 +-
 ...bageCollectionTaskAdditionalInformationDTO.java |   9 +
 ...aultGarbageCollectionTaskSerializationTest.java |   2 +-
 ...geIdReindexingTaskAdditionalInformationDTO.java |   2 +-
 .../indexer/ReprocessingContextInformation.java|   9 -
 .../indexer/ReprocessingContextInformationDTO.java |  11 +-
 .../tools/indexer/SingleMailboxReindexingTask.java |   9 +-
 ...lboxReindexingTaskAdditionalInformationDTO.java |   4 +-
 .../indexer/SingleMailboxReindexingTaskDTO.java|   2 +-
 ...sageReindexingTaskAdditionalInformationDTO.java |   2 +-
 .../mailbox/tools/indexer/UserReindexingTask.java  |   5 +-
 ...UserReindexingTaskAdditionalInformationDTO.java |   2 +-
 ...rorRecoveryIndexationTaskSerializationTest.java |   4 +-
 .../FullReindexingTaskSerializationTest.java   |   4 +-
 .../MessageIdReindexingTaskSerializationTest.java  |   2 +-
 ...ngleMailboxReindexingTaskSerializationTest.java |   4 +-
 ...ngleMessageReindexingTaskSerializationTest.java |   2 +-
 .../UserReindexingTaskSerializationTest.java   |   4 +-
 .../quota/task/RecomputeCurrentQuotasTask.java |   3 -
 ...eCurrentQuotasTaskAdditionalInformationDTO.java |   6 +-
 ...ecomputeCurrentQuotasTaskSerializationTest.java |   4 +-
 pom.xml|  10 +
 .../blob/blob-deduplicating/doc/gc-properties.adoc |  23 +
 .../blob-deduplicating}/pom.xml|  59 ++-
 .../james/server/blob/deduplication/GC.scala   | 187 
 .../blob/deduplicati

[james-project] 03/17: JAMES-3194 Rely on DTOConverter in TaskRoute

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit d2d2e869fc53273a0f37853033cd7df57f2ca55d
Author: Benoit Tellier 
AuthorDate: Mon Jun 1 15:48:08 2020 +0700

JAMES-3194 Rely on DTOConverter in TaskRoute
---
 .../indexer/ReprocessingContextInformation.java|   6 --
 .../indexer/ReprocessingContextInformationDTO.java |   7 +-
 .../tools/indexer/SingleMailboxReindexingTask.java |   5 +-
 .../mailbox/tools/indexer/UserReindexingTask.java  |   5 +-
 .../routes/CassandraMappingsRoutesTest.java|   5 +-
 .../protocols/webadmin/webadmin-cassandra/pom.xml  |  11 ++
 ...AdminMigrationTaskAdditionalInformationDTO.java |  66 
 .../WebAdminMigrationTaskSerializationTest.java|  40 +++
 .../routes/CassandraMigrationRoutesTest.java   |   6 +-
 ...lveMessageInconsistenciesRequestToTaskTest.java |   4 +-
 server/protocols/webadmin/webadmin-core/pom.xml|   4 +
 .../james/webadmin/dto/ExecutionDetailsDto.java|  24 +++--
 .../apache/james/webadmin/routes/TasksRoutes.java  |  13 ++-
 .../james/webadmin/routes/TasksRoutesTest.java |   6 +-
 ...llFastViewProjectionItemsRequestToTaskTest.java |   4 +-
 ...erFastViewProjectionItemsRequestToTaskTest.java |   4 +-
 ...gesVaultDeleteTaskAdditionalInformationDTO.java |  74 +
 ...esVaultRestoreTaskAdditionalInformationDTO.java | 101 ++
 .../routes/DeletedMessagesVaultRoutesTest.java |   9 +-
 ...edMessagesVaultDeleteTaskSerializationTest.java |  44 
 ...dMessagesVaultRestoreTaskSerializationTest.java |  41 
 server/protocols/webadmin/webadmin-mailbox/pom.xml |   1 -
 .../SerializableReIndexingExecutionFailures.java   |   2 +-
 .../WebAdminReprocessingContextInformationDTO.java | 116 +
 ...lboxReindexingTaskAdditionalInformationDTO.java |  94 +
 ...UserReindexingTaskAdditionalInformationDTO.java |  93 +
 ...erializableReIndexingExecutionFailuresTest.java |   2 +-
 ...AdminReprocessingContextInformationDTOTest.java | 111 
 .../WebAdminSingleMailboxReprocessingDTOTest.java  |  82 +++
 .../dto/WebAdminUserReprocessingDTOTest.java   |  83 +++
 .../routes/EventDeadLettersRoutesTest.java |   9 +-
 .../routes/MailboxesRoutesNoTasksTest.java |   3 +-
 .../james/webadmin/routes/MailboxesRoutesTest.java |  17 ++-
 .../james/webadmin/routes/MessageRoutesTest.java   |   6 +-
 .../UserMailboxesRoutesNoIndexationTest.java   |   3 +-
 .../webadmin/routes/UserMailboxesRoutesTest.java   |  17 +--
 .../routes/WebAdminQuotaSearchTestSystem.java  |   5 +-
 .../service/MailboxesExportRequestToTaskTest.java  |   4 +-
 ...sFromMailQueueTaskAdditionalInformationDTO.java | 110 +++
 .../james/webadmin/routes/MailQueueRoutesTest.java |   8 +-
 ...mMailQueueTaskAdditionalInformationDTOTest.java |  51 +
 ...MailRepositoryTaskAdditionalInformationDTO.java |  88 
 .../routes/MailRepositoriesRoutesTest.java |  10 +-
 .../WebAdminClearMailRepositoryTaskDTOTest.java|  44 
 src/site/markdown/server/manage-webadmin.md|  51 -
 45 files changed, 1417 insertions(+), 72 deletions(-)

diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformation.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformation.java
index c2927c9..2517c07 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformation.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformation.java
@@ -27,7 +27,6 @@ import 
org.apache.james.mailbox.indexer.ReIndexingExecutionFailures;
 import org.apache.james.task.TaskExecutionDetails;
 
 import com.fasterxml.jackson.annotation.JsonIgnore;
-import com.fasterxml.jackson.annotation.JsonProperty;
 
 public class ReprocessingContextInformation implements 
TaskExecutionDetails.AdditionalInformation, IndexingDetailInformation {
 
@@ -62,11 +61,6 @@ public class ReprocessingContextInformation implements 
TaskExecutionDetails.Addi
 return failures;
 }
 
-@JsonProperty("failures")
-public SerializableReIndexingExecutionFailures failuresAsJson() {
-return SerializableReIndexingExecutionFailures.from(failures());
-}
-
 @Override
 public Instant timestamp() {
 return timestamp;
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformationDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformationDTO.java
index 714599d..363cc42 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/ReprocessingContextInformationDTO.java
+++ 
b/

[james-project] 17/17: JAMES-3204 Push limit to Cassandra backend when reading messages

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit db80c6c29de11e37f79493844e665b190bb375db
Author: Benoit Tellier 
AuthorDate: Mon Jun 8 14:52:24 2020 +0700

JAMES-3204 Push limit to Cassandra backend when reading messages
---
 .../mailbox/cassandra/DeleteMessageListener.java   |   3 +-
 .../cassandra/mail/CassandraMessageIdDAO.java  |  95 +-
 .../cassandra/mail/CassandraMessageMapper.java |   9 +-
 .../mail/task/MailboxMergingTaskRunner.java|   3 +-
 .../mail/task/RecomputeMailboxCountersService.java |   3 +-
 .../cassandra/CassandraMailboxManagerTest.java |  15 +--
 .../cassandra/mail/CassandraMessageIdDAOTest.java  | 111 -
 .../mail/CassandraMessageIdMapperTest.java |   9 +-
 .../cassandra/mail/CassandraMessageMapperTest.java |  11 +-
 .../java/org/apache/james/util/streams/Limit.java  |   4 +
 10 files changed, 211 insertions(+), 52 deletions(-)

diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java
index 53b1d2e..e3d2eab 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/DeleteMessageListener.java
@@ -51,6 +51,7 @@ import org.apache.james.mailbox.model.MailboxACL;
 import org.apache.james.mailbox.model.MessageMetaData;
 import org.apache.james.mailbox.model.MessageRange;
 import org.apache.james.mailbox.store.mail.MessageMapper;
+import org.apache.james.util.streams.Limit;
 
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
@@ -137,7 +138,7 @@ public class DeleteMessageListener implements 
MailboxListener.GroupMailboxListen
 }
 
 private Mono handleMailboxDeletion(CassandraId mailboxId) {
-return messageIdDAO.retrieveMessages(mailboxId, MessageRange.all())
+return messageIdDAO.retrieveMessages(mailboxId, MessageRange.all(), 
Limit.unlimited())
 .map(ComposedMessageIdWithMetaData::getComposedMessageId)
 .concatMap(metadata -> 
handleMessageDeletionAsPartOfMailboxDeletion((CassandraMessageId) 
metadata.getMessageId(), mailboxId)
 .then(imapUidDAO.delete((CassandraMessageId) 
metadata.getMessageId(), mailboxId))
diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdDAO.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdDAO.java
index d15e121..82beedf 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdDAO.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageIdDAO.java
@@ -57,6 +57,7 @@ import 
org.apache.james.mailbox.cassandra.ids.CassandraMessageId.Factory;
 import org.apache.james.mailbox.model.ComposedMessageId;
 import org.apache.james.mailbox.model.ComposedMessageIdWithMetaData;
 import org.apache.james.mailbox.model.MessageRange;
+import org.apache.james.util.streams.Limit;
 
 import com.datastax.driver.core.PreparedStatement;
 import com.datastax.driver.core.Row;
@@ -71,6 +72,7 @@ public class CassandraMessageIdDAO {
 
 private static final String IMAP_UID_GTE = IMAP_UID + "_GTE";
 private static final String IMAP_UID_LTE = IMAP_UID + "_LTE";
+public static final String LIMIT = "LIMIT_BIND_MARKER";
 
 private final CassandraAsyncExecutor cassandraAsyncExecutor;
 private final Factory messageIdFactory;
@@ -78,8 +80,11 @@ public class CassandraMessageIdDAO {
 private final PreparedStatement insert;
 private final PreparedStatement select;
 private final PreparedStatement selectAllUids;
+private final PreparedStatement selectAllUidsLimited;
 private final PreparedStatement selectUidGte;
+private final PreparedStatement selectUidGteLimited;
 private final PreparedStatement selectUidRange;
+private final PreparedStatement selectUidRangeLimited;
 private final PreparedStatement update;
 private final PreparedStatement listStatement;
 
@@ -92,8 +97,11 @@ public class CassandraMessageIdDAO {
 this.update = prepareUpdate(session);
 this.select = prepareSelect(session);
 this.selectAllUids = prepareSelectAllUids(session);
+this.selectAllUidsLimited = prepareSelectAllUidsLimited(session);
 this.selectUidGte = prepareSelectUidGte(session);
+this.selectUidGteLimited = prepareSelectUidGteLimited(session);
 this.selectUidRange = prepareSelectUidRange(session);
+this.selectUidRangeLimited = prepareSelectUidRangeLimited(session);
 this.listStatement = prepareList(session);
 }
 
@@ -144,8 +152,15 @@ public class CassandraM

[james-project] 10/17: JAMES-3201 Add missign tests for ReIndexing tasks mailboxFailures

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 24e68333b4e4d90648ea184bc8aff79b1a2a8e33
Author: Benoit Tellier 
AuthorDate: Wed Jun 10 13:37:46 2020 +0700

JAMES-3201 Add missign tests for ReIndexing tasks mailboxFailures
---
 .../james/webadmin/routes/MailboxesRoutesTest.java | 81 ++
 .../webadmin/routes/UserMailboxesRoutesTest.java   | 25 +++
 2 files changed, 106 insertions(+)

diff --git 
a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/MailboxesRoutesTest.java
 
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/MailboxesRoutesTest.java
index dfb5867..e9ce823 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/MailboxesRoutesTest.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox/src/test/java/org/apache/james/webadmin/routes/MailboxesRoutesTest.java
@@ -63,6 +63,7 @@ import 
org.apache.mailbox.tools.indexer.SingleMailboxReindexingTask;
 import org.apache.mailbox.tools.indexer.SingleMessageReindexingTask;
 import 
org.apache.mailbox.tools.indexer.SingleMessageReindexingTaskAdditionalInformationDTO;
 import org.eclipse.jetty.http.HttpStatus;
+import org.hamcrest.Matchers;
 import org.junit.jupiter.api.AfterEach;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Nested;
@@ -246,6 +247,30 @@ class MailboxesRoutesTest {
 .body("startedDate", is(notNullValue()))
 .body("submitDate", is(notNullValue()));
 }
+
+@Test
+void 
userReprocessingShouldReturnTaskDetailsWhenFailingAtTheMailboxLevel() throws 
Exception {
+MailboxSession systemSession = 
mailboxManager.createSystemSession(USERNAME);
+MailboxId mailboxId = mailboxManager.createMailbox(INBOX, 
systemSession).get();
+
+doReturn(Mono.error(new RuntimeException()))
+.when(searchIndex)
+.deleteAll(any(MailboxSession.class), 
any(MailboxId.class));
+
+String taskId = with()
+.post("/mailboxes?task=reIndex")
+.jsonPath()
+.get("taskId");
+
+given()
+.basePath(TasksRoutes.BASE)
+.when()
+.get(taskId + "/await")
+.then()
+.body("status", Matchers.is("failed"))
+.body("taskId", Matchers.is(notNullValue()))
+.body("additionalInformation.mailboxFailures", 
Matchers.containsInAnyOrder(mailboxId.serialize()));
+}
 }
 
 @Nested
@@ -435,6 +460,31 @@ class MailboxesRoutesTest {
 .body("startedDate", is(notNullValue()))
 .body("submitDate", is(notNullValue()));
 }
+
+@Test
+void 
userReprocessingShouldReturnTaskDetailsWhenFailingAtTheMailboxLevel() throws 
Exception {
+MailboxSession systemSession = 
mailboxManager.createSystemSession(USERNAME);
+MailboxId mailboxId = mailboxManager.createMailbox(INBOX, 
systemSession).get();
+
+doReturn(Mono.error(new RuntimeException()))
+.when(searchIndex)
+.deleteAll(any(MailboxSession.class), 
any(MailboxId.class));
+
+String taskId = with()
+.queryParam("task", "reIndex")
+.post("/mailboxes/" + mailboxId.serialize())
+.jsonPath()
+.get("taskId");
+
+given()
+.basePath(TasksRoutes.BASE)
+.when()
+.get(taskId + "/await")
+.then()
+.body("status", Matchers.is("failed"))
+.body("taskId", Matchers.is(notNullValue()))
+.body("additionalInformation.mailboxFailures", 
Matchers.containsInAnyOrder(mailboxId.serialize()));
+}
 }
 
 @Nested
@@ -831,6 +881,37 @@ class MailboxesRoutesTest {
 .body("startedDate", is(notNullValue()))
 .body("submitDate", is(notNullValue()));
 }
+
+@Test
+void 
userReprocessingShouldReturnTaskDetailsWhenFailingAtTheMailboxLevel() throws 
Exception {
+MailboxSession systemSession = 
mailboxManager.createSystemSession(USERNAME);
+MailboxId mailboxId = mailboxManager.createMailbox(INBOX, 
systemSession).get();
+
+doReturn(Mono.error(new RuntimeException()))
+.when(searchIndex)
+.deleteAll(any(MailboxSession.class), 
any(MailboxId.class));
+
+String taskId = with()
+

[james-project] 15/17: JAMES-3204 Demonstrate CassandraMessageMapper partially applies limit

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 3781196f9684961c843fabb9058d08e2aa1872cb
Author: Benoit Tellier 
AuthorDate: Mon Jun 8 17:40:36 2020 +0700

JAMES-3204 Demonstrate CassandraMessageMapper partially applies limit

This class ends up doing reads to messageV2 for entries that are later
on discarded by the soft limit.
---
 .../cassandra/mail/CassandraMessageMapperTest.java | 44 ++
 1 file changed, 37 insertions(+), 7 deletions(-)

diff --git 
a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
 
b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
index 7898cb4..97f86ef 100644
--- 
a/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
+++ 
b/mailbox/cassandra/src/test/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapperTest.java
@@ -22,21 +22,28 @@ package org.apache.james.mailbox.cassandra.mail;
 import static org.apache.james.backends.cassandra.Scenario.Builder.fail;
 import static org.assertj.core.api.Assertions.assertThat;
 
+import java.util.Iterator;
 import java.util.Optional;
 
 import org.apache.james.backends.cassandra.CassandraCluster;
 import org.apache.james.backends.cassandra.CassandraClusterExtension;
+import org.apache.james.backends.cassandra.StatementRecorder;
 import org.apache.james.mailbox.cassandra.ids.CassandraId;
 import org.apache.james.mailbox.cassandra.ids.CassandraMessageId;
+import org.apache.james.mailbox.exception.MailboxException;
 import org.apache.james.mailbox.model.MessageRange;
-import org.apache.james.mailbox.store.mail.MessageMapper;
+import org.apache.james.mailbox.store.mail.MessageMapper.FetchType;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
 import org.apache.james.mailbox.store.mail.model.MapperProvider;
 import org.apache.james.mailbox.store.mail.model.MessageMapperTest;
 import org.assertj.core.api.SoftAssertions;
+import org.junit.jupiter.api.Disabled;
 import org.junit.jupiter.api.Nested;
 import org.junit.jupiter.api.Test;
 import org.junit.jupiter.api.extension.RegisterExtension;
+import org.testcontainers.shaded.com.google.common.collect.ImmutableList;
 
+import com.datastax.driver.core.BoundStatement;
 import com.github.fge.lambdas.Throwing;
 
 class CassandraMessageMapperTest extends MessageMapperTest {
@@ -48,6 +55,29 @@ class CassandraMessageMapperTest extends MessageMapperTest {
 return new 
CassandraMapperProvider(cassandraCluster.getCassandraCluster());
 }
 
+@Disabled("Currently generates a read to messageV2 per stored message 
despite the limit")
+@Test
+void 
findInMailboxLimitShouldLimitProjectionReadCassandraQueries(CassandraCluster 
cassandra) throws MailboxException {
+saveMessages();
+
+StatementRecorder statementRecorder = new StatementRecorder();
+cassandra.getConf().recordStatements(statementRecorder);
+
+int limit = 2;
+consume(messageMapper.findInMailbox(benwaInboxMailbox, 
MessageRange.all(), FetchType.Full, limit));
+
+assertThat(statementRecorder.listExecutedStatements())
+.filteredOn(statement -> statement instanceof BoundStatement)
+.extracting(BoundStatement.class::cast)
+.extracting(statement -> 
statement.preparedStatement().getQueryString())
+.filteredOn(statementString -> statementString.equals("SELECT 
messageId,internalDate,bodyStartOctet,fullContentOctets,bodyOctets,bodyContent,headerContent,textualLineCount,properties,attachments
 FROM messageV2 WHERE messageId=:messageId;"))
+.hasSize(limit);
+}
+
+private void consume(Iterator inMailbox) {
+ImmutableList.copyOf(inMailbox);
+}
+
 @Nested
 class FailureTesting {
 @Test
@@ -65,7 +95,7 @@ class CassandraMessageMapperTest extends MessageMapperTest {
 
 CassandraMessageIdDAO messageIdDAO = new 
CassandraMessageIdDAO(cassandra.getConf(), new CassandraMessageId.Factory());
 SoftAssertions.assertSoftly(Throwing.consumer(softly -> {
-
softly.assertThat(messageMapper.findInMailbox(benwaInboxMailbox, 
MessageRange.all(), MessageMapper.FetchType.Metadata, 1))
+
softly.assertThat(messageMapper.findInMailbox(benwaInboxMailbox, 
MessageRange.all(), FetchType.Metadata, 1))
 .toIterable()
 .isEmpty();
 softly.assertThat(messageIdDAO.retrieveMessages((CassandraId) 
benwaInboxMailbox.getMailboxId(), MessageRange.all()).collectList().block())
@@ -88,7 +118,7 @@ class CassandraMessageMapperTest extends MessageMapperTest {
 
 CassandraMessageIdDAO messageIdDAO = new 
CassandraMessageIdDAO(cassandra.getConf(), new CassandraMessageId.F

[james-project] 13/17: JAMES-3182 Detail filter visit algorithm in method name

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 8f867323609eb97b45aac1d74b3dda43e86b832f
Author: Benoit Tellier 
AuthorDate: Fri Jun 5 15:50:03 2020 +0700

JAMES-3182 Detail filter visit algorithm in method name
---
 .../jmap/draft/methods/GetMessageListMethod.java   |  2 +-
 .../org/apache/james/jmap/draft/model/Filter.java  |  8 ++--
 .../apache/james/jmap/draft/model/FilterTest.java  | 44 --
 3 files changed, 37 insertions(+), 17 deletions(-)

diff --git 
a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/GetMessageListMethod.java
 
b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/GetMessageListMethod.java
index 1ff48b2..39dc573 100644
--- 
a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/GetMessageListMethod.java
+++ 
b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/methods/GetMessageListMethod.java
@@ -194,7 +194,7 @@ public class GetMessageListMethod implements Method {
 }
 
 private boolean containsMailboxFilters(Filter filter) {
-return filter.flatten()
+return filter.breadthFirstVisit()
 .stream()
 .anyMatch(this::hasMailboxClause);
 }
diff --git 
a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/Filter.java
 
b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/Filter.java
index 4294805..0f26d7c 100644
--- 
a/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/Filter.java
+++ 
b/server/protocols/jmap-draft/src/main/java/org/apache/james/jmap/draft/model/Filter.java
@@ -39,12 +39,12 @@ public interface Filter {
 
 String prettyPrint(String indentation);
 
-default List flatten() {
-return this.flatten(0)
+default List breadthFirstVisit() {
+return this.breadthFirstVisit(0)
 .collect(Guavate.toImmutableList());
 }
 
-default Stream flatten(int depth) {
+default Stream breadthFirstVisit(int depth) {
 if (depth > MAX_FILTER_DEPTH) {
 throw new TooDeepFilterHierarchyException();
 }
@@ -52,7 +52,7 @@ public interface Filter {
 FilterOperator operator = (FilterOperator) this;
 
 return operator.getConditions().stream()
-.flatMap(filter -> filter.flatten(depth + 1));
+.flatMap(filter -> filter.breadthFirstVisit(depth + 1));
 }
 if (this instanceof FilterCondition) {
 return Stream.of((FilterCondition) this);
diff --git 
a/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/model/FilterTest.java
 
b/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/model/FilterTest.java
index b988822..79ce078 100644
--- 
a/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/model/FilterTest.java
+++ 
b/server/protocols/jmap-draft/src/test/java/org/apache/james/jmap/draft/model/FilterTest.java
@@ -101,12 +101,12 @@ public class FilterTest {
 .to("b...@domain.tld")
 .build();
 
-assertThat(condition.flatten(10))
+assertThat(condition.breadthFirstVisit(10))
 .containsExactly(condition);
 }
 
 @Test
-public void flattenShouldUnboxOneLevelOperator() {
+public void breadthFirstVisitShouldUnboxOneLevelOperator() {
 FilterCondition condition1 = FilterCondition.builder()
 .to("b...@domain.tld")
 .build();
@@ -115,12 +115,12 @@ public class FilterTest {
 .build();
 
 assertThat(FilterOperator.and(condition1, condition2)
-.flatten())
+.breadthFirstVisit())
 .containsExactly(condition1, condition2);
 }
 
 @Test
-public void flattenShouldUnboxTwoLevelOperator() {
+public void breadthFirstVisitShouldUnboxTwoLevelOperator() {
 FilterCondition condition1 = FilterCondition.builder()
 .to("b...@domain.tld")
 .build();
@@ -132,12 +132,32 @@ public class FilterTest {
 .build();
 
 assertThat(FilterOperator.and(condition1, 
FilterOperator.and(condition2, condition3))
-.flatten())
-.containsExactly(condition1, condition2, condition3);
+.breadthFirstVisit())
+.containsOnly(condition1, condition2, condition3);
 }
 
 @Test
-public void flattenShouldAllowUpToLimitNesting() {
+public void breadthFirstVisitShouldBeBreadthFirst() {
+FilterCondition condition1 = FilterCondition.builder()
+.to("b...@domain.tld")
+.build();
+FilterCondition condition2 = FilterCondition.builder()
+.to("al...@domain.tld")
+.build();
+FilterCondition condition3 = FilterCondition.builder()
+

[james-project] 09/17: JAMES-3194 Rename SingleMailboxReindexingTask TYPE

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit c9b0a70176eb5d83e48cd476d3fdc702c77d9536
Author: Benoit Tellier 
AuthorDate: Wed Jun 10 09:29:36 2020 +0700

JAMES-3194 Rename SingleMailboxReindexingTask TYPE
---
 .../apache/mailbox/tools/indexer/SingleMailboxReindexingTask.java   | 4 ++--
 .../SingleMailboxReindexingTaskAdditionalInformationDTO.java| 2 +-
 .../mailbox/tools/indexer/SingleMailboxReindexingTaskDTO.java   | 2 +-
 ...WebAdminSingleMailboxReindexingTaskAdditionalInformationDTO.java | 2 +-
 .../java/org/apache/james/webadmin/routes/MailboxesRoutesTest.java  | 6 +++---
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTask.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTask.java
index 167889d..668b934 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTask.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTask.java
@@ -36,7 +36,7 @@ import com.google.common.annotations.VisibleForTesting;
 
 public class SingleMailboxReindexingTask implements Task {
 
-public static final TaskType MAILBOX_RE_INDEXING = 
TaskType.of("mailbox-reindexing");
+public static final TaskType TYPE = TaskType.of("mailbox-reindexing");
 
 public static class AdditionalInformation extends 
ReprocessingContextInformation {
 private final MailboxId mailboxId;
@@ -103,7 +103,7 @@ public class SingleMailboxReindexingTask implements Task {
 
 @Override
 public TaskType type() {
-return MAILBOX_RE_INDEXING;
+return TYPE;
 }
 
 public RunningOptions getRunningOptions() {
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
index 37b1cb8..9ab460a 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskAdditionalInformationDTO.java
@@ -58,7 +58,7 @@ public class 
SingleMailboxReindexingTaskAdditionalInformationDTO implements Addi
 details.timestamp(),
 
Optional.of(RunningOptionsDTO.toDTO(details.getRunningOptions()))
 ))
-
.typeName(SingleMailboxReindexingTask.MAILBOX_RE_INDEXING.asString())
+.typeName(SingleMailboxReindexingTask.TYPE.asString())
 .withFactory(AdditionalInformationDTOModule::new);
 }
 
diff --git 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskDTO.java
 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskDTO.java
index 067c07a..e03b1ee 100644
--- 
a/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskDTO.java
+++ 
b/mailbox/tools/indexer/src/main/java/org/apache/mailbox/tools/indexer/SingleMailboxReindexingTaskDTO.java
@@ -38,7 +38,7 @@ public class SingleMailboxReindexingTaskDTO implements 
TaskDTO {
 .convertToDTO(SingleMailboxReindexingTaskDTO.class)
 .toDomainObjectConverter(factory::create)
 .toDTOConverter(SingleMailboxReindexingTaskDTO::of)
-
.typeName(SingleMailboxReindexingTask.MAILBOX_RE_INDEXING.asString())
+.typeName(SingleMailboxReindexingTask.TYPE.asString())
 .withFactory(TaskDTOModule::new);
 }
 
diff --git 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminSingleMailboxReindexingTaskAdditionalInformationDTO.java
 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminSingleMailboxReindexingTaskAdditionalInformationDTO.java
index 199177c..7b84cde 100644
--- 
a/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminSingleMailboxReindexingTaskAdditionalInformationDTO.java
+++ 
b/server/protocols/webadmin/webadmin-mailbox/src/main/java/org/apache/james/webadmin/dto/WebAdminSingleMailboxReindexingTaskAdditionalInformationDTO.java
@@ -46,7 +46,7 @@ public class 
WebAdminSingleMailboxReindexingTaskAdditionalInformationDTO impleme
 details.getFailedReprocessedMailCount(),
 details.failures(),
 details.timestamp()))
-
.typeName(SingleMailboxReindexingTask.MAILBOX_RE_INDEXING.asString())
+.typeName(SingleMailboxReindexingTask.TYPE.asString())
 

[james-project] 14/17: JAMES-3204 Allow recording executed Cassandra statements

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit c4b95da664bc591ef6a01139e6d78553d32dc632
Author: Benoit Tellier 
AuthorDate: Mon Jun 8 17:36:52 2020 +0700

JAMES-3204 Allow recording executed Cassandra statements

This enables to test executed statements and allows enabling assertions
on query count reduction, for performance purpose.
---
 .../james/backends/cassandra/CassandraCluster.java |  4 +-
 .../cassandra/CassandraClusterExtension.java   |  2 +-
 .../backends/cassandra/StatementRecorder.java  | 43 ++
 .../james/backends/cassandra/TestingSession.java   | 23 
 .../backends/cassandra/TestingSessionTest.java | 42 +
 5 files changed, 110 insertions(+), 4 deletions(-)

diff --git 
a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
 
b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
index f4b576c..2090236 100644
--- 
a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
+++ 
b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraCluster.java
@@ -18,8 +18,6 @@
  /
 package org.apache.james.backends.cassandra;
 
-import static org.apache.james.backends.cassandra.Scenario.NOTHING;
-
 import java.util.Optional;
 
 import org.apache.james.backends.cassandra.components.CassandraModule;
@@ -85,7 +83,7 @@ public final class CassandraCluster implements AutoCloseable {
 
 @Override
 public void close() {
-nonPrivilegedSession.registerScenario(NOTHING);
+nonPrivilegedSession.resetInstrumentation();
 if (!nonPrivilegedCluster.isClosed()) {
 clearTables();
 closeCluster();
diff --git 
a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraClusterExtension.java
 
b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraClusterExtension.java
index 603fcf3..68b5478 100644
--- 
a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraClusterExtension.java
+++ 
b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/CassandraClusterExtension.java
@@ -76,7 +76,7 @@ public class CassandraClusterExtension implements 
BeforeAllCallback, BeforeEachC
 @Override
 public void afterEach(ExtensionContext extensionContext) {
 cassandraCluster.clearTables();
-cassandraCluster.getConf().registerScenario(Scenario.NOTHING);
+cassandraCluster.getConf().resetInstrumentation();
 }
 
 @Override
diff --git 
a/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/StatementRecorder.java
 
b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/StatementRecorder.java
new file mode 100644
index 000..e8773f5
--- /dev/null
+++ 
b/backends-common/cassandra/src/test/java/org/apache/james/backends/cassandra/StatementRecorder.java
@@ -0,0 +1,43 @@
+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY   *
+ * KIND, either express or implied.  See the License for the*
+ * specific language governing permissions and limitations  *
+ * under the License.   *
+ /
+
+package org.apache.james.backends.cassandra;
+
+
+import java.util.List;
+import java.util.concurrent.ConcurrentLinkedDeque;
+
+import com.datastax.driver.core.Statement;
+import com.google.common.collect.ImmutableList;
+
+public class StatementRecorder {
+private final ConcurrentLinkedDeque statements;
+
+public StatementRecorder() {
+statements = new ConcurrentLinkedDeque();
+}
+
+void recordStatement(Statement statement) {
+statements.add(statement);
+}
+
+public List listExecu

[james-project] 16/17: JAMES-3204 Flatten reactive calls in CassandraMailboxMapper::findInMailboxReactive

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 4c093a4e99d8060d547488725411a8cc3965c2b2
Author: Benoit Tellier 
AuthorDate: Mon Jun 8 14:12:01 2020 +0700

JAMES-3204 Flatten reactive calls in 
CassandraMailboxMapper::findInMailboxReactive
---
 .../apache/james/mailbox/cassandra/mail/CassandraMessageMapper.java | 6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapper.java
 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapper.java
index 2e41530..9b8c18e 100644
--- 
a/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapper.java
+++ 
b/mailbox/cassandra/src/main/java/org/apache/james/mailbox/cassandra/mail/CassandraMessageMapper.java
@@ -170,10 +170,8 @@ public class CassandraMessageMapper implements 
MessageMapper {
 public Flux findInMailboxReactive(Mailbox mailbox, 
MessageRange messageRange, FetchType ftype, int limit) {
 CassandraId mailboxId = (CassandraId) mailbox.getMailboxId();
 
-return Limit.from(limit).applyOnFlux(
-messageIdDAO.retrieveMessages(mailboxId, messageRange)
-.flatMap(id -> retrieveMessage(id, ftype), 
cassandraConfiguration.getMessageReadChunkSize()))
-.map(MailboxMessage.class::cast)
+return 
Limit.from(limit).applyOnFlux(messageIdDAO.retrieveMessages(mailboxId, 
messageRange))
+.flatMap(id -> retrieveMessage(id, ftype), 
cassandraConfiguration.getMessageReadChunkSize())
 .sort(Comparator.comparing(MailboxMessage::getUid));
 }
 


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



[james-project] 02/17: JAMES-3150 Add the first garbadge collection properties

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 58a8c255feb90b7ead395108583e9f70ffde3c92
Author: Gautier DI FOLCO 
AuthorDate: Fri Mar 20 16:25:12 2020 +0100

JAMES-3150 Add the first garbadge collection properties
---
 pom.xml|  10 +
 .../blob/blob-deduplicating/doc/gc-properties.adoc |   8 +-
 server/blob/blob-deduplicating/pom.xml |  18 +-
 .../james/server/blob/deduplication/GC.scala   | 187 +
 .../src/test/scala/GCPropertiesTest.scala  | 107 --
 .../blob/deduplication/GCPropertiesTest.scala  | 228 +
 .../james/server/blob/deduplication/State.scala|  46 +
 7 files changed, 483 insertions(+), 121 deletions(-)

diff --git a/pom.xml b/pom.xml
index bea0a41..4c64989 100644
--- a/pom.xml
+++ b/pom.xml
@@ -2581,6 +2581,16 @@
 0.9.0
 
 
+org.scalacheck
+scalacheck_${scala.base}
+1.14.3
+
+
+org.scalatest
+scalatest_${scala.base}
+3.1.1
+
+
 org.slf4j
 jcl-over-slf4j
 ${slf4j.version}
diff --git a/gc-properties.adoc 
b/server/blob/blob-deduplicating/doc/gc-properties.adoc
similarity index 74%
rename from gc-properties.adoc
rename to server/blob/blob-deduplicating/doc/gc-properties.adoc
index 7c69c01..6ffed72 100644
--- a/gc-properties.adoc
+++ b/server/blob/blob-deduplicating/doc/gc-properties.adoc
@@ -1,10 +1,10 @@
 = GC properties
 
 1. the execution time of the GC should be linked to
-active dataset but not to global dataset
-(for scalability purpose)
+active dataset (ie. where the number of references have changed)
+but not to global dataset (for scalability purpose)
 
-2. GC should run on live dataset
+2. GC should run on active dataset
 
  2.1. GC should not delete data being referenced by a pending process or
 still referenced
@@ -17,7 +17,7 @@ not have a different outcome than a single one
  3.1. an unreferenced piece of data should be removed after 1 day
 
  3.2. less than 10% of unreferenced data of a significant dataset
-should persist after three GC executions
+should persist
 
 4. GC should report what it does
 
diff --git a/server/blob/blob-deduplicating/pom.xml 
b/server/blob/blob-deduplicating/pom.xml
index e849535..ada4371 100644
--- a/server/blob/blob-deduplicating/pom.xml
+++ b/server/blob/blob-deduplicating/pom.xml
@@ -23,7 +23,7 @@
 
 james-server-blob
 org.apache.james
-3.5.0-SNAPSHOT
+3.6.0-SNAPSHOT
 ../pom.xml
 
 
@@ -32,7 +32,7 @@
 
 Apache James :: Server :: Blob :: Deduplicating Blob Storage
 
-An implementation of BlobStore which deduplicate the stored blobs and 
use a garbage collector
+An implementation of BlobStore which deduplicates the stored blobs and 
uses a garbage collector
 to ensure their effective deletion.
 
 
@@ -75,21 +75,19 @@
 scala-java8-compat_${scala.base}
 
 
-org.scalactic
-scalactic_2.13
-3.1.1
+org.scalacheck
+scalacheck_${scala.base}
 test
 
 
-org.scalatest
-scalatest_2.13
+org.scalactic
+scalactic_${scala.base}
 3.1.1
 test
 
 
-org.scalacheck
-scalacheck_2.13
-1.14.3
+org.scalatest
+scalatest_${scala.base}
 test
 
 
diff --git 
a/server/blob/blob-deduplicating/src/main/scala/org/apache/james/server/blob/deduplication/GC.scala
 
b/server/blob/blob-deduplicating/src/main/scala/org/apache/james/server/blob/deduplication/GC.scala
new file mode 100644
index 000..0fa4ea8
--- /dev/null
+++ 
b/server/blob/blob-deduplicating/src/main/scala/org/apache/james/server/blob/deduplication/GC.scala
@@ -0,0 +1,187 @@
+/
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information*
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the*
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *  *
+ *   http://www.apache.org/licenses/LICENSE-2.0 *
+ *  *
+ * Unless required by applicable law or agreed to in writing,   *
+ * softw

[james-project] 11/17: JAMES-3201 Document mailboxFailures for ReIndexing tasks

2020-06-11 Thread rouazana
This is an automated email from the ASF dual-hosted git repository.

rouazana pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 36fcc9fea5872a164fbcb5f0b8b3373d4ee1a9c0
Author: Benoit Tellier 
AuthorDate: Wed Jun 10 13:39:56 2020 +0700

JAMES-3201 Document mailboxFailures for ReIndexing tasks
---
 src/site/markdown/server/manage-webadmin.md | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/site/markdown/server/manage-webadmin.md 
b/src/site/markdown/server/manage-webadmin.md
index 806c67f..d3b0e93 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -601,6 +601,7 @@ The scheduled task will have the following type 
`full-reindexing` and the follow
   },
   "successfullyReprocessedMailCount":18,
   "failedReprocessedMailCount": 3,
+  "mailboxFailures": ["12", "23" ],
   "failures": [
{
  "mailboxId": "1",
@@ -643,6 +644,7 @@ The scheduled task will have the following type 
`error-recovery-indexation` and
   },
   "successfullyReprocessedMailCount":18,
   "failedReprocessedMailCount": 3,
+  "mailboxFailures": ["12", "23" ],
   "failures": [{
  "mailboxId": "1",
   "uids": [1, 36]
@@ -695,6 +697,7 @@ The scheduled task will have the following type 
`mailbox-reindexing` and the fol
   "mailboxId":"{mailboxId}",
   "successfullyReprocessedMailCount":18,
   "failedReprocessedMailCount": 3,
+  "mailboxFailures": ["12"],
   "failures": [
{
  "mailboxId": "1",
@@ -1021,6 +1024,7 @@ The scheduled task will have the following type 
`user-reindexing` and the follow
   "user":"u...@domain.com",
   "successfullyReprocessedMailCount":18,
   "failedReprocessedMailCount": 3,
+  "mailboxFailures": ["12", "23" ],
   "failures": [
{
  "mailboxId": "1",


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



[jira] [Commented] (JAMES-3213) Prevent non-participant add in Sabre

2020-06-11 Thread Gautier DI FOLCO (Jira)


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

Gautier DI FOLCO commented on JAMES-3213:
-

This PR contributed to it: [https://github.com/linagora/james-project/pull/3438]

> Prevent non-participant add in Sabre
> 
>
> Key: JAMES-3213
> URL: https://issues.apache.org/jira/browse/JAMES-3213
> Project: James Server
>  Issue Type: Improvement
>Reporter: Gautier DI FOLCO
>Priority: Minor
>
> When an attendee changes his participant status, there is a notification 
> email is sent to the event organizer from the attendee.
> Then ESN send an ITIP request to Sabre to handle realtime update.
> If the sender email does not exist in the list attendee, Sabre ITIP broker 
> will add him to the attendee list. 
> [https://github.com/sabre-io/vobject/blob/master/lib/ITip/Broker.php#L373-L382]
> This is not correct in cases:
>  * When an external attendee accept the event, the notification email should 
> send from OpenPaaS system 
> ([no-re...@open-paas.org|mailto:no-re...@open-paas.org])
>  * When the attendee forwards the invitation email to an external user, then 
> the external user (is not included in attendee list) accepts.
> Both cases above should not lead to the behavior that adding the sender to 
> the attendee list.



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



[jira] [Commented] (JAMES-3211) Generalize EventBus

2020-06-11 Thread Matthieu Baechler (Jira)


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

Matthieu Baechler commented on JAMES-3211:
--

The aforementioned ADR has the same problems than this issue.

> Generalize EventBus
> ---
>
> Key: JAMES-3211
> URL: https://issues.apache.org/jira/browse/JAMES-3211
> Project: James Server
>  Issue Type: Improvement
>Reporter: Lan Khuat
>Priority: Major
>
> 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.
>  
>  



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



[jira] [Commented] (JAMES-3211) Generalize EventBus

2020-06-11 Thread Raphael Ouazana (Jira)


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

Raphael Ouazana commented on JAMES-3211:


You can find more information and some answers to your questions here: 
[https://github.com/linagora/james-project/pull/3437]

> Generalize EventBus
> ---
>
> Key: JAMES-3211
> URL: https://issues.apache.org/jira/browse/JAMES-3211
> Project: James Server
>  Issue Type: Improvement
>Reporter: Lan Khuat
>Priority: Major
>
> 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.
>  
>  



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



[jira] [Commented] (JAMES-3211) Generalize EventBus

2020-06-11 Thread Matthieu Baechler (Jira)


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

Matthieu Baechler commented on JAMES-3211:
--

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

I guess you mean that the "quota search" code is never called because it's only 
notified on messages?

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

I don't see the causal link between the definition of the problem and this 
solution.
We should put some effort to demonstrate how a given solution solves the 
problem and let other solutions emerge by not "requiring this solution" but 
proposing it and let people analyze if it seems fit.

>  The EventBus in mailbox-api could be generalized so we can implement it to 
> solve this problem without having to depend on this module.

I don't really understand what it means: does it contribute to solve the 
problem explain in the first two lines?

> Generalize EventBus
> ---
>
> Key: JAMES-3211
> URL: https://issues.apache.org/jira/browse/JAMES-3211
> Project: James Server
>  Issue Type: Improvement
>Reporter: Lan Khuat
>Priority: Major
>
> 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.
>  
>  



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



[jira] [Commented] (JAMES-3209) Auth Module to make James usable with Nginx mail proxy for TLS termination

2020-06-11 Thread David Leangen (Jira)


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

David Leangen commented on JAMES-3209:
--

Just attached my docker-compose.yaml file and nginx.conf file.

Have been trying various things, but so far no success. For some reason the 
auth call never makes it to my auth server. I just get this:
{code:java}
nginx-proxy_1  | 2020/06/11 12:51:24 [error] 29#29: *1 recv() failed (111: 
Connection refused) while in http auth state, client: 172.28.0.1, server: 
0.0.0.0:993, login: "user01@james.local"{code}
 

> Auth Module to make James usable with Nginx mail proxy for TLS termination 
> ---
>
> Key: JAMES-3209
> URL: https://issues.apache.org/jira/browse/JAMES-3209
> Project: James Server
>  Issue Type: New Feature
>Reporter: Ioan Eugen Stan
>Priority: Major
> Attachments: docker-compose.yaml, nginx.conf
>
>
> Apache James needs to be deployed with TLS encryption to ensure security of 
> emails during transport. 
> We could use Nginx as a mail proxy and use it for TLS termination. 
> However we need to implement an HTTP auth service for that to work. 
> This issue should cover work on making Nginx a valid mail proxy in front of 
> Apache James.
> References:
> https://docs.nginx.com/nginx/admin-guide/mail-proxy/mail-proxy/ 
> https://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html#protocol
> == Context
> Unfortunately, Java has only the keystore for managing TLS certificates. This 
> is makes deploying TLS certificates hard for Apache James since the internet 
> does not use. keystore format. 
> We could use Nginx as a amil proxy. Nginx supports the certificate format 
> that all other tools use. (add format here - PKCS #XXX ). People know how to 
> setup Nginx with LetsEncrypt and benefit from free TLS certificates with 
> automatic renewal. 
> However we need an integration piece: the nginx auth service. It's an http 
> service that works only with headers. It should be simple to write and work 
> integrate.



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



[jira] [Updated] (JAMES-3209) Auth Module to make James usable with Nginx mail proxy for TLS termination

2020-06-11 Thread David Leangen (Jira)


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

David Leangen updated JAMES-3209:
-
Attachment: docker-compose.yaml

> Auth Module to make James usable with Nginx mail proxy for TLS termination 
> ---
>
> Key: JAMES-3209
> URL: https://issues.apache.org/jira/browse/JAMES-3209
> Project: James Server
>  Issue Type: New Feature
>Reporter: Ioan Eugen Stan
>Priority: Major
> Attachments: docker-compose.yaml, nginx.conf
>
>
> Apache James needs to be deployed with TLS encryption to ensure security of 
> emails during transport. 
> We could use Nginx as a mail proxy and use it for TLS termination. 
> However we need to implement an HTTP auth service for that to work. 
> This issue should cover work on making Nginx a valid mail proxy in front of 
> Apache James.
> References:
> https://docs.nginx.com/nginx/admin-guide/mail-proxy/mail-proxy/ 
> https://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html#protocol
> == Context
> Unfortunately, Java has only the keystore for managing TLS certificates. This 
> is makes deploying TLS certificates hard for Apache James since the internet 
> does not use. keystore format. 
> We could use Nginx as a amil proxy. Nginx supports the certificate format 
> that all other tools use. (add format here - PKCS #XXX ). People know how to 
> setup Nginx with LetsEncrypt and benefit from free TLS certificates with 
> automatic renewal. 
> However we need an integration piece: the nginx auth service. It's an http 
> service that works only with headers. It should be simple to write and work 
> integrate.



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



[jira] [Updated] (JAMES-3209) Auth Module to make James usable with Nginx mail proxy for TLS termination

2020-06-11 Thread David Leangen (Jira)


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

David Leangen updated JAMES-3209:
-
Attachment: nginx.conf

> Auth Module to make James usable with Nginx mail proxy for TLS termination 
> ---
>
> Key: JAMES-3209
> URL: https://issues.apache.org/jira/browse/JAMES-3209
> Project: James Server
>  Issue Type: New Feature
>Reporter: Ioan Eugen Stan
>Priority: Major
> Attachments: docker-compose.yaml, nginx.conf
>
>
> Apache James needs to be deployed with TLS encryption to ensure security of 
> emails during transport. 
> We could use Nginx as a mail proxy and use it for TLS termination. 
> However we need to implement an HTTP auth service for that to work. 
> This issue should cover work on making Nginx a valid mail proxy in front of 
> Apache James.
> References:
> https://docs.nginx.com/nginx/admin-guide/mail-proxy/mail-proxy/ 
> https://nginx.org/en/docs/mail/ngx_mail_auth_http_module.html#protocol
> == Context
> Unfortunately, Java has only the keystore for managing TLS certificates. This 
> is makes deploying TLS certificates hard for Apache James since the internet 
> does not use. keystore format. 
> We could use Nginx as a amil proxy. Nginx supports the certificate format 
> that all other tools use. (add format here - PKCS #XXX ). People know how to 
> setup Nginx with LetsEncrypt and benefit from free TLS certificates with 
> automatic renewal. 
> However we need an integration piece: the nginx auth service. It's an http 
> service that works only with headers. It should be simple to write and work 
> integrate.



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



[jira] [Created] (JAMES-3213) Prevent non-participant add in Sabre

2020-06-11 Thread Gautier DI FOLCO (Jira)
Gautier DI FOLCO created JAMES-3213:
---

 Summary: Prevent non-participant add in Sabre
 Key: JAMES-3213
 URL: https://issues.apache.org/jira/browse/JAMES-3213
 Project: James Server
  Issue Type: Improvement
Reporter: Gautier DI FOLCO


When an attendee changes his participant status, there is a notification email 
is sent to the event organizer from the attendee.

Then ESN send an ITIP request to Sabre to handle realtime update.

If the sender email does not exist in the list attendee, Sabre ITIP broker will 
add him to the attendee list. 
[https://github.com/sabre-io/vobject/blob/master/lib/ITip/Broker.php#L373-L382]

This is not correct in cases:
 * When an external attendee accept the event, the notification email should 
send from OpenPaaS system 
([no-re...@open-paas.org|mailto:no-re...@open-paas.org])
 * When the attendee forwards the invitation email to an external user, then 
the external user (is not included in attendee list) accepts.

Both cases above should not lead to the behavior that adding the sender to the 
attendee list.



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



[jira] [Commented] (JAMES-3211) Generalize EventBus

2020-06-11 Thread Benoit Tellier (Jira)


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

Benoit Tellier commented on JAMES-3211:
---

Could you add a link for the ADR pull request, if any?


> Generalize EventBus
> ---
>
> Key: JAMES-3211
> URL: https://issues.apache.org/jira/browse/JAMES-3211
> Project: James Server
>  Issue Type: Improvement
>Reporter: Lan Khuat
>Priority: Major
>
> 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.
>  
>  



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



[jira] [Commented] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Benoit Tellier (Jira)


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

Benoit Tellier commented on JAMES-3212:
---

Why are there mentions of OpenPaaS, a linagora software in an apache bugtracker?

Also, in this bugtracker I would expect to have a bugreport centered on James 
behaviour, not about OpenPaaS.

I would say using OpenPaaS screenshots to illustrate James behaviour is OK.

> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
> Attachments: image3.png, image4.png
>
>
> *Preconditions*
> A folder has been created on Outlook and synchronize to OpenPaas.
> *Description*
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> *On OpenPaas:*
>   !image3.png!
> *On Outlook:*
> !image4.png!
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
> *Expected result*
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
> *Reproduction Steps*
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
> *Environment*
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



Re: Implementing more things in scala

2020-06-11 Thread Tellier Benoit
On 10/06/2020 15:19, Eugen Stan wrote:
> I'm mostly referring to libraries. Having a library bring a dependency
> like scala is a no-no on my part.
> 
> Ideally the lower parts of James should not bring any dependencies.
> Guava is also big and I would like to see that gone as well.
>
> [...]

Hello Stan,

It is unclear to me what you actually call a library.

Could you provide us with an explanation? Maybe with a list of what you
consider being libraries within the James project?

I think sharing your thoughts here would help reaching a common vision.

Thanks!

Benoit

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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Attachment: image4.png

> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
> Attachments: image3.png, image4.png
>
>
> *Preconditions*
> A folder has been created on Outlook and synchronize to OpenPaas.
> *Description*
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> *On OpenPaas:*
>  
> *On Outlook:*
> ![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
> *Expected result*
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
> *Reproduction Steps*
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
> *Environment*
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Description: 
*Preconditions*

A folder has been created on Outlook and synchronize to OpenPaas.

*Description*

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

*On OpenPaas:*

  !image3.png!

*On Outlook:*

!image4.png!

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

*Expected result*

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

*Reproduction Steps*

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.

*Environment*
 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10

  was:
*Preconditions*

A folder has been created on Outlook and synchronize to OpenPaas.

*Description*

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

*On OpenPaas:*

 

*On Outlook:*

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

*Expected result*

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

*Reproduction Steps*

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.

*Environment*
 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10


> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
> Attachments: image3.png, image4.png
>
>
> *Preconditions*
> A folder has been created on Outlook and synchronize to OpenPaas.
> *Description*
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> *On OpenPaas:*
>   !image3.png!
> *On Outlook:*
> !image4.png!
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
> *Expected result*
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
> *Reproduction Steps*
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
> *Environment*
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Attachment: image3.png

> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
> Attachments: image3.png, image4.png
>
>
> *Preconditions*
> A folder has been created on Outlook and synchronize to OpenPaas.
> *Description*
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> *On OpenPaas:*
>  
> *On Outlook:*
> ![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
> *Expected result*
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
> *Reproduction Steps*
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
> *Environment*
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Description: 
*Preconditions*

A folder has been created on Outlook and synchronize to OpenPaas.

*Description*

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

*On OpenPaas:*

 

*On Outlook:*

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

*Expected result*

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

*Reproduction Steps*

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.

*Environment*
 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10

  was:
*Preconditions*

A folder has been created on Outlook and synchronize to OpenPaas.

*Description*

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

*On OpenPaas:*

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

*On Outlook:*

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

*Expected result*

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

*Reproduction Steps*

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.

*Environment*
 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10


> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
>
> *Preconditions*
> A folder has been created on Outlook and synchronize to OpenPaas.
> *Description*
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> *On OpenPaas:*
>  
> *On Outlook:*
> ![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
> *Expected result*
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
> *Reproduction Steps*
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
> *Environment*
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Description: 
*Preconditions*

A folder has been created on Outlook and synchronize to OpenPaas.

*Description*

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

*On OpenPaas:*

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

*On Outlook:*

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

*Expected result*

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

*Reproduction Steps*

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.

*Environment*
 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10

  was:
1.Preconditions

A folder has been created on Outlook and synchronize to OpenPaas.

2.Description

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

**On OpenPaas:**

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

**On Outlook:**

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

   1. Expected result

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

   2.Reproduction Steps

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.
 # 
 ## 
 ### Environment

 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10


> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
>
> *Preconditions*
> A folder has been created on Outlook and synchronize to OpenPaas.
> *Description*
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> *On OpenPaas:*
> ![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)
> *On Outlook:*
> ![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
> *Expected result*
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
> *Reproduction Steps*
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
> *Environment*
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Description: 
1.Preconditions

A folder has been created on Outlook and synchronize to OpenPaas.

2.Description

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

**On OpenPaas:**

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

**On Outlook:**

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.

   1. Expected result

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.

   2.Reproduction Steps

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.
 # 
 ## 
 ### Environment

 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10

  was:
1.Preconditions

A folder has been created on Outlook and synchronize to OpenPaas.

2.Description

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

**On OpenPaas:**

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

**On Outlook:**

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.
 # 
 ## 
 ### Expected result

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.
 # 
 ## 
 ### 
  Reproduction Steps

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.
 # 
 ## 
 ### Environment

 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10


> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
>
> 1.Preconditions
> A folder has been created on Outlook and synchronize to OpenPaas.
> 2.Description
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> **On OpenPaas:**
> ![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)
> **On Outlook:**
> ![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
>    1. Expected result
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
>    2.Reproduction Steps
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
>  # 
>  ## 
>  ### Environment
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



[jira] [Updated] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira


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

Nguyễn Việt Đức updated JAMES-3212:
---
Description: 
1.Preconditions

A folder has been created on Outlook and synchronize to OpenPaas.

2.Description

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

**On OpenPaas:**

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

**On Outlook:**

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.
 # 
 ## 
 ### Expected result

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.
 # 
 ## 
 ### 
  Reproduction Steps

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.
 # 
 ## 
 ### Environment

 - Sandbox account, version RC-1.7.8

 - Outlook App on Windows 10

  was:
### Preconditions

A folder has been created on Outlook and synchronize to OpenPaas.

### Description

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

**On OpenPaas:**

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

**On Outlook:**

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.


### Expected result

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.


 Reproduction Steps

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.


### Environment

- Sandbox account, version RC-1.7.8

- Outlook App on Windows 10


> Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated 
> folder and the old one.
> --
>
> Key: JAMES-3212
> URL: https://issues.apache.org/jira/browse/JAMES-3212
> Project: James Server
>  Issue Type: Improvement
>Reporter: Nguyễn Việt Đức
>Priority: Major
>
> 1.Preconditions
> A folder has been created on Outlook and synchronize to OpenPaas.
> 2.Description
> After synchronize the change from Openpaas folder, Outlook keeps both updated 
> folder and the old one.
> **On OpenPaas:**
> ![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)
> **On Outlook:**
> ![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)
> User cannot delete the old folder on Outlook. He need to unsubscribe first 
> then delete the folder.
>  # 
>  ## 
>  ### Expected result
> Please investigate if it's outlook feature.
> If not, Outlook should keep only the updated folder.
>  # 
>  ## 
>  ### 
>   Reproduction Steps
> 1. On OpenPaas, rename a folder
> 2. On Outlook desktop app, restart the app to synchronize the change.
> 3. After the change is synchronized, verify the issue.
>  # 
>  ## 
>  ### Environment
>  - Sandbox account, version RC-1.7.8
>  - Outlook App on Windows 10



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



[jira] [Commented] (JAMES-3211) Generalize EventBus

2020-06-11 Thread Gautier DI FOLCO (Jira)


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

Gautier DI FOLCO commented on JAMES-3211:
-

The title is not specific enough: "Extends mailbox-api EventBus interface"

> Generalize EventBus
> ---
>
> Key: JAMES-3211
> URL: https://issues.apache.org/jira/browse/JAMES-3211
> Project: James Server
>  Issue Type: Improvement
>Reporter: Lan Khuat
>Priority: Major
>
> 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.
>  
>  



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



[jira] [Created] (JAMES-3212) Outlook > When rename a folder on OpenPaas, Outlook keeps both the updated folder and the old one.

2020-06-11 Thread Jira
Nguyễn Việt Đức created JAMES-3212:
--

 Summary: Outlook > When rename a folder on OpenPaas, Outlook keeps 
both the updated folder and the old one.
 Key: JAMES-3212
 URL: https://issues.apache.org/jira/browse/JAMES-3212
 Project: James Server
  Issue Type: Improvement
Reporter: Nguyễn Việt Đức


### Preconditions

A folder has been created on Outlook and synchronize to OpenPaas.

### Description

After synchronize the change from Openpaas folder, Outlook keeps both updated 
folder and the old one.

**On OpenPaas:**

![image](/uploads/898c72fc330efc06d357f8fcdf097617/image.png)

**On Outlook:**

![image](/uploads/672f5d7d1bcedaf1033e0b92d142126a/image.png)

User cannot delete the old folder on Outlook. He need to unsubscribe first then 
delete the folder.


### Expected result

Please investigate if it's outlook feature.

If not, Outlook should keep only the updated folder.


 Reproduction Steps

1. On OpenPaas, rename a folder

2. On Outlook desktop app, restart the app to synchronize the change.

3. After the change is synchronized, verify the issue.


### Environment

- Sandbox account, version RC-1.7.8

- Outlook App on Windows 10



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



[jira] [Updated] (JAMES-3211) Generalize EventBus

2020-06-11 Thread Lan Khuat (Jira)


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

Lan Khuat updated JAMES-3211:
-
Description: 
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.

 

 

  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.

 

 


> Generalize EventBus
> ---
>
> Key: JAMES-3211
> URL: https://issues.apache.org/jira/browse/JAMES-3211
> Project: James Server
>  Issue Type: Improvement
>Reporter: Lan Khuat
>Priority: Major
>
> 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.
>  
>  



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



[jira] [Created] (JAMES-3211) Generalize EventBus

2020-06-11 Thread Lan Khuat (Jira)
Lan Khuat created JAMES-3211:


 Summary: Generalize EventBus
 Key: JAMES-3211
 URL: https://issues.apache.org/jira/browse/JAMES-3211
 Project: James Server
  Issue Type: Improvement
Reporter: Lan Khuat


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.

 

 



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