[jira] [Created] (JAMES-2719) [ES][Migration] Migrate apache-james-backends-es

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2719:
---

 Summary: [ES][Migration] Migrate apache-james-backends-es
 Key: JAMES-2719
 URL: https://issues.apache.org/jira/browse/JAMES-2719
 Project: James Server
  Issue Type: New Feature
  Components: elasticsearch
Reporter: Rene Cordier
 Fix For: 3.4.0


Duplicate old module to 'apache-james-backends-es-6', using es 6.6.2 (newest) 
in the duplicated module. Adapt new ES components changes. Pass the tests

Here is the list of ES components need to migrate:

* Old TransportClient to HighLevelRestClient

Link to Migrating ES Clients guidelines : 
https://www.elastic.co/guide/en/elasticsearch/client/java-rest/6.6/java-rest-high-level-migration.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2718) Performance indicator: Default Inbox search

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2718:
---

 Summary: Performance indicator: Default Inbox search
 Key: JAMES-2718
 URL: https://issues.apache.org/jira/browse/JAMES-2718
 Project: James Server
  Issue Type: New Feature
  Components: elasticsearch
Reporter: Rene Cordier
 Fix For: 3.4.0


Given a provisioned James server,

You will develop a Gatling scenario where users list their 20 more recent 
emails ordered by dates. They also fetch basic properties (subject + from + to 
+ dates + summary) within the result of this search.

You will measure this performance indicator on master.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2717) [ES] Replace EmbeddedElasticSearch by Docker ES

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2717:
---

 Summary: [ES] Replace EmbeddedElasticSearch by Docker ES
 Key: JAMES-2717
 URL: https://issues.apache.org/jira/browse/JAMES-2717
 Project: James Server
  Issue Type: New Feature
  Components: elasticsearch
Reporter: Rene Cordier
 Fix For: 3.4.0


EmbeddedElasticSearch is used for creating ES 'org.elasticsearch.client.Client' 
from embedded ES node. The job is done in 'TestingClientProvider'.
It can be replaced by 'ClientProviderImpl' connects to a docker ES.

There are places where EmbeddedElasticSearch is used:

* server/protocols/webadmin-integration-test UnauthorizedEndpointsTest
* server/protocols/jmap-integration-testing: CassandraStepdefs, RabbitMQStepdefs
* mpt/impl/imap-mailbox/elasticsearch ElasticSearchUidSearchOnIndexTest
* backends-common/elasticsearch ElasticSearchIndexerTest
* mailbox/elasticsearch ElasticSearchIntegrationTest
* mailbox/plugin/quota-search-elasticsearch 
ElasticSearchQuotaMailboxListenerTest
* server/container/guice/cassandra-guice many places

_Steps_:

* Extract a DockerElasticSearch based a DockerGenericContainer instance (& 
associated singleton) + wait strategy
* Provide junit 4 rules & junit 5 extension - allowing test to retrieve clients
* Expose a method for awaiting an ES docker is up + await indexation is done 
(akka flush)
* Define a test isolation strategy. Proposal: random index & aliases names, no 
data removal. Alternative: list then delete index & aliases.

_Note_:

* Need to optimize ES docker life cycle management (e.g: using Singleton 
instance like DockerCassandraSingleton)



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2716) Document: custom listeners HowTo

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2716:
---

 Summary: Document: custom listeners HowTo
 Key: JAMES-2716
 URL: https://issues.apache.org/jira/browse/JAMES-2716
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


Write the how to for custom listeners

CF https://james.apache.org/howTo/index.html



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2715) Document RRT domain mapping

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2715:
---

 Summary: Document RRT domain mapping
 Key: JAMES-2715
 URL: https://issues.apache.org/jira/browse/JAMES-2715
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


We are missing the doc within src/site/markdown/server/manage-webadmin.md



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2714) Document SuperTrash

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2714:
---

 Summary: Document SuperTrash
 Key: JAMES-2714
 URL: https://issues.apache.org/jira/browse/JAMES-2714
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


We need to write a proper documentation that will serve to explain to the 
Apache community :

* why we need a vault for email retention
* what are the mechanisms involved in it
* how can we use it
* tutorial on configuration
* detailed documentation page in the mailbox website.
* medium article about this feature.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Updated] (JAMES-2713) [Integration Tests] Webadmin delete and purge APIs

2019-03-31 Thread Rene Cordier (JIRA)


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

Rene Cordier updated JAMES-2713:

Description: 
In cassandra and memory in `/server/protocols/jmap-integration-testing`, write 
following tests to delete and purge mails from the supertrash feature. Make 
sure as well to setup correctly guice bindings to prove that this new feature 
integrates well into our system.

*Delete API*

{code}
Given an user with emails present in the vault
When admin is using delete with the message ID of one of those emails
Then the email should be deleted from user's vault
{code}

{code}
Given an user with emails present in the vault
When admin is using delete with the message ID that doesn't exist
Then no email should be deleted from user's vault
{code}

*Purge API*

{code}
Given an user with emails present in the vault matching a configured retention 
policy
When admin is using purge
Then the emails matching the configured retention policy should be deleted from 
user's vault
{code}

{code}
Given an user with emails present in the vault not matching a configured 
retention policy
When admin is using purge
Then no emails should be deleted from user's vault
{code}

{code}
Given an user with no emails present in the vault
When admin is using purge
Then nothing should happen
{code}

{code}
Given two users with emails present in their vault matching a configured 
retention policy
When admin is using purge
Then the emails matching the configured retention policy should be deleted from 
both users' vault
{code}

  was:
In cassandra and memory in /server/protocols/jmap-integration-testing, write 
following tests to delete and purge mails from the supertrash feature. Make 
sure as well to setup correctly guice bindings to prove that this new feature 
integrates well into our system.

*Delete API*

{code}
Given an user with emails present in the vault
When admin is using delete with the message ID of one of those emails
Then the email should be deleted from user's vault
{code}

{code}
Given an user with emails present in the vault
When admin is using delete with the message ID that doesn't exist
Then no email should be deleted from user's vault
{code}

*Purge API*

{code}
Given an user with emails present in the vault matching a configured retention 
policy
When admin is using purge
Then the emails matching the configured retention policy should be deleted from 
user's vault
{code}

{code}
Given an user with emails present in the vault not matching a configured 
retention policy
When admin is using purge
Then no emails should be deleted from user's vault
{code}

{code}
Given an user with no emails present in the vault
When admin is using purge
Then nothing should happen
{code}

{code}
Given two users with emails present in their vault matching a configured 
retention policy
When admin is using purge
Then the emails matching the configured retention policy should be deleted from 
both users' vault
{code}


> [Integration Tests] Webadmin delete and purge APIs
> --
>
> Key: JAMES-2713
> URL: https://issues.apache.org/jira/browse/JAMES-2713
> Project: James Server
>  Issue Type: New Feature
>Reporter: Rene Cordier
>Priority: Major
> Fix For: 3.4.0
>
>
> In cassandra and memory in `/server/protocols/jmap-integration-testing`, 
> write following tests to delete and purge mails from the supertrash feature. 
> Make sure as well to setup correctly guice bindings to prove that this new 
> feature integrates well into our system.
> *Delete API*
> {code}
> Given an user with emails present in the vault
> When admin is using delete with the message ID of one of those emails
> Then the email should be deleted from user's vault
> {code}
> {code}
> Given an user with emails present in the vault
> When admin is using delete with the message ID that doesn't exist
> Then no email should be deleted from user's vault
> {code}
> *Purge API*
> {code}
> Given an user with emails present in the vault matching a configured 
> retention policy
> When admin is using purge
> Then the emails matching the configured retention policy should be deleted 
> from user's vault
> {code}
> {code}
> Given an user with emails present in the vault not matching a configured 
> retention policy
> When admin is using purge
> Then no emails should be deleted from user's vault
> {code}
> {code}
> Given an user with no emails present in the vault
> When admin is using purge
> Then nothing should happen
> {code}
> {code}
> Given two users with emails present in their vault matching a configured 
> retention policy
> When admin is using purge
> Then the emails matching the configured retention policy should be deleted 
> from both users' vault
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Created] (JAMES-2713) [Integration Tests] Webadmin delete and purge APIs

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2713:
---

 Summary: [Integration Tests] Webadmin delete and purge APIs
 Key: JAMES-2713
 URL: https://issues.apache.org/jira/browse/JAMES-2713
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


In cassandra and memory in /server/protocols/jmap-integration-testing, write 
following tests to delete and purge mails from the supertrash feature. Make 
sure as well to setup correctly guice bindings to prove that this new feature 
integrates well into our system.

*Delete API*

{code}
Given an user with emails present in the vault
When admin is using delete with the message ID of one of those emails
Then the email should be deleted from user's vault
{code}

{code}
Given an user with emails present in the vault
When admin is using delete with the message ID that doesn't exist
Then no email should be deleted from user's vault
{code}

*Purge API*

{code}
Given an user with emails present in the vault matching a configured retention 
policy
When admin is using purge
Then the emails matching the configured retention policy should be deleted from 
user's vault
{code}

{code}
Given an user with emails present in the vault not matching a configured 
retention policy
When admin is using purge
Then no emails should be deleted from user's vault
{code}

{code}
Given an user with no emails present in the vault
When admin is using purge
Then nothing should happen
{code}

{code}
Given two users with emails present in their vault matching a configured 
retention policy
When admin is using purge
Then the emails matching the configured retention policy should be deleted from 
both users' vault
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2712) Integration test: ExportDeletedMessageVault items to LinShare

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2712:
---

 Summary: Integration test: ExportDeletedMessageVault items to 
LinShare
 Key: JAMES-2712
 URL: https://issues.apache.org/jira/browse/JAMES-2712
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


{code:java}
Given the LinShare BlobSharing mechanism is configured
And the admin export some content of the vault of the user
When the task completes
Then the admin has the export result in its workspace
{code}

Write integration tests for this use case on top of Memory & Cassandra 
integration tests.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2711) [WebAdmin DMV Route] Delete API

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2711:
---

 Summary: [WebAdmin DMV Route] Delete API
 Key: JAMES-2711
 URL: https://issues.apache.org/jira/browse/JAMES-2711
 Project: James Server
  Issue Type: New Feature
  Components: webadmin
Reporter: Rene Cordier
 Fix For: 3.4.0


*API proposal*

{code:java}
DEL /deletedMessages/users/:userId/messages/:messageId
- 200 Success + TaskId
- 404 if the user does not exist 
{code}

* Define a DEL method in DeletedMessagesVaultRoutes(#1024 (closed))
* When this API is called, Mono delete(MessageId) of `DeletedMessageVault 
will be triggered.
* Create unit-test with DeletedMessageVault impl with CassandraMailRepository




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2710) [WebAdmin DMRS Route] Purge API

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2710:
---

 Summary: [WebAdmin DMRS Route] Purge API
 Key: JAMES-2710
 URL: https://issues.apache.org/jira/browse/JAMES-2710
 Project: James Server
  Issue Type: New Feature
  Components: webadmin
Reporter: Rene Cordier
 Fix For: 3.4.0


*API proposal*

{code:java}
POST /deletedMessages?action=purge
- 200 success
{"taskId":"1234-5678"}
{code}

* Define POST method in DeletedMessageVaultRoutes(#1024 (closed))
* Using configuration retention to work with purge

Document that a CRON needs to be configured to call this endpoint in a regular 
basis.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2709) [BlobSharingMechanism] LinShare implementation

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2709:
---

 Summary: [BlobSharingMechanism] LinShare implementation
 Key: JAMES-2709
 URL: https://issues.apache.org/jira/browse/JAMES-2709
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


Implement as a third-party software a BlobSharingMechanism that:

* Upload the file in the sharee workspace
* Shares it to the reciepient

Implement tests about it.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2708) Implementing a LinShare JAVA client

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2708:
---

 Summary: Implementing a LinShare JAVA client
 Key: JAMES-2708
 URL: https://issues.apache.org/jira/browse/JAMES-2708
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


Implement an HTTP based library for dealing with LinShare. (located in 
/third-party folder)

You will need to:

* Authenticate
* Upload a file
* Share a file with a user

You will test this on top of a dockerized LinShare.

You might want to connect as sharee and check shares.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2707) [BlobSharing] Configuration of choosing BlobSharing Impl

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2707:
---

 Summary: [BlobSharing] Configuration of choosing BlobSharing Impl
 Key: JAMES-2707
 URL: https://issues.apache.org/jira/browse/JAMES-2707
 Project: James Server
  Issue Type: New Feature
Reporter: Rene Cordier
 Fix For: 3.4.0


We have many kind of sharing Zipped DeletedMessages so that we need to specify 
a new configuration file to define which kind of sharing we want to use. Ex: 
Linshare, File + email,...

DoD:

* Create new `.properties` file.
* Create new POJO for that configuration file `BlobSharingConfiguration`



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Updated] (JAMES-2706) Normalize metric contract testing

2019-03-31 Thread Rene Cordier (JIRA)


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

Rene Cordier updated JAMES-2706:

Fix Version/s: 3.4.0

> Normalize metric contract testing
> -
>
> Key: JAMES-2706
> URL: https://issues.apache.org/jira/browse/JAMES-2706
> Project: James Server
>  Issue Type: Improvement
>Reporter: Rene Cordier
>Priority: Major
> Fix For: 3.4.0
>
>
> We developed a `RecordingMetricFactory` and a `RecordingTimeMetric` classes 
> for testing pre-deletion hooks metrics here : 
> https://github.com/linagora/james-project/pull/2246
> It would be cool to try to extend it to other metrics testings, instead of 
> using mocks.
> Thus you should :
> * extract those classes
> * refactor all metrics tests to use the new structure instead of mocks
> * rework on metric test classes if necessary



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2706) Normalize metric contract testing

2019-03-31 Thread Rene Cordier (JIRA)
Rene Cordier created JAMES-2706:
---

 Summary: Normalize metric contract testing
 Key: JAMES-2706
 URL: https://issues.apache.org/jira/browse/JAMES-2706
 Project: James Server
  Issue Type: Improvement
Reporter: Rene Cordier


We developed a `RecordingMetricFactory` and a `RecordingTimeMetric` classes for 
testing pre-deletion hooks metrics here : 
https://github.com/linagora/james-project/pull/2246

It would be cool to try to extend it to other metrics testings, instead of 
using mocks.

Thus you should :

* extract those classes
* refactor all metrics tests to use the new structure instead of mocks
* rework on metric test classes if necessary



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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



[jira] [Created] (JAMES-2705) LocalFileBlobExportMechanism should export to files with specified file extension

2019-03-31 Thread JIRA
Trần Tiến Đức created JAMES-2705:


 Summary: LocalFileBlobExportMechanism should export to files with 
specified file extension
 Key: JAMES-2705
 URL: https://issues.apache.org/jira/browse/JAMES-2705
 Project: James Server
  Issue Type: Improvement
Reporter: Trần Tiến Đức


Improvement after finishing JAMES-2684
 * make LocalFileBlobExportMechanism generates files with .zip extension
 * make DeletedMessageZipper generate archive entries with .eml extension at 
the end of the names



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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