You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2020/02/14 09:56:11 UTC

[james-project] branch master updated (2422d3e -> 78e20d5)

This is an automated email from the ASF dual-hosted git repository.

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


    from 2422d3e  JAMES-3040: change behavior of uploadDocument directly to userTargetSpace
     new 2bf92cb  JAMES-3047 Guice structured logging documentation
     new b97e6ee  JAMES-3047 Add missing health checks in webadmin documentation
     new c04c9d4  JAMES-3047 DistributedJames guide skeleton
     new f83a247  JAMES-3047 Missing user recompute messageFastView documentation
     new de3cd2a  JAMES-3047 Menu entry for Distributed James administration guide
     new 215ba72  JAMES-3048 WebAdmin doc: add ContentType header upon JSON submission
     new 66c2c67  JAMES-3048 WebAdmin doc: curl need bash escaping for & url params
     new e0d4d5d  JAMES-3048 WebAdmin doc: reprocess mailRepository query params default
     new 78e20d5  JAMES-3048 Distributed admin procedured: Mail processing

The 9 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:
 .../server/manage-guice-distributed-james.md       | 148 +++++++++++++++++++++
 src/site/markdown/server/manage-webadmin.md        |  79 ++++++++---
 src/site/site.xml                                  |   1 +
 src/site/xdoc/server/monitor-logging.xml           |  84 ++++++++++++
 4 files changed, 296 insertions(+), 16 deletions(-)
 create mode 100644 src/site/markdown/server/manage-guice-distributed-james.md


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


[james-project] 07/09: JAMES-3048 WebAdmin doc: curl need bash escaping for & url params

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 66c2c67c318f46dc200e4ec8fc400056225b487a
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Feb 12 14:07:21 2020 +0700

    JAMES-3048 WebAdmin doc: curl need bash escaping for & url params
---
 src/site/markdown/server/manage-webadmin.md | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 559bf4d..14a8120 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -440,7 +440,7 @@ The scheduled task will have the following type `full-reindexing` and the follow
 Given `bbdb69c9-082a-44b0-a85a-6e33e74287a5` being a taskId generated for a reIndexing tasks
 
 ```
-curl -XPOST http://ip:port/mailboxes?task=reIndex&reIndexFailedMessagesOf=bbdb69c9-082a-44b0-a85a-6e33e74287a5
+curl -XPOST 'http://ip:port/mailboxes?task=reIndex&reIndexFailedMessagesOf=bbdb69c9-082a-44b0-a85a-6e33e74287a5'
 ```
 
 The scheduled task will have the following type `error-recovery-indexation` and the following `additionalInformation`:
@@ -927,7 +927,7 @@ Response codes:
 ### Searching user by quota ratio
 
 ```
-curl -XGET http://ip:port/quota/users?minOccupationRatio=0.8&maxOccupationRatio=0.99&limit=100&offset=200&domain=oppen-paas.org
+curl -XGET 'http://ip:port/quota/users?minOccupationRatio=0.8&maxOccupationRatio=0.99&limit=100&offset=200&domain=oppen-paas.org'
 ```
 
 Will return:
@@ -2152,7 +2152,7 @@ You can pass additional URL parameters to this call in order to limit the output
 Example:
 
 ```
-curl -XGET http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?limit=100&offset=500
+curl -XGET 'http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?limit=100&offset=500'
 ```
 
 Response codes:
@@ -2325,7 +2325,7 @@ Additional query parameters are supported:
 For instance:
 
 ```
-curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess&processor=transport&queue=spool
+curl -XPATCH 'http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=reprocess&processor=transport&queue=spool'
 ```
 
 Note that the `action` query parameter is compulsary and can only take value `reprocess`.
@@ -2375,7 +2375,7 @@ Consequently, only few cases will give a different result, definitively storing
 For instance:
 
 ```
-curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails/name1?action=reprocess&processor=transport&queue=spool
+curl -XPATCH 'http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails/name1?action=reprocess&processor=transport&queue=spool'
 ```
 
 Note that the `action` query parameter is compulsary and can only take value `reprocess`.
@@ -3093,7 +3093,7 @@ while:
 Retrieve deleted messages matched with requested query from an user then share the content to a targeted mail address (exportTo)
 
 ```
-curl -XPOST http://ip:port/deletedMessages/users/userExportFrom@domain.ext?action=export&exportTo=userReceiving@domain.ext
+curl -XPOST 'http://ip:port/deletedMessages/users/userExportFrom@domain.ext?action=export&exportTo=userReceiving@domain.ext'
 
 BODY: is the json query has the same structure with Restore Deleted Messages section
 ```


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


[james-project] 09/09: JAMES-3048 Distributed admin procedured: Mail processing

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 78e20d5cbd577878ba2451e13db516e07a9629cb
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Feb 12 14:52:40 2020 +0700

    JAMES-3048 Distributed admin procedured: Mail processing
    
    Context about mail processing components, details about when and how to
    reprocess emails in mail repositories.
    
    Includes diagnostic via logs and metrics.
---
 .../server/manage-guice-distributed-james.md       | 65 ++++++++++++++++++++--
 1 file changed, 60 insertions(+), 5 deletions(-)

diff --git a/src/site/markdown/server/manage-guice-distributed-james.md b/src/site/markdown/server/manage-guice-distributed-james.md
index 8a2532a..57f0698 100644
--- a/src/site/markdown/server/manage-guice-distributed-james.md
+++ b/src/site/markdown/server/manage-guice-distributed-james.md
@@ -17,6 +17,7 @@ advanced users.
 
  - [Overall architecture](#overall-architecture)
  - [Basic Monitoring](#basic-monitoring)
+ - [Mail Processing](#mail-processing)
 
 ## Overall architecture
 
@@ -84,10 +85,64 @@ Here are the available checks alongside the insight they offer:
  - **Cassandra backend**: Cassandra storage. Ensure queries can be executed on the connection James uses.
  - **ElasticSearch Backend**: ElasticSearch storage. Triggers an ElasticSearch health request on indices James uses.
  - **RabbitMQ backend**: RabbitMQ messaging. Verifies an open connection and an open channel are well available.
- - **Guice application lifecycle**: Ensures James Guice successfully started, and is up. Logs should contain explanations if
- James did not start well.
- - **MessageFastViewProjection**: Follows MessageFastViewProjection cache miss rates and warns if it is below 10%. If this 
- projection is missing, this results in performance issues for JMAP GetMessages list requests. WebAdmin offers a
+ - **Guice application lifecycle**: Ensures James Guice successfully started, and is up. Logs should contain 
+ explanations if James did not start well.
+ - **MessageFastViewProjection**: Follows MessageFastViewProjection cache miss rates and warns if it is below 10%. If 
+ this projection is missing, this results in performance issues for JMAP GetMessages list requests. WebAdmin offers a
  [global](manage-webadmin.html#recomputing-global-jmap-fast-message-view-projection) and 
  [per user](manage-webadmin.html#recomputing-user-jmap-fast-message-view-projection) projection re-computation. Note that
- as computation is asynchronous, this projection can be slightly out of sync on a normally behaving server.
\ No newline at end of file
+ as computation is asynchronous, this projection can be slightly out of sync on a normally behaving server.
+
+## Mail Processing
+
+Mail processing allows to take asynchronously business decisions on received emails.
+
+Here are its components:
+
+ - The `spooler` takes mail out of the mailQueue and executes mail processing within the `mailet container`.
+ - The `mailet container` synchronously executes the user defined logic. This 'logic' is written through the use of
+  `mailet`, `matcher` and `processor`.
+ - A `mailet` represents an action: mail modification, envelop modification, a side effect, or stop processing.
+ - A `matcher` represents a condition to execute a mailet.
+ - A `processor` is a flow of pair of `matcher` and `mailet` executed sequentially. The `ToProcessor` mailet is a `goto` 
+ instruction to start executing another `processor`
+ - A `mail repository` allows storage of a mail as part of its processing. Standard configuration relies on the 
+ following mail repository:
+     - `cassandra://var/mail/error/` : unexpected errors that occurred during mail processing. Emails impacted by 
+     performance related exceptions, or logical bug within James code are typically stored here. These mails could be 
+     reprocessed once the cause of the error is fixed. The `Mail.error` field can help diagnose the issue. Correlation 
+     with logs can be achieved via the use of the `Mail.name` field.
+     - `cassandra://var/mail/address-error/` : mail addressed to a non-existing recipient of a handled local domain. 
+     These mails could be reprocessed once the user is created, for instance.
+     - `cassandra://var/mail/relay-denied/` : mail for whom relay was denied: missing authentication can, for instance, 
+     be a cause. In addition to prevent disasters upon miss configuration, an email review of this mail repository can 
+     help refine a host spammer blacklist.
+     - `cassandra://var/mail/rrt-error/` : runtime error upon Recipient Rewritting occurred. This is typically due to a 
+     loop. We recommend verifying user mappings via [User Mappings webadmin API](manage-webadmin.html#user-mappings) 
+     then once identified break the loop by removing some Recipient Rewrite Table entry via the 
+     [Delete Alias](manage-webadmin.html#removing-an-alias-of-an-user), 
+     [Delete Group member](manage-webadmin.html#removing-a-group-member), 
+     [Delete forward](manage-webadmin.html#removing-a-destination-of-a-forward), 
+     [Delete Address mapping](manage-webadmin.html#remove-an-address-mapping), 
+     [Delete Domain mapping](manage-webadmin.html#removing-a-domain-mapping) or 
+     [Delete Regex mapping](manage-webadmin.html#removing-a-regex-mapping) APIs (as needed). The `Mail.error` field can 
+     help diagnose the issue as well. Then once the root cause has been addressed, the mail can be reprocessed.
+
+Read [this](config-mailetcontainer.html) to discover mail processing configuration, including error management.
+
+Currently, an administrator can monitor mail processing failure through `ERROR` log review. We also recommend watching 
+in Kibana INFO logs using the `org.apache.james.transport.mailets.ToProcessor` value as their `logger`. Metrics about 
+mail repository size, and the corresponding Grafana boards are yet to be contributed.
+
+WebAdmin exposes all utilities for 
+[reprocessing all mails in a mail repository](manage-webadmin.html#reprocessing-mails-from-a-mail-repository)
+or 
+[reprocessing a single mail in a mail repository](manage-webadmin.html#reprocessing-a-specific-mail-from-a-mail-repository).
+
+Also, one can decide to 
+[delete all the mails of a mail repository](manage-webadmin.html#removing-all-mails-from-a-mail-repository) 
+or [delete a single mail of a mail repository](manage-webadmin.html#removing-a-mail-from-a-mail-repository).
+
+Performance of mail processing can be monitored via the 
+[mailet grafana board](https://github.com/apache/james-project/blob/master/grafana-reporting/MAILET-1490071694187-dashboard.json) 
+and [matcher grafana board](https://github.com/apache/james-project/blob/master/grafana-reporting/MATCHER-1490071813409-dashboard.json).


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


[james-project] 05/09: JAMES-3047 Menu entry for Distributed James administration guide

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit de3cd2ad759adaac2b756958035836f09c65e9d9
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Feb 11 16:38:04 2020 +0700

    JAMES-3047 Menu entry for Distributed James administration guide
---
 src/site/site.xml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/site/site.xml b/src/site/site.xml
index 9639417..a8c662f 100644
--- a/src/site/site.xml
+++ b/src/site/site.xml
@@ -146,6 +146,7 @@
                         <item name="Command line" href="/server/manage-cli.html" />
                         <item name="Metrics" href="/server/metrics.html" />
                         <item name="WebAdmin" href="/server/manage-webadmin.html" />
+                        <item name="Distributed James" href="/server/manage-guice-distributed-james.html" />
                     </item>
                     <item name="6. Monitor" href="/server/monitor.html" collapse="true" >
                         <item name="Folders" href="/server/monitor-folders.html" />


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


[james-project] 01/09: JAMES-3047 Guice structured logging documentation

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 2bf92cbf2b525d078a7c86fc03d85d4c484bea40
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Feb 11 14:54:51 2020 +0700

    JAMES-3047 Guice structured logging documentation
    
    This documentation was missing.
    
    I included a sample file, as well as documentation links of related
    libraries and softwares.
---
 src/site/xdoc/server/monitor-logging.xml | 84 ++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/src/site/xdoc/server/monitor-logging.xml b/src/site/xdoc/server/monitor-logging.xml
index 178c8fe..af78408 100644
--- a/src/site/xdoc/server/monitor-logging.xml
+++ b/src/site/xdoc/server/monitor-logging.xml
@@ -339,6 +339,90 @@ log4j.logger.james.domainlist=INFO, DOMAINLIST
   
   </section>
 
+    <section name="Guice products and logging">
+        <p>James Guice products uses a different logging library: <a href="http://logback.qos.ch/">logback</a>. Information about logback
+            configuration can be found <a href="http://logback.qos.ch/manual/configuration.html">here</a></p>
+
+        <p>Within James guice applications, we leverage the use of MDC in order to achieve structured logging, and better add context to the
+        logged information. We furthermore ship <a href="https://github.com/linagora/logback-elasticsearch-appender">Logback
+        Elasticsearch Appender</a> on the classpath to easily allow direct log indexation in
+        <a href="https://www.elastic.co/elasticsearch">ElasticSearch</a></p>
+
+        <ul>Here is a sample <b>conf/logback.xml</b> configuration file for logback with the following pre-requisites:
+            <li>Logging both in an unstructured fashion on the console and in a structure fashion in ElasticSearch</li>
+            <li>Logging ElasticSearch Log appender logs in the console</li>
+        </ul>
+
+        <source>
+            &lt;?xml version="1.0" encoding="UTF-8"?&gt;
+            &lt;configuration scan="true" scanPeriod="30 seconds"&gt;
+
+                &lt;contextListener class="ch.qos.logback.classic.jul.LevelChangePropagator"&gt;
+                    &lt;resetJUL&gt;true&lt;/resetJUL&gt;
+                &lt;/contextListener&gt;
+
+                &lt;appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"&gt;
+                    &lt;encoder&gt;
+                        &lt;pattern&gt;%d{yyyy.MM.dd HH:mm:ss.SSS} %highlight([%-5level]) %logger{15} - %msg%n%rEx&lt;/pattern&gt;
+                        &lt;immediateFlush&gt;false&lt;/immediateFlush&gt;
+                    &lt;/encoder&gt;
+                &lt;/appender&gt;
+
+                &lt;appender name="ELASTIC" class="com.linagora.logback.elasticsearch.ElasticsearchAppender"&gt;
+                    &lt;url&gt;http://elasticsearch:9200/_bulk&lt;/url&gt;
+                    &lt;index&gt;logs-james-${NAMESPACE}-%date{yyyy.MM.dd}&lt;/index&gt;
+                    &lt;type&gt;tester&lt;/type&gt;
+                    &lt;includeMdc&gt;true&lt;/includeMdc&gt;
+                    &lt;excludedMdcKeys&gt;host&lt;/excludedMdcKeys&gt;
+                    &lt;errorLoggerName&gt;es-error-logger&lt;/errorLoggerName&gt;
+                    &lt;properties&gt;
+                        &lt;property&gt;
+                            &lt;name&gt;host&lt;/name&gt;
+                            &lt;value&gt;${HOSTNAME}&lt;/value&gt;
+                            &lt;allowEmpty&gt;false&lt;/allowEmpty&gt;
+                        &lt;/property&gt;
+                        &lt;property&gt;
+                            &lt;name&gt;severity&lt;/name&gt;
+                            &lt;value&gt;%level&lt;/value&gt;
+                        &lt;/property&gt;
+                        &lt;property&gt;
+                            &lt;name&gt;thread&lt;/name&gt;
+                            &lt;value&gt;%thread&lt;/value&gt;
+                        &lt;/property&gt;
+                        &lt;property&gt;
+                            &lt;name&gt;stacktrace&lt;/name&gt;
+                            &lt;value&gt;%ex&lt;/value&gt;
+                        &lt;/property&gt;
+                        &lt;property&gt;
+                            &lt;name&gt;logger&lt;/name&gt;
+                            &lt;value&gt;%logger&lt;/value&gt;
+                        &lt;/property&gt;
+                    &lt;/properties&gt;
+                    &lt;headers&gt;
+                        &lt;header&gt;
+                            &lt;name&gt;Content-Type&lt;/name&gt;
+                            &lt;value&gt;application/json&lt;/value&gt;
+                        &lt;/header&gt;
+                    &lt;/headers&gt;
+                &lt;/appender&gt;
+
+                &lt;root level="WARN"&gt;
+                    &lt;appender-ref ref="CONSOLE" /&gt;
+                    &lt;appender-ref ref="ELASTIC" /&gt;
+                &lt;/root&gt;
+
+                &lt;logger name="es-error-logger" level="DEBUG" additivity="false"&gt;
+                    &lt;appender-ref ref="CONSOLE" /&gt;
+                &lt;/logger&gt;
+
+                &lt;logger name="org.apache.james" level="DEBUG" /&gt;
+
+            &lt;/configuration&gt;
+        </source>
+
+        <p>Then a <a href="https://www.elastic.co/kibana">Kibana</a> server can be setted up in order to display, search, filter logs, reusing directly
+            data in elasticSearch in the following indexes: <b>logs-james-${NAMESPACE}-%date{yyyy.MM.dd}</b></p>
+    </section>
 </body>
 
 </document>


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


[james-project] 03/09: JAMES-3047 DistributedJames guide skeleton

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c04c9d47fd1288663d199e2390b2b8527b7288fb
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Feb 11 15:29:42 2020 +0700

    JAMES-3047 DistributedJames guide skeleton
    
    Includes:
     - High level storage architecture overview
     - Basic monitoring including logs, metrics and healthChecks
    
    It will be enriched with procedures for diagnosed problems.
---
 .../server/manage-guice-distributed-james.md       | 93 ++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/src/site/markdown/server/manage-guice-distributed-james.md b/src/site/markdown/server/manage-guice-distributed-james.md
new file mode 100644
index 0000000..8a2532a
--- /dev/null
+++ b/src/site/markdown/server/manage-guice-distributed-james.md
@@ -0,0 +1,93 @@
+# Managing Guice distributed James
+
+This guide aims to be an entry-point to the James documentation for user managing a distributed Guice James server.
+
+It includes:
+
+ - Simple architecture explanations
+ - Propose some diagnostics for some common issues
+ - Present procedures that can be set up to address these issues
+
+In order to not duplicate information, existing documentation will be linked.
+
+Please note that this product is under active development, should be considered experimental and thus targets 
+advanced users.
+
+## Table of content
+
+ - [Overall architecture](#overall-architecture)
+ - [Basic Monitoring](#basic-monitoring)
+
+## Overall architecture
+
+Guice distributed James server intends to provide a horizontally scalable email server.
+
+In order to achieve this goal, this product leverages the following technologies:
+
+ - **Cassandra** for meta-data storage
+ - **ObjectStorage** (S3) for binary content storage
+ - **ElasticSearch** for search
+ - **RabbitMQ** for messaging
+
+A [docker-compose](https://github.com/apache/james-project/blob/master/dockerfiles/run/docker-compose.yml) file is 
+available to allow you to quickly deploy locally this product.
+
+## Basic Monitoring
+
+A toolbox is available to help an administrator diagnose issues:
+ - [Structured logging into Kibana](#structured-logging-into-kibana)
+ - [Metrics graphs into Grafana](#metrics-graphs-into-grafana)
+ - [WebAdmin HealthChecks](#webadmin-healthchecks)
+
+### Structured logging into Kibana
+
+Read this page regarding [setting up structured logging](monitor-logging.html#Guice_products_and_logging).
+
+We recommend to closely monitoring **ERROR** and **WARNING** logs. Those logs should be considered not normal.
+
+If you encounter some suspicious logs:
+ - If you have any doubt about the log being caused by a bug in James source code, please reach us via  
+the bug tracker, the user mailing list or our Gitter channel (see our [community page](http://james.apache.org/#second))
+ - They can be due to insufficient performance from tier applications (eg Cassandra timeouts). In such case we advise
+ you to conduct a close review of performances at the tier level.
+
+Leveraging filters in Kibana discover view can help filtering out "already known" frequently occurring logs.
+
+When reporting ERROR or WARNING logs, consider adding the full logs, and related data (eg the raw content of a mail 
+triggering an issue) to the bug report in order to ease resolution.
+
+### Metrics graphs into Grafana
+
+James keeps tracks of various metrics and allow to easily visualize them.
+
+Read this page for [explanations on metrics](metrics.html).
+
+Here is a list of [available metric boards](https://github.com/apache/james-project/tree/master/grafana-reporting)
+
+Configuration of [ElasticSearch metric exporting](config-elasticsearch.html) allows a direct display within 
+[Grafana](https://grafana.com/)
+
+Monitoring these graphs on a regular basis allows diagnosing early some performance issues. 
+
+If some metrics seem abnormally slow despite in depth database performance tuning, feedback is appreciated as well on 
+the bug tracker, the user mailing list or our Gitter channel (see our [community page](http://james.apache.org/#second))
+. Any additional details categorizing the slowness are appreciated as well (details of the slow requests for instance).
+
+### WebAdmin HealthChecks
+
+James webadmin API allows to run healthChecks for a quick health overview.
+
+Here is related [webadmin documentation](manage-webadmin.html#HealthCheck)
+
+Here are the available checks alongside the insight they offer:
+
+ - **Cassandra backend**: Cassandra storage. Ensure queries can be executed on the connection James uses.
+ - **ElasticSearch Backend**: ElasticSearch storage. Triggers an ElasticSearch health request on indices James uses.
+ - **RabbitMQ backend**: RabbitMQ messaging. Verifies an open connection and an open channel are well available.
+ - **Guice application lifecycle**: Ensures James Guice successfully started, and is up. Logs should contain explanations if
+ James did not start well.
+ - **MessageFastViewProjection**: Follows MessageFastViewProjection cache miss rates and warns if it is below 10%. If this 
+ projection is missing, this results in performance issues for JMAP GetMessages list requests. WebAdmin offers a
+ [global](manage-webadmin.html#recomputing-global-jmap-fast-message-view-projection) and 
+ [per user](manage-webadmin.html#recomputing-user-jmap-fast-message-view-projection) projection re-computation. Note that
+ as computation is asynchronous, this projection can be slightly out of sync on a normally behaving server.
\ No newline at end of file


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


[james-project] 06/09: JAMES-3048 WebAdmin doc: add ContentType header upon JSON submission

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 215ba7242a68d2e0aaf8c5bde0b45dc7f3bff287
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Feb 12 14:05:40 2020 +0700

    JAMES-3048 WebAdmin doc: add ContentType header upon JSON submission
---
 src/site/markdown/server/manage-webadmin.md | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 96fd152..559bf4d 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -294,7 +294,9 @@ Response codes:
 ### Create a user
 
 ```
-curl -XPUT http://ip:port/users/usernameToBeUsed -d '{"password":"passwordToBeUsed"}'
+curl -XPUT http://ip:port/users/usernameToBeUsed \
+  -d '{"password":"passwordToBeUsed"}' \ 
+  -H "Content-Type: application/json"
 ```
 
 Resource name usernameToBeUsed representing valid users, 
@@ -1453,7 +1455,9 @@ This is a temporary workaround for the **Ghost mailbox** bug encountered using t
 You can use the mailbox merging feature in order to merge the old "ghosted" mailbox with the new one.
 
 ```
-curl -XPOST http://ip:port/cassandra/mailbox/merging -d '{"mergeOrigin":"id1", "mergeDestination":"id2"}'
+curl -XPOST http://ip:port/cassandra/mailbox/merging \
+  -d '{"mergeOrigin":"id1", "mergeDestination":"id2"}' \
+  -H "Content-Type: application/json"
 ```
 
 Will scedule a task for :
@@ -2533,7 +2537,8 @@ The scheduled task will have the following type `clear-mail-queue` and the follo
 
 ```
 curl -XPATCH http://ip:port/mailQueues/mailQueueName?delayed=true \
-  -d '{"delayed": false}'
+  -d '{"delayed": false}' \
+  -H "Content-Type: application/json"
 ```
 
 This request should have the query parameter *delayed* set to *true*, in order to indicate only delayed mails are affected.


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


[james-project] 08/09: JAMES-3048 WebAdmin doc: reprocess mailRepository query params default

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e0d4d5d096b09f4c9525cf8d5abaa69784571e49
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Wed Feb 12 14:10:02 2020 +0700

    JAMES-3048 WebAdmin doc: reprocess mailRepository query params default
    
    The default behaviour being omitted is misleading.
---
 src/site/markdown/server/manage-webadmin.md | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 14a8120..ac0965a 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -2318,8 +2318,9 @@ curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails?action=
 ```
 
 Additional query parameters are supported:
- - `queue` allow you to target the mail queue you want to enqueue the mails in.
- - `processor` allow you to overwrite the state of the reprocessing mails, and thus select the processors they will start their processing in.
+ - `queue` allows you to target the mail queue you want to enqueue the mails in. Defaults to `spool`.
+ - `processor` allows you to overwrite the state of the reprocessing mails, and thus select the processors they will start their processing in.
+ Defaults to the `state` field of each processed email.
 
 
 For instance:
@@ -2366,8 +2367,9 @@ curl -XPATCH http://ip:port/mailRepositories/var%2Fmail%2Ferror%2F/mails/name1?a
 ```
 
 Additional query parameters are supported:
- - `queue` allow you to target the mail queue you want to enqueue the mails in.
- - `processor` allow you to overwrite the state of the reprocessing mails, and thus select the processors they will start their processing in.
+ - `queue` allows you to target the mail queue you want to enqueue the mails in. Defaults to `spool`.
+ - `processor` allows you to overwrite the state of the reprocessing mails, and thus select the processors they will start their processing in.
+ Defaults to the `state` field of each processed email.
 
 While `processor` being an optional parameter, not specifying it will result reprocessing the mails in their current state ([see documentation about processors and state](https://james.apache.org/server/feature-mailetcontainer.html#Processors)).
 Consequently, only few cases will give a different result, definitively storing them out of the mail repository.


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


[james-project] 04/09: JAMES-3047 Missing user recompute messageFastView documentation

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f83a247ddfc7b2e3d48423f8bfc1a95b50e782ba
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Feb 11 16:11:28 2020 +0700

    JAMES-3047 Missing user recompute messageFastView documentation
---
 src/site/markdown/server/manage-webadmin.md | 42 +++++++++++++++++++++++++++--
 1 file changed, 40 insertions(+), 2 deletions(-)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index f427886..96fd152 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -360,14 +360,14 @@ Response codes:
 
 The kind of task scheduled depends on the action parameter. See below for details.
 
-### Recomputing JMAP fast message view projection
+### Recomputing Global JMAP fast message view projection
 
 This action is only available for backends supporting JMAP protocol.
 
 Message fast view projection stores message properties expected to be fast to fetch but are actually expensive to compute,
 in order for GetMessages operation to be fast to execute for these properties.
 
-These projection items are asynchronously computed via a dedicated listener.
+These projection items are asynchronously computed on mailbox events.
 
 You can force the full projection recomputation by calling the following endpoint:
 
@@ -561,6 +561,7 @@ Warning: During the re-indexing, the result of search operations might be altere
  - [Listing user mailboxes](#Listing_user_mailboxes)
  - [Deleting_user_mailboxes](#Deleting_user_mailboxes)
  - [ReIndexing a user mails](#ReIndexing_a_user_mails)
+ - [Recomputing User JMAP fast message view projection](#Recomputing_User_JMAP_fast_message_view_projection)
 
 ### Creating a mailbox
 
@@ -681,6 +682,43 @@ Warning: Canceling this task should be considered unsafe as it will leave the cu
 Warning: While we have been trying to reduce the inconsistency window to a maximum (by keeping track of ongoing events),
 concurrent changes done during the reIndexing might be ignored.
 
+### Recomputing User JMAP fast message view projection
+
+This action is only available for backends supporting JMAP protocol.
+
+Message fast view projection stores message properties expected to be fast to fetch but are actually expensive to compute,
+in order for GetMessages operation to be fast to execute for these properties.
+
+These projection items are asynchronously computed on mailbox events.
+
+You can force the full projection recomputation by calling the following endpoint:
+
+```
+curl -XPOST /users/usernameToBeUsed/mailboxes?task=recomputeFastViewProjectionItems
+```
+
+Will schedule a task for recomputing the fast message view projection for all mailboxes of `usernameToBeUsed`.
+
+[More details about endpoints returning a task](#Endpoints_returning_a_task).
+
+
+The scheduled task will have the following type `RecomputeAllPreviewsTask` and the following `additionalInformation`:
+
+```
+{
+  "type":"RecomputeAllPreviewsTask",
+  "username": "usernameToBeUsed",
+  "processedMessageCount": 3,
+  "failedMessageCount": 1
+}
+```
+
+Response codes:
+
+ - 201: Success. Corresponding task id is returned.
+ - 400: Error in the request. Details can be found in the reported error.
+ - 404: User not found.
+
 ## Administrating quotas by users
 
  - [Getting the quota for a user](#Getting_the_quota_for_a_user)


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


[james-project] 02/09: JAMES-3047 Add missing health checks in webadmin documentation

Posted by bt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit b97e6ee53b43ad494ad45f7533fb79844cd07b6d
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Tue Feb 11 15:20:13 2020 +0700

    JAMES-3047 Add missing health checks in webadmin documentation
---
 src/site/markdown/server/manage-webadmin.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/site/markdown/server/manage-webadmin.md b/src/site/markdown/server/manage-webadmin.md
index 618ead5..f427886 100644
--- a/src/site/markdown/server/manage-webadmin.md
+++ b/src/site/markdown/server/manage-webadmin.md
@@ -94,9 +94,11 @@ Will return a list of healthChecks execution result, with an aggregated result:
 
 Supported health checks include:
  - **Cassandra backend**: Cassandra storage. Included in Cassandra Guice based products.
+ - **ElasticSearch Backend**: ElasticSearch storage. Included in Cassandra Guice based products.
+ - **Guice application lifecycle**: included in all Guice products.
  - **JPA Backend**: JPA storage. Included in JPA Guice based products.
+ - **MessageFastViewProjection**: included in memory and Cassandra based Guice products.
  - **RabbitMQ backend**: RabbitMQ messaging. Included in Distributed Guice based products.
- - **Guice application lifecycle**: included in all Guice products.
 
 Response codes:
 


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