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 2017/02/03 09:44:31 UTC
[03/12] james-project git commit: JAMES-1917 Improve inMemory guice
documentation
JAMES-1917 Improve inMemory guice documentation
Configuration was outdated.
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/31ef8219
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/31ef8219
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/31ef8219
Branch: refs/heads/master
Commit: 31ef8219f3358e1022faf446ac8ff97306fcba95
Parents: a615668
Author: Benoit Tellier <bt...@linagora.com>
Authored: Wed Jan 25 09:44:20 2017 +0700
Committer: Benoit Tellier <bt...@linagora.com>
Committed: Fri Feb 3 16:40:44 2017 +0700
----------------------------------------------------------------------
.../sample-configuration/lmtpserver.xml | 41 ------------
server/container/guice/memory-guice/README.adoc | 21 ++++---
.../sample-configuration/jmap.properties | 2 +-
.../sample-configuration/jwt_publickey | 9 +++
.../sample-configuration/logback.xml | 15 +++++
.../sample-configuration/mailetcontainer.xml | 9 +--
.../sample-configuration/managesieveserver.xml | 65 ++++++++++++++++++++
.../memory-guice/sample-configuration/quota.xml | 53 ++++++++++++++++
.../sample-configuration/webadmin.properties | 22 +++++++
9 files changed, 184 insertions(+), 53 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/cassandra-guice/sample-configuration/lmtpserver.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/cassandra-guice/sample-configuration/lmtpserver.xml b/server/container/guice/cassandra-guice/sample-configuration/lmtpserver.xml
deleted file mode 100644
index 87a0caa..0000000
--- a/server/container/guice/cassandra-guice/sample-configuration/lmtpserver.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?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.
- -->
-
-<lmtpservers>
-
- <lmtpserver enabled="false">
- <jmxName>lmtpserver</jmxName>
- <!-- LMTP should not be reachable from outside your network so bind it to loopback-->
- <bind>127.0.0.1:1024</bind>
- <connectionBacklog>200</connectionBacklog>
- <connectiontimeout>1200</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>
- <!-- This sets the maximum allowed message size (in kilobytes) for this -->
- <!-- LMTP service. If unspecified, the value defaults to 0, which means no limit. -->
- <maxmessagesize>0</maxmessagesize>
- <handlerchain>
- <handler class="org.apache.james.lmtpserver.CoreCmdHandlerLoader"/>
- </handlerchain>
- </lmtpserver>
-
-</lmtpservers>
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/README.adoc
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/README.adoc b/server/container/guice/memory-guice/README.adoc
index b896354..36be5f4 100644
--- a/server/container/guice/memory-guice/README.adoc
+++ b/server/container/guice/memory-guice/README.adoc
@@ -6,33 +6,40 @@
* Java 8 SDK
* Docker
- * Maven
+ * Maven 3
=== Building the artifacts
-An usual compilation using maven will produce two artifacts into target directory :
+An usual compilation using maven will produce two artifacts into target directory:
* james-server-memory-guice-${version}.jar
* james-server-memory-guice-${version}.lib
+ You can for example run in the base of this git repository:
+
+ ```
+ mvn clean install
+ ```
+
== Running
=== James Launch
To run james, you have to create a directory containing required configuration files.
-A sample directory (appropriately named sample-directory) is provided with some
-default values you may need to replace.
+James requires the configuration to be in a subfolder of working directory that is called **conf**. A sample directory
+(appropriately named sample-directory) is provided with some default values you may need to replace. You will need to
+rename it into **conf** if you intend to use it.
-You also need to generate a keystore with the following command :
+You also need to generate a keystore with the following command:
[source]
----
$ keytool -genkey -alias james -keyalg RSA -keystore conf/keystore
----
-Once everything is set up, you just have to run the jar with :
+Once everything is set up, you just have to run the jar with:
[source]
----
-$ java -Dworking.directory=sample-configuration -jar target/james-server-memory-guice-${version}.jar
+$ java -Dworking.directory=. -jar target/james-server-memory-guice-${version}.jar
----
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/sample-configuration/jmap.properties
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/jmap.properties b/server/container/guice/memory-guice/sample-configuration/jmap.properties
index d785ccd..071bafb 100644
--- a/server/container/guice/memory-guice/sample-configuration/jmap.properties
+++ b/server/container/guice/memory-guice/sample-configuration/jmap.properties
@@ -8,4 +8,4 @@ tls.secret=james72laBalle
# The following entry specify the link to the URL of the public key file,
# which should be a PEM format file.
#
-jwt.publickeypem.url=
\ No newline at end of file
+jwt.publickeypem.url=file://conf/jwt_publickey
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/sample-configuration/jwt_publickey
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/jwt_publickey b/server/container/guice/memory-guice/sample-configuration/jwt_publickey
new file mode 100644
index 0000000..53914e0
--- /dev/null
+++ b/server/container/guice/memory-guice/sample-configuration/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-----
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/sample-configuration/logback.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/logback.xml b/server/container/guice/memory-guice/sample-configuration/logback.xml
new file mode 100644
index 0000000..3deaa5a
--- /dev/null
+++ b/server/container/guice/memory-guice/sample-configuration/logback.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+
+ <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
+ <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" />
+ </root>
+
+</configuration>
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml b/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
index 968b59c..40885cd 100644
--- a/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
+++ b/server/container/guice/memory-guice/sample-configuration/mailetcontainer.xml
@@ -80,12 +80,13 @@
<name>X-WasSigned</name>
<value>true</value>
</mailet>
+ <mailet match="All" class="RemoveMimeHeader">
+ <name>bcc</name>
+ </mailet>
<mailet match="All" class="RecipientRewriteTable" />
+ <mailet match="RecipientIsLocal" class="org.apache.james.jmap.mailet.VacationMailet"/>
+ <mailet match="RecipientIsLocal" class="Sieve"/>
<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="SMTPAuthSuccessful" class="RemoteDelivery">
<outgoingQueue>outgoing</outgoingQueue>
<delayTime>5000, 100000, 500000</delayTime>
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/sample-configuration/managesieveserver.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/managesieveserver.xml b/server/container/guice/memory-guice/sample-configuration/managesieveserver.xml
new file mode 100644
index 0000000..7b0b85a
--- /dev/null
+++ b/server/container/guice/memory-guice/sample-configuration/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>
+
+
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/sample-configuration/quota.xml
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/quota.xml b/server/container/guice/memory-guice/sample-configuration/quota.xml
new file mode 100644
index 0000000..70162e0
--- /dev/null
+++ b/server/container/guice/memory-guice/sample-configuration/quota.xml
@@ -0,0 +1,53 @@
+<?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 -->
+
+<!--
+ This configuration file allows you to customize the way quota are handled on this server.
+ You need to rename it in quota.xml so that it gets interpreted by James on startup.
+
+ The different configuration options are detailed here.
+
+ Read RFC-2087 for full details.
+-->
+
+<quota>
+ <quotaRootResolver>
+ <provider>default</provider>
+ </quotaRootResolver>
+ <currentQuotaManager>
+ <provider>cassandra</provider>
+ </currentQuotaManager>
+ <maxQuotaManager>
+ <provider>cassandra</provider>
+ </maxQuotaManager>
+ <quotaManager>
+ <provider>store</provider>
+ </quotaManager>
+ <updates>
+ <provider>event</provider>
+ </updates>
+</quota>
http://git-wip-us.apache.org/repos/asf/james-project/blob/31ef8219/server/container/guice/memory-guice/sample-configuration/webadmin.properties
----------------------------------------------------------------------
diff --git a/server/container/guice/memory-guice/sample-configuration/webadmin.properties b/server/container/guice/memory-guice/sample-configuration/webadmin.properties
new file mode 100644
index 0000000..70a6cb9
--- /dev/null
+++ b/server/container/guice/memory-guice/sample-configuration/webadmin.properties
@@ -0,0 +1,22 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# 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
\ 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