You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by bt...@apache.org on 2021/09/13 08:00:27 UTC

[james-project] branch master updated (8e14a83 -> 8f2a09b)

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 8e14a83  JAMES-1994 Remove conflicting logback file
     new a4573f3  JAMES-3603 Adapt demo docker file to latest
     new 8f2a09b  JAMES-3640 Auto generate demo SSL PEM keys

The 2 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/apps/demo/Dockerfile                        |  8 +++++---
 .../apps/demo}/imapserver.xml                      | 22 ++++++++++++++++------
 server/apps/demo/initialdata.sh                    |  8 ++++----
 server/apps/demo/james-cli                         |  3 ---
 .../sample-configuration => demo}/pop3server.xml   |  8 ++------
 .../sample-configuration => demo}/smtpserver.xml   | 18 ++++++------------
 server/apps/demo/startup.sh                        | 10 +++++++++-
 .../memory-app/sample-configuration/imapserver.xml |  2 +-
 8 files changed, 43 insertions(+), 36 deletions(-)
 copy {examples/custom-james-assembly/sample-configuration => server/apps/demo}/imapserver.xml (65%)
 delete mode 100755 server/apps/demo/james-cli
 copy server/apps/{distributed-pop3-app/sample-configuration => demo}/pop3server.xml (82%)
 copy server/apps/{distributed-pop3-app/sample-configuration => demo}/smtpserver.xml (85%)

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


[james-project] 02/02: JAMES-3640 Auto generate demo SSL PEM keys

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 8f2a09b514e92d86195e6ea03564609d43812462
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Aug 29 19:09:44 2021 +0700

    JAMES-3640 Auto generate demo SSL PEM keys
---
 server/apps/demo/Dockerfile                        |   5 +-
 .../sample-configuration => demo}/imapserver.xml   |  31 +------
 server/apps/demo/pop3server.xml                    |  39 ++++++++
 server/apps/demo/smtpserver.xml                    | 101 +++++++++++++++++++++
 .../memory-app/sample-configuration/imapserver.xml |   2 +-
 5 files changed, 149 insertions(+), 29 deletions(-)

diff --git a/server/apps/demo/Dockerfile b/server/apps/demo/Dockerfile
index 48da482..ceb27b9 100644
--- a/server/apps/demo/Dockerfile
+++ b/server/apps/demo/Dockerfile
@@ -6,7 +6,7 @@ FROM apache/james:jpa-latest
 
 # Install git
 RUN apt-get update
-RUN apt-get install -y git
+RUN apt-get install -y git openssl
 
 WORKDIR /root
 
@@ -15,6 +15,9 @@ RUN cp /root/wait-for-it/wait-for-it.sh /usr/bin/wait-for-it.sh
 
 COPY startup.sh /root
 COPY initialdata.sh /root
+COPY imapserver.xml /root/conf
+COPY smtpserver.xml /root/conf
+COPY pop3server.xml /root/conf
 
 RUN chmod +x /root/startup.sh
 RUN chmod +x /root/initialdata.sh
diff --git a/server/apps/memory-app/sample-configuration/imapserver.xml b/server/apps/demo/imapserver.xml
similarity index 53%
copy from server/apps/memory-app/sample-configuration/imapserver.xml
copy to server/apps/demo/imapserver.xml
index 1ee0e13..fbc469d 100644
--- a/server/apps/memory-app/sample-configuration/imapserver.xml
+++ b/server/apps/demo/imapserver.xml
@@ -28,45 +28,22 @@ under the License.
         <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 -storetype PKCS12 -keystore /path/to/james/conf/keystore
-             -->
-            <keystore>file://conf/keystore</keystore>
-            <keystoreType>PKCS12</keystoreType>
-            <secret>james72laBalle</secret>
-            <provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
-
-            <!-- Alternatively TLS keys can be supplied via PEM files -->
-            <!-- <privateKey>file://conf/private.key</privateKey> -->
-            <!-- <certificates>file://conf/certs.self-signed.csr</certificates> -->
-            <!-- An optional secret might be specified for the private key -->
-            <!-- <secret>james72laBalle</secret> -->
+            <privateKey>file://conf/private.key</privateKey>
+            <certificates>file://conf/private.csr</certificates>
         </tls>
         <connectionLimit>0</connectionLimit>
         <connectionLimitPerIP>0</connectionLimitPerIP>
         <idleTimeInterval>120</idleTimeInterval>
         <idleTimeIntervalUnit>SECONDS</idleTimeIntervalUnit>
         <enableIdle>true</enableIdle>
-        <plainAuthDisallowed>true</plainAuthDisallowed>
     </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 -storetype PKCS12 -keystore /path/to/james/conf/keystore
-             -->
-            <keystore>file://conf/keystore</keystore>
-            <keystoreType>PKCS12</keystoreType>
-            <secret>james72laBalle</secret>
-            <provider>org.bouncycastle.jce.provider.BouncyCastleProvider</provider>
-
-            <!-- Alternatively TLS keys can be supplied via PEM files -->
-            <!-- <privateKey>file://conf/private.key</privateKey> -->
-            <!-- <certificates>file://conf/certs.self-signed.csr</certificates> -->
-            <!-- An optional secret might be specified for the private key -->
-            <!-- <secret>james72laBalle</secret> -->
+            <privateKey>file://conf/private.key</privateKey>
+            <certificates>file://conf/private.csr</certificates>
         </tls>
         <connectionLimit>0</connectionLimit>
         <connectionLimitPerIP>0</connectionLimitPerIP>
diff --git a/server/apps/demo/pop3server.xml b/server/apps/demo/pop3server.xml
new file mode 100644
index 0000000..8f8860e
--- /dev/null
+++ b/server/apps/demo/pop3server.xml
@@ -0,0 +1,39 @@
+<?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.                                           
+ -->
+
+<!-- Read https://james.apache.org/server/config-pop3.html for further details -->
+
+<pop3servers>
+    <pop3server enabled="false">
+        <jmxName>pop3server</jmxName>
+        <bind>0.0.0.0:110</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="false">
+            <privateKey>file://conf/private.key</privateKey>
+            <certificates>file://conf/private.csr</certificates>
+        </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/server/apps/demo/smtpserver.xml b/server/apps/demo/smtpserver.xml
new file mode 100644
index 0000000..6e04fda
--- /dev/null
+++ b/server/apps/demo/smtpserver.xml
@@ -0,0 +1,101 @@
+<?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.
+ -->
+
+<!-- Read https://james.apache.org/server/config-smtp-lmtp.html#SMTP_Configuration for further details -->
+
+<smtpservers>
+    <smtpserver enabled="true">
+        <jmxName>smtpserver-global</jmxName>
+        <bind>0.0.0.0:25</bind>
+        <connectionBacklog>200</connectionBacklog>
+        <tls socketTLS="false" startTLS="false">
+            <privateKey>file://conf/private.key</privateKey>
+            <certificates>file://conf/private.csr</certificates>
+        </tls>
+        <connectiontimeout>360</connectiontimeout>
+        <connectionLimit>0</connectionLimit>
+        <connectionLimitPerIP>0</connectionLimitPerIP>
+        <authRequired>false</authRequired>
+        <authorizedAddresses>127.0.0.0/8</authorizedAddresses>
+        <verifyIdentity>false</verifyIdentity>
+        <maxmessagesize>0</maxmessagesize>
+        <addressBracketsEnforcement>true</addressBracketsEnforcement>
+        <smtpGreeting>Apache JAMES awesome SMTP 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">
+            <privateKey>file://conf/private.key</privateKey>
+            <certificates>file://conf/private.csr</certificates>
+        </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>Apache JAMES awesome SMTP 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">
+            <privateKey>file://conf/private.key</privateKey>
+            <certificates>file://conf/private.csr</certificates>
+        </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>Apache JAMES awesome SMTP Server</smtpGreeting>
+        <handlerchain>
+            <handler class="org.apache.james.smtpserver.fastfail.ValidRcptHandler"/>
+            <handler class="org.apache.james.smtpserver.CoreCmdHandlerLoader"/>
+        </handlerchain>
+    </smtpserver>
+</smtpservers>
+
+
diff --git a/server/apps/memory-app/sample-configuration/imapserver.xml b/server/apps/memory-app/sample-configuration/imapserver.xml
index 1ee0e13..03a6c7f 100644
--- a/server/apps/memory-app/sample-configuration/imapserver.xml
+++ b/server/apps/memory-app/sample-configuration/imapserver.xml
@@ -53,7 +53,7 @@ under the License.
         <jmxName>imapserver-ssl</jmxName>
         <bind>0.0.0.0:993</bind>
         <connectionBacklog>200</connectionBacklog>
-        <tls socketTLS="true" startTLS="false">
+        <tls socketTLS="false" startTLS="true">
             <!-- To create a new keystore execute:
               keytool -genkey -alias james -keyalg RSA -storetype PKCS12 -keystore /path/to/james/conf/keystore
              -->

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


[james-project] 01/02: JAMES-3603 Adapt demo docker file to latest

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 a4573f3132f4d0cb7bd3dbdc8733d613103e9573
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Aug 29 19:09:15 2021 +0700

    JAMES-3603 Adapt demo docker file to latest
---
 server/apps/demo/Dockerfile     |  3 +--
 server/apps/demo/initialdata.sh |  8 ++++----
 server/apps/demo/james-cli      |  3 ---
 server/apps/demo/startup.sh     | 10 +++++++++-
 4 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/server/apps/demo/Dockerfile b/server/apps/demo/Dockerfile
index fc5d8c6..48da482 100644
--- a/server/apps/demo/Dockerfile
+++ b/server/apps/demo/Dockerfile
@@ -2,7 +2,7 @@
 #
 # VERSION	1.0
 
-FROM apache/james:jpa-3.6.0
+FROM apache/james:jpa-latest
 
 # Install git
 RUN apt-get update
@@ -15,7 +15,6 @@ RUN cp /root/wait-for-it/wait-for-it.sh /usr/bin/wait-for-it.sh
 
 COPY startup.sh /root
 COPY initialdata.sh /root
-COPY james-cli /usr/local/bin/
 
 RUN chmod +x /root/startup.sh
 RUN chmod +x /root/initialdata.sh
diff --git a/server/apps/demo/initialdata.sh b/server/apps/demo/initialdata.sh
index d4b8093..3fa5cba 100644
--- a/server/apps/demo/initialdata.sh
+++ b/server/apps/demo/initialdata.sh
@@ -1,8 +1,8 @@
 #!/bin/bash
 
-java -jar /root/james-cli.jar -h localhost -p 9999 adddomain james.local
+james-cli adddomain james.local
 
-java -jar /root/james-cli.jar -h localhost -p 9999 adduser user01@james.local 1234
-java -jar /root/james-cli.jar -h localhost -p 9999 adduser user02@james.local 1234
-java -jar /root/james-cli.jar -h localhost -p 9999 adduser user03@james.local 1234
+james-cli adduser user01@james.local 1234
+james-cli adduser user02@james.local 1234
+james-cli adduser user03@james.local 1234
 
diff --git a/server/apps/demo/james-cli b/server/apps/demo/james-cli
deleted file mode 100755
index 752e29c..0000000
--- a/server/apps/demo/james-cli
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/usr/bin/env bash
-
-java -jar /root/james-cli.jar -h 127.0.0.1 -p 9999 "$@"
\ No newline at end of file
diff --git a/server/apps/demo/startup.sh b/server/apps/demo/startup.sh
index eb86739..2a8510f 100644
--- a/server/apps/demo/startup.sh
+++ b/server/apps/demo/startup.sh
@@ -1,5 +1,13 @@
 #!/bin/bash
 
+if [[ ! -e /root/conf/private.key ]]; then
+    openssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Apache/L=Fundation/O=/CN=james.apache.org" -keyout /root/conf/private.key -out /root/conf/private.csr
+fi
+
 wait-for-it.sh --host=localhost --port=9999 --strict --timeout=0 -- ./initialdata.sh &
 
-java -classpath '/root/james-server.jar:/root/james-server-jpa-guice.lib/*' -javaagent:/root/james-server-jpa-guice.lib/openjpa-3.1.2.jar -Dlogback.configurationFile=/root/conf/logback.xml -Dworking.directory=/root/ org.apache.james.JPAJamesServerMain
\ No newline at end of file
+java -Djdk.tls.ephemeralDHKeySize=2048 \
+     -classpath '/root/resources:/root/classes:/root/libs/*' \
+     -javaagent:/root/libs/openjpa-3.1.2.jar \
+     -Dlogback.configurationFile=/root/conf/logback.xml \
+      -Dworking.directory=/root/ org.apache.james.JPAJamesServerMain
\ No newline at end of file

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