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

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


The following commit(s) were added to refs/heads/master by this push:
     new 50a7eae  JAMES-2726 Add In-memory image creation
     new b941483  Merge remote-tracking branch 
'gdifolco/JAMES-2726-docker-inmemory-image'
50a7eae is described below

commit 50a7eaec0d4f8dbc55a077ee45fb6d18d7d7ddbd
Author: Gautier DI FOLCO <gdifo...@linagora.com>
AuthorDate: Tue Apr 2 17:38:38 2019 +0200

    JAMES-2726 Add In-memory image creation
---
 dockerfiles/compilation/java-8/compile.sh          |  11 +-
 dockerfiles/run/guice/memory/Dockerfile            |  32 +++++
 .../memory/destination/conf/batchsizes.properties  |  10 ++
 .../conf/deletedMessageVault.properties            |   1 +
 .../guice/memory/destination/conf/dnsservice.xml   |  29 +++++
 .../guice/memory/destination/conf/domainlist.xml   |  28 ++++
 .../destination/conf/elasticsearch.properties      |  29 +++++
 .../guice/memory/destination/conf/imapserver.xml   |  62 +++++++++
 .../guice/memory/destination/conf/jmap.properties  |  13 ++
 .../guice/memory/destination/conf/jmx.properties   |  29 +++++
 .../guice/memory/destination/conf/jwt_publickey    |   9 ++
 .../guice/memory/destination/conf/listeners.xml    |  29 +++++
 .../run/guice/memory/destination/conf/logback.xml  |  47 +++++++
 .../memory/destination/conf/mailetcontainer.xml    | 144 +++++++++++++++++++++
 .../destination/conf/mailrepositorystore.xml       |  31 +++++
 .../memory/destination/conf/managesieveserver.xml  |  65 ++++++++++
 .../guice/memory/destination/conf/pop3server.xml   |  42 ++++++
 .../destination/conf/recipientrewritetable.xml     |  26 ++++
 .../guice/memory/destination/conf/smtpserver.xml   | 105 +++++++++++++++
 .../memory/destination/conf/usersrepository.xml    |  26 ++++
 .../memory/destination/conf/webadmin.properties    |  41 ++++++
 .../memory/destination/extensions-jars/README.md   |   5 +
 server/container/guice/memory-guice/pom.xml        |   5 +-
 .../org/apache/james/FakeMessageSearchIndex.java   |  94 ++++++++++++++
 .../org/apache/james/FakeSearchMailboxModule.java  |  40 ++++++
 .../org/apache/james/MemoryJamesServerMain.java    |   1 +
 .../james/modules/data/MemoryDataModule.java       |  10 +-
 27 files changed, 956 insertions(+), 8 deletions(-)

diff --git a/dockerfiles/compilation/java-8/compile.sh 
b/dockerfiles/compilation/java-8/compile.sh
index f08f6ec..fff263f 100755
--- a/dockerfiles/compilation/java-8/compile.sh
+++ b/dockerfiles/compilation/java-8/compile.sh
@@ -18,6 +18,7 @@ CASSANDRA_RABBITMQ_DESTINATION=/cassandra-rabbitmq/destination
 CASSANDRA_RABBITMQ_LDAP_DESTINATION=/cassandra-rabbitmq-ldap/destination
 JPA_DESTINATION=/jpa/destination
 JPA_SMTP_DESTINATION=/jpa-smpt/destination
+MEMORY_DESTINATION=/memory/destination
 SPRING_DESTINATION=/spring/destination
 SWAGGER_DESTINATION=/swagger
 
@@ -104,6 +105,14 @@ if [ $? -eq 0 ]; then
       cp -r server/container/cli/target/james-server-cli.lib 
$JPA_SMTP_DESTINATION || true
    fi
 
+   if [ -d "$MEMORY_DESTINATION" ]; then
+      echo "Copying memory JARs"
+      cp 
server/container/guice/memory-guice/target/james-server-memory-guice.jar 
$MEMORY_DESTINATION || true
+      cp -r 
server/container/guice/memory-guice/target/james-server-memory-guice.lib 
$MEMORY_DESTINATION || true
+      cp server/container/cli/target/james-server-cli.jar $MEMORY_DESTINATION 
|| true
+      cp -r server/container/cli/target/james-server-cli.lib 
$MEMORY_DESTINATION || true
+   fi
+
    if [ -d "$SPRING_DESTINATION" ]; then
       echo "Copying SPRING jars"
       cp server/app/target/james-server-app-*-app.zip $SPRING_DESTINATION
@@ -114,4 +123,4 @@ if [ $? -eq 0 ]; then
       cp 
server/protocols/webadmin/webadmin-mailbox/target/webadmin-mailbox.json 
$SWAGGER_DESTINATION || true
       cp 
server/protocols/webadmin/webadmin-swagger/target/webadmin-swagger.json 
$SWAGGER_DESTINATION || true
    fi
-fi
\ No newline at end of file
+fi
diff --git a/dockerfiles/run/guice/memory/Dockerfile 
b/dockerfiles/run/guice/memory/Dockerfile
new file mode 100644
index 0000000..e969bf8
--- /dev/null
+++ b/dockerfiles/run/guice/memory/Dockerfile
@@ -0,0 +1,32 @@
+# Run James
+#
+# VERSION      1.0
+
+FROM openjdk:8u181-jre
+
+# Ports that are used
+#
+# 25   SMTP without authentication
+# 110  POP3
+# 143  IMAP with startTLS enabled
+# 465  SMTP with authentication and socketTLS enabled
+# 587  SMTP with authentication and startTLS enabled
+# 993  IMAP with socketTLS enabled
+# 8000 Web Admin interface (unsecured: expose at your own risks)
+
+EXPOSE 25 110 143 465 587 993 8000
+
+WORKDIR /root
+
+# Get data we need to run James : build results and configuration
+ADD destination/james-server-memory-guice.jar /root/james-server.jar
+ADD destination/james-server-memory-guice.lib 
/root/james-server-memory-guice.lib
+ADD destination/james-server-cli.jar /root/james-cli.jar
+ADD destination/james-server-cli.lib /root/james-server-cli.lib
+ADD destination/conf /root/conf
+
+VOLUME /logs
+VOLUME /root/conf
+
+ENV JVM_OPTIONS=""
+ENTRYPOINT java -Dlogback.configurationFile=/root/conf/logback.xml 
-Dworking.directory=/root/ $JVM_OPTIONS -jar james-server.jar
diff --git 
a/dockerfiles/run/guice/memory/destination/conf/batchsizes.properties 
b/dockerfiles/run/guice/memory/destination/conf/batchsizes.properties
new file mode 100644
index 0000000..47da2c5
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/batchsizes.properties
@@ -0,0 +1,10 @@
+# Those properties let you configure the number of messages queried at the 
same time.
+# IMAP FETCH command
+fetch.metadata=200
+fetch.headers=200
+fetch.body=100
+fetch.full=50
+# IMAP COPY command
+copy=100
+# IMAP MOVE command
+move=100
diff --git 
a/dockerfiles/run/guice/memory/destination/conf/deletedMessageVault.properties 
b/dockerfiles/run/guice/memory/destination/conf/deletedMessageVault.properties
new file mode 100644
index 0000000..56942d0
--- /dev/null
+++ 
b/dockerfiles/run/guice/memory/destination/conf/deletedMessageVault.properties
@@ -0,0 +1 @@
+urlPrefix=memory://var/deletedMessages/vault
diff --git a/dockerfiles/run/guice/memory/destination/conf/dnsservice.xml 
b/dockerfiles/run/guice/memory/destination/conf/dnsservice.xml
new file mode 100644
index 0000000..0978a00
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/dnsservice.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+  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.                                           
+ -->
+
+<dnsservice>
+  <servers>
+    <server>8.8.8.8</server>
+    <server>62.210.16.6</server>
+  </servers>
+  <autodiscover>false</autodiscover>
+  <authoritative>false</authoritative>
+  <maxcachesize>50000</maxcachesize>
+</dnsservice>
diff --git a/dockerfiles/run/guice/memory/destination/conf/domainlist.xml 
b/dockerfiles/run/guice/memory/destination/conf/domainlist.xml
new file mode 100644
index 0000000..ad37476
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/domainlist.xml
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<!--
+  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.                                           
+ -->
+
+<domainlist>
+    <domainnames>
+        <domainname>james.linagora.com</domainname>
+    </domainnames>
+    <autodetect>true</autodetect>
+    <autodetectIP>true</autodetectIP>
+    <defaultDomain>localhost</defaultDomain>
+</domainlist>
diff --git 
a/dockerfiles/run/guice/memory/destination/conf/elasticsearch.properties 
b/dockerfiles/run/guice/memory/destination/conf/elasticsearch.properties
new file mode 100644
index 0000000..9988aa2
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/elasticsearch.properties
@@ -0,0 +1,29 @@
+#  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.
+
+#  This template file can be used as example for James Server configuration
+#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+
+# Configuration file for ElasticSearch
+
+# Reports for metrics into ElasticSearch
+# Defaults to elasticsearch.masterHost : on which server to publish metrics
+elasticsearch.http.host=elasticsearch
+elasticsearch.http.port=9200
+elasticsearch.metrics.reports.enabled=true
+elasticsearch.metrics.reports.period=30
+elasticsearch.metrics.reports.index=james-metrics
diff --git a/dockerfiles/run/guice/memory/destination/conf/imapserver.xml 
b/dockerfiles/run/guice/memory/destination/conf/imapserver.xml
new file mode 100644
index 0000000..6616d24
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/imapserver.xml
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+
+<!--
+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.
+-->
+
+
+<imapservers>
+    <imapserver enabled="true">
+        <jmxName>imapserver</jmxName>
+        <bind>0.0.0.0:143</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="true">
+            <!-- To create a new keystore execute:
+            keytool -genkey -alias james -keyalg RSA -keystore 
/path/to/james/conf/keystore
+              -->
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+        </tls>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <idleTimeInterval>120</idleTimeInterval>
+        <idleTimeIntervalUnit>SECONDS</idleTimeIntervalUnit>
+        <disabledCaps>ACL|MOVE</disabledCaps>
+        <enableIdle>true</enableIdle>
+    </imapserver>
+    <imapserver enabled="true">
+        <jmxName>imapserver-ssl</jmxName>
+        <bind>0.0.0.0:993</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="true" startTLS="false">
+            <!-- To create a new keystore execute:
+              keytool -genkey -alias james -keyalg RSA -keystore 
/path/to/james/conf/keystore
+             -->
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+        </tls>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <idleTimeInterval>120</idleTimeInterval>
+        <idleTimeIntervalUnit>SECONDS</idleTimeIntervalUnit>
+        <disabledCaps>ACL|MOVE</disabledCaps>
+        <enableIdle>true</enableIdle>
+    </imapserver>
+</imapservers>
diff --git a/dockerfiles/run/guice/memory/destination/conf/jmap.properties 
b/dockerfiles/run/guice/memory/destination/conf/jmap.properties
new file mode 100644
index 0000000..63e6702
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/jmap.properties
@@ -0,0 +1,13 @@
+# Configuration file for JMAP
+
+enabled=true
+
+tls.keystoreURL=file://conf/keystore
+tls.secret=james72laBalle
+
+#
+# If you wish to use OAuth authentication, you should provide a valid JWT 
public key.
+# The following entry specify the link to the URL of the public key file,
+# which should be a PEM format file.
+#
+jwt.publickeypem.url=file://conf/jwt_publickey
diff --git a/dockerfiles/run/guice/memory/destination/conf/jmx.properties 
b/dockerfiles/run/guice/memory/destination/conf/jmx.properties
new file mode 100644
index 0000000..1c39a17
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/jmx.properties
@@ -0,0 +1,29 @@
+#  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.
+#
+
+#  This template file can be used as example for James Server configuration
+#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+
+#  This template file can be used as example for James Server configuration
+#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+
+# See http://james.apache.org/server/3/config.html for usage
+
+jmx.enabled=true
+jmx.address=127.0.0.1
+jmx.port=9999
diff --git a/dockerfiles/run/guice/memory/destination/conf/jwt_publickey 
b/dockerfiles/run/guice/memory/destination/conf/jwt_publickey
new file mode 100644
index 0000000..53914e0
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/jwt_publickey
@@ -0,0 +1,9 @@
+-----BEGIN PUBLIC KEY-----
+MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtlChO/nlVP27MpdkG0Bh
+16XrMRf6M4NeyGa7j5+1UKm42IKUf3lM28oe82MqIIRyvskPc11NuzSor8HmvH8H
+lhDs5DyJtx2qp35AT0zCqfwlaDnlDc/QDlZv1CoRZGpQk1Inyh6SbZwYpxxwh0fi
++d/4RpE3LBVo8wgOaXPylOlHxsDizfkL8QwXItyakBfMO6jWQRrj7/9WDhGf4Hi+
+GQur1tPGZDl9mvCoRHjFrD5M/yypIPlfMGWFVEvV5jClNMLAQ9bYFuOc7H1fEWw6
+U1LZUUbJW9/CH45YXz82CYqkrfbnQxqRb2iVbVjs/sHopHd1NTiCfUtwvcYJiBVj
+kwIDAQAB
+-----END PUBLIC KEY-----
diff --git a/dockerfiles/run/guice/memory/destination/conf/listeners.xml 
b/dockerfiles/run/guice/memory/destination/conf/listeners.xml
new file mode 100644
index 0000000..6e0c14c
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/listeners.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0"?>
+<!--
+  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.                                           
+ -->
+
+<listeners>
+  <listener>
+    <class>org.apache.james.mailbox.spamassassin.SpamAssassinListener</class>
+    <async>true</async>
+  </listener>
+  <preDeletionHook>
+    <class>org.apache.james.vault.DeletedMessageVaultHook</class>
+  </preDeletionHook>
+</listeners>
diff --git a/dockerfiles/run/guice/memory/destination/conf/logback.xml 
b/dockerfiles/run/guice/memory/destination/conf/logback.xml
new file mode 100644
index 0000000..275b806
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/logback.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.                                           
+ -->
+
+<configuration>
+
+        <contextListener 
class="ch.qos.logback.classic.jul.LevelChangePropagator">
+                <resetJUL>true</resetJUL>
+        </contextListener>
+
+        <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+                <encoder>
+                        <pattern>%d{HH:mm:ss.SSS} %highlight([%-5level]) 
%logger{15} - %msg%n%rEx</pattern>
+                        <immediateFlush>false</immediateFlush>
+                </encoder>
+        </appender>
+
+        <appender name="LOG_FILE" class="ch.qos.logback.core.FileAppender">
+                <file>/logs/james.log</file>
+                <encoder>
+                        <pattern>%d{HH:mm:ss.SSS} [%-5level] %logger{15} - 
%msg%n%rEx</pattern>
+                        <immediateFlush>false</immediateFlush>
+                </encoder>
+        </appender>
+
+        <root level="INFO">
+                <appender-ref ref="CONSOLE" />
+                <appender-ref ref="LOG_FILE" />
+        </root>
+
+</configuration>
diff --git a/dockerfiles/run/guice/memory/destination/conf/mailetcontainer.xml 
b/dockerfiles/run/guice/memory/destination/conf/mailetcontainer.xml
new file mode 100644
index 0000000..fa76a80
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/mailetcontainer.xml
@@ -0,0 +1,144 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+ -->
+
+<mailetcontainer enableJmx="true">
+
+    <context>
+        <postmaster>postmas...@james.minet.net</postmaster>
+    </context>
+
+    <spooler>
+        <threads>20</threads>
+    </spooler>
+
+    <processors>
+        <processor state="root" enableJmx="true">
+            <mailet match="All" class="PostmasterAlias"/>
+            <mailet match="RelayLimit=30" class="Null"/>
+            <mailet match="All" class="ToProcessor">
+                <processor>transport</processor>
+            </mailet>
+        </processor>
+
+        <processor state="error" enableJmx="true">
+            <mailet match="All" class="MetricsMailet">
+                <metricName>mailetContainerErrors</metricName>
+            </mailet>
+            <mailet match="All" class="Bounce"/>
+            <mailet match="All" class="ToRepository">
+                <repositoryPath>memory://var/mail/error/</repositoryPath>
+            </mailet>
+        </processor>
+
+        <processor state="transport" enableJmx="true">
+            <matcher name="relay-allowed" 
match="org.apache.james.mailetcontainer.impl.matchers.Or">
+                <matcher match="SMTPAuthSuccessful"/>
+                <matcher match="SMTPIsAuthNetwork"/>
+                <matcher match="SentByMailet"/>
+                <matcher match="org.apache.james.jmap.mailet.SentByJmap"/>
+            </matcher>
+
+            <mailet match="All" class="RemoveMimeHeader">
+                <name>bcc</name>
+                <onMailetException>ignore</onMailetException>
+            </mailet>
+            <mailet match="All" class="RecipientRewriteTable">
+                <errorProcessor>rrt-error</errorProcessor>
+            </mailet>
+            <mailet match="RecipientIsLocal" 
class="org.apache.james.jmap.mailet.VacationMailet"/>
+            <mailet match="RecipientIsLocal" class="Sieve"/>
+            <mailet match="RecipientIsLocal" class="AddDeliveredToHeader"/>
+            <mailet match="RecipientIsLocal" 
class="org.apache.james.jmap.mailet.filter.JMAPFiltering"/>
+            <mailet match="RecipientIsLocal" class="LocalDelivery"/>
+            <mailet match="HostIsLocal" class="ToProcessor">
+                <processor>local-address-error</processor>
+                <notice>550 - Requested action not taken: no such user 
here</notice>
+            </mailet>
+
+            <mailet match="relay-allowed" class="ToProcessor">
+                <processor>relay</processor>
+            </mailet>
+
+            <mailet match="All" class="ToProcessor">
+                <processor>relay-denied</processor>
+            </mailet>
+        </processor>
+
+        <processor state="relay" enableJmx="true">
+            <mailet match="All" class="RemoteDelivery">
+                <outgoingQueue>outgoing</outgoingQueue>
+                <delayTime>5000, 100000, 500000</delayTime>
+                <maxRetries>25</maxRetries>
+                <maxDnsProblemRetries>0</maxDnsProblemRetries>
+                <deliveryThreads>10</deliveryThreads>
+                <sendpartial>true</sendpartial>
+                <bounceProcessor>bounces</bounceProcessor>
+            </mailet>
+        </processor>
+
+        <processor state="local-address-error" enableJmx="true">
+            <mailet match="All" class="MetricsMailet">
+                <metricName>mailetContainerLocalAddressError</metricName>
+            </mailet>
+            <mailet match="All" class="Bounce">
+                <attachment>none</attachment>
+            </mailet>
+            <mailet match="All" class="ToRepository">
+                
<repositoryPath>memory://var/mail/address-error/</repositoryPath>
+            </mailet>
+        </processor>
+
+        <processor state="relay-denied" enableJmx="true">
+            <mailet match="All" class="MetricsMailet">
+                <metricName>mailetContainerRelayDenied</metricName>
+            </mailet>
+            <mailet match="All" class="Bounce">
+                <attachment>none</attachment>
+            </mailet>
+            <mailet match="All" class="ToRepository">
+                
<repositoryPath>memory://var/mail/relay-denied/</repositoryPath>
+                <notice>Warning: You are sending an e-mail to a remote server. 
You must be authenticated to perform such an operation</notice>
+            </mailet>
+        </processor>
+
+        <processor state="bounces" enableJmx="true">
+            <mailet match="All" class="MetricsMailet">
+                <metricName>bounces</metricName>
+            </mailet>
+            <mailet match="All" class="DSNBounce">
+                <passThrough>false</passThrough>
+            </mailet>
+        </processor>
+
+        <processor state="rrt-error" enableJmx="false">
+            <mailet match="All" class="ToRepository">
+                <repositoryPath>memory://var/mail/rrt-error/</repositoryPath>
+                <passThrough>true</passThrough>
+            </mailet>
+            <mailet match="IsSenderInRRTLoop" class="Null"/>
+            <mailet match="All" class="Bounce"/>
+        </processor>
+
+    </processors>
+
+</mailetcontainer>
+
+
diff --git 
a/dockerfiles/run/guice/memory/destination/conf/mailrepositorystore.xml 
b/dockerfiles/run/guice/memory/destination/conf/mailrepositorystore.xml
new file mode 100644
index 0000000..2f4ca6a
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/mailrepositorystore.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+ -->
+
+<mailrepositorystore>
+    <defaultProtocol>memory</defaultProtocol>
+    <mailrepositories>
+        <mailrepository 
class="org.apache.james.mailrepository.memory.MemoryMailRepository">
+            <protocols>
+                <protocol>memory</protocol>
+            </protocols>
+        </mailrepository>
+    </mailrepositories>
+</mailrepositorystore>
diff --git 
a/dockerfiles/run/guice/memory/destination/conf/managesieveserver.xml 
b/dockerfiles/run/guice/memory/destination/conf/managesieveserver.xml
new file mode 100644
index 0000000..7b0b85a
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/managesieveserver.xml
@@ -0,0 +1,65 @@
+<?xml version="1.0"?>
+<!--
+  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.                                           
+ -->
+ 
+<!--
+   This template file can be used as example for James Server configuration
+   DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+-->
+ 
+<!-- See http://james.apache.org/server/3/config.html for usage -->
+
+<managesieveservers>
+
+   <managesieveserver enabled="false">
+
+     <jmxName>managesieveserver</jmxName>
+
+     <bind>0.0.0.0:4190</bind>
+
+     <connectionBacklog>200</connectionBacklog>
+
+     <tls socketTLS="false" startTLS="false">
+       <!-- To create a new keystore execute:
+        keytool -genkey -alias james -keyalg RSA -keystore 
/path/to/james/conf/keystore
+         -->
+       <keystore>file://conf/keystore</keystore>
+       <secret>james72laBalle</secret>
+       <provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+       <!-- The algorithm is optional and only needs to be specified when 
using something other
+        than the Sun JCE provider - You could use IbmX509 with IBM Java 
runtime. -->
+       <algorithm>SunX509</algorithm>
+     </tls>
+         
+        <!-- connection timeout in secconds -->
+        <connectiontimeout>360</connectiontimeout>
+
+        <!-- Set the maximum simultaneous incoming connections for this 
service -->
+        <connectionLimit>0</connectionLimit>
+         
+        <!-- Set the maximum simultaneous incoming connections per IP for this 
service -->
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <maxmessagesize>0</maxmessagesize>
+        <addressBracketsEnforcement>true</addressBracketsEnforcement>
+  
+   </managesieveserver>
+
+</managesieveservers>
+
+
diff --git a/dockerfiles/run/guice/memory/destination/conf/pop3server.xml 
b/dockerfiles/run/guice/memory/destination/conf/pop3server.xml
new file mode 100644
index 0000000..df8fbef
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/pop3server.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0"?>
+<!--
+  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.                                           
+ -->
+
+
+<pop3servers>
+    <pop3server enabled="false">
+        <jmxName>pop3server</jmxName>
+        <bind>0.0.0.0:110</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="false">
+            <!-- To create a new keystore execute:
+                  keytool -genkey -alias james -keyalg RSA -keystore 
/path/to/james/conf/keystore
+             -->
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+        </tls>
+        <connectiontimeout>1200</connectiontimeout>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <handlerchain>
+            <handler 
class="org.apache.james.pop3server.core.CoreCmdHandlerLoader"/>
+        </handlerchain>
+    </pop3server>
+</pop3servers>
diff --git 
a/dockerfiles/run/guice/memory/destination/conf/recipientrewritetable.xml 
b/dockerfiles/run/guice/memory/destination/conf/recipientrewritetable.xml
new file mode 100644
index 0000000..3d44578
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/recipientrewritetable.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  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.                                           
+ -->
+
+<!-- The default table for storing James' RecipientRewriteTable mappings. -->
+<recipientrewritetable>
+  <recursiveMapping>true</recursiveMapping>
+  <mappingLimit>10</mappingLimit>
+</recipientrewritetable>
+
diff --git a/dockerfiles/run/guice/memory/destination/conf/smtpserver.xml 
b/dockerfiles/run/guice/memory/destination/conf/smtpserver.xml
new file mode 100644
index 0000000..e464ca6
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/smtpserver.xml
@@ -0,0 +1,105 @@
+<?xml version="1.0"?>
+
+<!--
+  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.
+ -->
+
+<smtpservers>
+    <smtpserver enabled="true">
+        <jmxName>smtpserver-global</jmxName>
+        <bind>0.0.0.0:25</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="false">
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+            <algorithm>SunX509</algorithm>
+        </tls>
+        <connectiontimeout>360</connectiontimeout>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <authRequired>false</authRequired>
+        <authorizedAddresses>127.0.0.0/8</authorizedAddresses>
+        <verifyIdentity>true</verifyIdentity>
+        <maxmessagesize>0</maxmessagesize>
+        <addressBracketsEnforcement>true</addressBracketsEnforcement>
+        <smtpGreeting>JAMES Linagora's SMTP awesome Server</smtpGreeting>
+        <handlerchain>
+            <handler 
class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
+            <handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
+        </handlerchain>
+    </smtpserver>
+    <smtpserver enabled="true">
+        <jmxName>smtpserver-TLS</jmxName>
+        <bind>0.0.0.0:465</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="true" startTLS="false">
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+            <algorithm>SunX509</algorithm>
+        </tls>
+        <connectiontimeout>360</connectiontimeout>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <!--
+           Authorize only local users
+        -->
+        <authRequired>true</authRequired>
+        <authorizedAddresses>127.0.0.0/8</authorizedAddresses>
+        <!-- Trust authenticated users -->
+        <verifyIdentity>false</verifyIdentity>
+        <maxmessagesize>0</maxmessagesize>
+        <addressBracketsEnforcement>true</addressBracketsEnforcement>
+        <smtpGreeting>JAMES Linagora's SMTP awesome Server</smtpGreeting>
+        <handlerchain>
+            <handler 
class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
+            <handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
+        </handlerchain>
+    </smtpserver>
+    <smtpserver enabled="true">
+        <jmxName>smtpserver-authenticated</jmxName>
+        <bind>0.0.0.0:587</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="true">
+            <keystore>file://conf/keystore</keystore>
+            <secret>james72laBalle</secret>
+            
<provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
+            <algorithm>SunX509</algorithm>
+        </tls>
+        <connectiontimeout>360</connectiontimeout>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <!--
+           Authorize only local users
+        -->
+        <authRequired>true</authRequired>
+        <authorizedAddresses>127.0.0.0/8</authorizedAddresses>
+        <!-- Trust authenticated users -->
+        <verifyIdentity>false</verifyIdentity>
+        <maxmessagesize>0</maxmessagesize>
+        <addressBracketsEnforcement>true</addressBracketsEnforcement>
+        <smtpGreeting>JAMES Linagora's SMTP awesome Server</smtpGreeting>
+        <handlerchain>
+            <handler 
class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
+            <handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
+        </handlerchain>
+    </smtpserver>
+</smtpservers>
+
+
diff --git a/dockerfiles/run/guice/memory/destination/conf/usersrepository.xml 
b/dockerfiles/run/guice/memory/destination/conf/usersrepository.xml
new file mode 100644
index 0000000..c745677
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/usersrepository.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+  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.                                           
+ -->
+
+<usersrepository name="LocalUsers">
+    <algorithm>MD5</algorithm>
+    <enableVirtualHosting>true</enableVirtualHosting>    
+    <enableForwarding>true</enableForwarding>
+</usersrepository>
+
diff --git a/dockerfiles/run/guice/memory/destination/conf/webadmin.properties 
b/dockerfiles/run/guice/memory/destination/conf/webadmin.properties
new file mode 100644
index 0000000..36b6f1e
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/conf/webadmin.properties
@@ -0,0 +1,41 @@
+#  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.
+
+#  This template file can be used as example for James Server configuration
+#  DO NOT USE IT AS SUCH AND ADAPT IT TO YOUR NEEDS
+
+enabled=true
+port=8000
+host=localhost
+
+# Defaults to false
+https.enabled=false
+
+# Compulsory when enabling HTTPS
+#https.keystore=/path/to/keystore
+#https.password=password
+
+# Optional when enabling HTTPS (self signed)
+#https.trust.keystore
+#https.trust.password
+
+# Defaults to false
+#jwt.enabled=true
+
+# Defaults to false
+#cors.enable=true
+#cors.origin
\ No newline at end of file
diff --git a/dockerfiles/run/guice/memory/destination/extensions-jars/README.md 
b/dockerfiles/run/guice/memory/destination/extensions-jars/README.md
new file mode 100644
index 0000000..2cea759
--- /dev/null
+++ b/dockerfiles/run/guice/memory/destination/extensions-jars/README.md
@@ -0,0 +1,5 @@
+# Adding Jars to JAMES
+
+The jar in this folder will be added to JAMES classpath when mounted under 
/root/extensions-jars inside the running container.
+
+You can use it to add you customs Mailets/Matchers.
diff --git a/server/container/guice/memory-guice/pom.xml 
b/server/container/guice/memory-guice/pom.xml
index 6e3ae2f..b322d03 100644
--- a/server/container/guice/memory-guice/pom.xml
+++ b/server/container/guice/memory-guice/pom.xml
@@ -220,7 +220,7 @@
                         <configuration>
                             <includeScope>compile</includeScope>
                             <includeScope>runtime</includeScope>
-                            
<outputDirectory>${project.build.directory}/${project.build.finalName}.lib</outputDirectory>
+                            
<outputDirectory>${project.build.directory}/${project.artifactId}.lib</outputDirectory>
                         </configuration>
                     </execution>
                 </executions>
@@ -235,10 +235,11 @@
                             <goal>jar</goal>
                         </goals>
                         <configuration>
+                            <finalName>${project.artifactId}</finalName>
                             <archive>
                                 <manifest>
                                     <addClasspath>true</addClasspath>
-                                    
<classpathPrefix>${project.build.finalName}.lib/</classpathPrefix>
+                                    
<classpathPrefix>${project.artifactId}.lib/</classpathPrefix>
                                     
<mainClass>org.apache.james.MemoryJamesServerMain</mainClass>
                                     
<useUniqueVersions>false</useUniqueVersions>
                                 </manifest>
diff --git 
a/server/container/guice/memory-guice/src/main/java/org/apache/james/FakeMessageSearchIndex.java
 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/FakeMessageSearchIndex.java
new file mode 100644
index 0000000..fdd7cea
--- /dev/null
+++ 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/FakeMessageSearchIndex.java
@@ -0,0 +1,94 @@
+/****************************************************************
+ * 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;
+
+import java.util.Collection;
+import java.util.EnumSet;
+import java.util.Iterator;
+import java.util.List;
+
+import org.apache.commons.lang.NotImplementedException;
+import org.apache.james.mailbox.MailboxManager;
+import org.apache.james.mailbox.MailboxSession;
+import org.apache.james.mailbox.MessageUid;
+import org.apache.james.mailbox.events.Group;
+import org.apache.james.mailbox.exception.MailboxException;
+import org.apache.james.mailbox.model.Mailbox;
+import org.apache.james.mailbox.model.MailboxId;
+import org.apache.james.mailbox.model.MessageId;
+import org.apache.james.mailbox.model.SearchQuery;
+import org.apache.james.mailbox.model.UpdatedFlags;
+import org.apache.james.mailbox.store.mail.model.MailboxMessage;
+import org.apache.james.mailbox.store.search.ListeningMessageSearchIndex;
+
+public class FakeMessageSearchIndex extends ListeningMessageSearchIndex {
+    private static class FakeMessageSearchIndexGroup extends Group {}
+
+    private static final FakeMessageSearchIndexGroup GROUP = new 
FakeMessageSearchIndexGroup();
+
+    public FakeMessageSearchIndex() {
+        super(null, null);
+    }
+
+    @Override
+    public void add(MailboxSession session, Mailbox mailbox, MailboxMessage 
message) throws Exception {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public void delete(MailboxSession session, Mailbox mailbox, 
Collection<MessageUid> expungedUids) throws Exception {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public void deleteAll(MailboxSession session, Mailbox mailbox) throws 
Exception {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public void update(MailboxSession session, Mailbox mailbox, 
List<UpdatedFlags> updatedFlagsList) throws Exception {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public Group getDefaultGroup() {
+        return GROUP;
+    }
+
+    @Override
+    public Iterator<MessageUid> search(MailboxSession session, Mailbox 
mailbox, SearchQuery searchQuery) throws MailboxException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public List<MessageId> search(MailboxSession session, 
Collection<MailboxId> mailboxIds, SearchQuery searchQuery, long limit) throws 
MailboxException {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public EnumSet<MailboxManager.SearchCapabilities> 
getSupportedCapabilities(EnumSet<MailboxManager.MessageCapabilities> 
messageCapabilities) {
+        throw new NotImplementedException();
+    }
+
+    @Override
+    public ExecutionMode getExecutionMode() {
+        throw new NotImplementedException();
+    }
+}
diff --git 
a/server/container/guice/memory-guice/src/main/java/org/apache/james/FakeSearchMailboxModule.java
 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/FakeSearchMailboxModule.java
new file mode 100644
index 0000000..ec25c30
--- /dev/null
+++ 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/FakeSearchMailboxModule.java
@@ -0,0 +1,40 @@
+/****************************************************************
+ * 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;
+
+import org.apache.james.mailbox.events.MailboxListener;
+import org.apache.james.mailbox.store.search.ListeningMessageSearchIndex;
+
+import com.google.inject.AbstractModule;
+import com.google.inject.Scopes;
+import com.google.inject.multibindings.Multibinder;
+
+public class FakeSearchMailboxModule extends AbstractModule {
+
+    @Override
+    protected void configure() {
+        bind(FakeMessageSearchIndex.class).in(Scopes.SINGLETON);
+        
bind(ListeningMessageSearchIndex.class).to(FakeMessageSearchIndex.class);
+
+        Multibinder.newSetBinder(binder(), 
MailboxListener.GroupMailboxListener.class)
+                .addBinding()
+                .to(FakeMessageSearchIndex.class);
+    }
+}
diff --git 
a/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
index c885f49..7ea6499 100644
--- 
a/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
+++ 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/MemoryJamesServerMain.java
@@ -115,6 +115,7 @@ public class MemoryJamesServerMain {
             .build();
 
         GuiceJamesServer.forConfiguration(configuration)
+            .combineWith(new FakeSearchMailboxModule())
             .combineWith(IN_MEMORY_SERVER_AGGREGATE_MODULE, new 
JMXServerModule())
             .start();
     }
diff --git 
a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
index a4eec3e..d6f47bb 100644
--- 
a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
+++ 
b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java
@@ -32,8 +32,8 @@ import org.apache.james.lifecycle.api.Startable;
 import org.apache.james.mailrepository.api.MailRepositoryProvider;
 import org.apache.james.mailrepository.api.MailRepositoryUrlStore;
 import org.apache.james.mailrepository.api.Protocol;
-import org.apache.james.mailrepository.file.FileMailRepository;
 import org.apache.james.mailrepository.memory.MailRepositoryStoreConfiguration;
+import org.apache.james.mailrepository.memory.MemoryMailRepository;
 import org.apache.james.mailrepository.memory.MemoryMailRepositoryProvider;
 import org.apache.james.mailrepository.memory.MemoryMailRepositoryUrlStore;
 import org.apache.james.modules.server.MailStoreRepositoryModule;
@@ -53,9 +53,9 @@ import com.google.inject.Singleton;
 import com.google.inject.multibindings.Multibinder;
 
 public class MemoryDataModule extends AbstractModule {
-    private static final MailRepositoryStoreConfiguration.Item 
FILE_MAILREPOSITORY_DEFAULT_DECLARATION = new 
MailRepositoryStoreConfiguration.Item(
-        ImmutableList.of(new Protocol("file")),
-        FileMailRepository.class.getName(),
+    private static final MailRepositoryStoreConfiguration.Item 
MEMORY_MAILREPOSITORY_DEFAULT_DECLARATION = new 
MailRepositoryStoreConfiguration.Item(
+        ImmutableList.of(new Protocol("memory")),
+        MemoryMailRepository.class.getName(),
         new HierarchicalConfiguration());
 
     @Override
@@ -82,7 +82,7 @@ public class MemoryDataModule extends AbstractModule {
 
         Multibinder.newSetBinder(binder(), 
ConfigurationPerformer.class).addBinding().to(MemoryDataConfigurationPerformer.class);
 
-        
bind(MailStoreRepositoryModule.DefaultItemSupplier.class).toInstance(() -> 
FILE_MAILREPOSITORY_DEFAULT_DECLARATION);
+        
bind(MailStoreRepositoryModule.DefaultItemSupplier.class).toInstance(() -> 
MEMORY_MAILREPOSITORY_DEFAULT_DECLARATION);
 
         Multibinder<MailRepositoryProvider> multibinder = 
Multibinder.newSetBinder(binder(), MailRepositoryProvider.class);
         multibinder.addBinding().to(MemoryMailRepositoryProvider.class);


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

Reply via email to