JAMES-2153 Added docker file for Guice JPA-SMTP
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/9a96bd51 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/9a96bd51 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/9a96bd51 Branch: refs/heads/master Commit: 9a96bd51527bdc8baab8a4f00891483c642406d6 Parents: 3d83c3d Author: matzepan <mat...@gmail.com> Authored: Sat Oct 20 19:28:53 2018 +0200 Committer: Benoit Tellier <btell...@linagora.com> Committed: Thu Nov 1 10:57:34 2018 +0700 ---------------------------------------------------------------------- dockerfiles/compilation/java-8/compile.sh | 11 +- dockerfiles/run/guice/jpa-smtp/Dockerfile | 28 +++++ .../jpa-smtp/destination/conf/dnsservice.xml | 29 +++++ .../jpa-smtp/destination/conf/domainlist.xml | 28 +++++ .../destination/conf/james-database.properties | 46 ++++++++ .../jpa-smtp/destination/conf/jmx.properties | 29 +++++ .../guice/jpa-smtp/destination/conf/logback.xml | 28 +++++ .../destination/conf/mailetcontainer.xml | 108 +++++++++++++++++++ .../destination/conf/mailrepositorystore.xml | 34 ++++++ .../destination/conf/recipientrewritetable.xml | 27 +++++ .../jpa-smtp/destination/conf/smtpserver.xml | 105 ++++++++++++++++++ .../destination/conf/usersrepository.xml | 27 +++++ .../destination/extensions-jars/README.md | 5 + 13 files changed, 504 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/compilation/java-8/compile.sh ---------------------------------------------------------------------- diff --git a/dockerfiles/compilation/java-8/compile.sh b/dockerfiles/compilation/java-8/compile.sh index 954e78a..d3d86ad 100755 --- a/dockerfiles/compilation/java-8/compile.sh +++ b/dockerfiles/compilation/java-8/compile.sh @@ -15,6 +15,7 @@ printUsage() { ORIGIN=/origin CASSANDRA_DESTINATION=/cassandra/destination JPA_DESTINATION=/jpa/destination +JPA_SMTP_DESTINATION=/jpa-smpt/destination SPRING_DESTINATION=/spring/destination SWAGGER_DESTINATION=/swagger @@ -77,6 +78,14 @@ if [ $? -eq 0 ]; then cp -r server/container/cli/target/james-server-cli.lib $JPA_DESTINATION || true fi + if [ -d "$JPA_SMTP_DESTINATION" ]; then + echo "Copying JPA-SMTP jars" + cp server/container/guice/jpa-smpt/target/james-server-jpa-smtp-guice.jar $JPA_SMTP_DESTINATION || true + cp -r server/container/guice/jpa-smpt/target/james-server-jpa-smtp-guice.lib $JPA_SMTP_DESTINATION || true + cp server/container/cli/target/james-server-cli.jar $JPA_SMTP_DESTINATION || true + cp -r server/container/cli/target/james-server-cli.lib $JPA_SMTP_DESTINATION || true + fi + if [ -d "$SPRING_DESTINATION" ]; then echo "Copying SPRING jars" cp server/app/target/james-server-app-*-app.zip $SPRING_DESTINATION @@ -87,4 +96,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 +fi \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/Dockerfile ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/Dockerfile b/dockerfiles/run/guice/jpa-smtp/Dockerfile new file mode 100644 index 0000000..7e57dda --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/Dockerfile @@ -0,0 +1,28 @@ +# Run James +# +# VERSION 1.0 + +FROM openjdk:8u171-jdk + +# Ports that are used +# +# 25 SMTP without authentication +# 143 IMAP with startTLS enabled +# 465 SMTP with authentication and socketTLS enabled +# 587 SMTP with authentication and startTLS enabled +# 8000 Web Admin interface (unsecured: expose at your own risks) + +EXPOSE 25 143 465 587 8000 + +WORKDIR /root + +# Get data we need to run James : build results and configuration +ADD destination/james-server-jpa-smtp-guice.jar /root/james-server-jpa-smtp-guice.jar +ADD destination/james-server-jpa-smtp-guice.lib /root/james-server-jpa-smtp-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 + +ENTRYPOINT java -classpath '/root/james-server-jpa-smtp-guice.jar:/root/james-server-jpa-smtp-guice.lib/*' -javaagent:/root/james-server-jpa-smtp-guice.lib/openjpa-3.0.0.jar -Dlogback.configurationFile=/root/conf/logback.xml -Dworking.directory=/root/ org.apache.james.JPAJamesServerMain http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/dnsservice.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/dnsservice.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/dnsservice.xml new file mode 100644 index 0000000..0978a00 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/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> http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/domainlist.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/domainlist.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/domainlist.xml new file mode 100644 index 0000000..fc64fd2 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/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 class="org.apache.james.domainlist.jpa.JPADomainList"> + <domainnames> + <domainname>james.linagora.com</domainname> + </domainnames> + <autodetect>true</autodetect> + <autodetectIP>true</autodetectIP> + <defaultDomain>localhost</defaultDomain> +</domainlist> http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/james-database.properties ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/james-database.properties b/dockerfiles/run/guice/jpa-smtp/destination/conf/james-database.properties new file mode 100644 index 0000000..22770d0 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/destination/conf/james-database.properties @@ -0,0 +1,46 @@ +# 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 + +# Use derby as default +database.driverClassName=org.apache.derby.jdbc.EmbeddedDriver +database.url=jdbc:derby:../var/store/derby;create=true +database.username=app +database.password=app + +# Supported adapters are: +# DB2, DERBY, H2, HSQL, INFORMIX, MYSQL, ORACLE, POSTGRESQL, SQL_SERVER, SYBASE +vendorAdapter.database=DERBY + +# Use streaming for Blobs +# This is only supported on a limited set of databases atm. You should check if its supported by your DB before enable +# it. +# +# See: +# http://openjpa.apache.org/builds/latest/docs/manual/ref_guide_mapping_jpa.html #7.11. LOB Streaming +# +openjpa.streaming=false + +# Validate the data source before using it +# datasource.testOnBorrow=true +# datasource.validationQueryTimeoutSec=2 +# This is different per database. See https://stackoverflow.com/questions/10684244/dbcp-validationquery-for-different-databases#10684260 +# datasource.validationQuery=select 1 http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/jmx.properties ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/jmx.properties b/dockerfiles/run/guice/jpa-smtp/destination/conf/jmx.properties new file mode 100644 index 0000000..1c39a17 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/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 http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/logback.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/logback.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/logback.xml new file mode 100644 index 0000000..1f91099 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/destination/conf/logback.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="UTF-8"?> +<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> http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/mailetcontainer.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/mailetcontainer.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/mailetcontainer.xml new file mode 100644 index 0000000..c1e2dd5 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/destination/conf/mailetcontainer.xml @@ -0,0 +1,108 @@ +<?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="Bounce"/> + <mailet match="All" class="ToRepository"> + <repositoryPath>file://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> + + <mailet match="All" class="RemoveMimeHeader"> + <name>bcc</name> + <onMailetException>ignore</onMailetException> + </mailet> + <mailet match="All" class="RecipientRewriteTable" /> + <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="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> + <mailet match="All" class="ToProcessor"> + <processor>relay-denied</processor> + </mailet> + </processor> + + <processor state="local-address-error" enableJmx="true"> + <mailet match="All" class="Bounce"> + <attachment>none</attachment> + </mailet> + <mailet match="All" class="ToRepository"> + <repositoryPath>file://var/mail/address-error/</repositoryPath> + </mailet> + </processor> + + <processor state="relay-denied" enableJmx="true"> + <mailet match="All" class="Bounce"> + <attachment>none</attachment> + </mailet> + <mailet match="All" class="ToRepository"> + <repositoryPath>file://var/mail/relay-denied/</repositoryPath> + <notice>Warning: You are sending an e-mail to a remote server. You must be authentified to perform such an operation</notice> + </mailet> + </processor> + + <processor state="bounces" enableJmx="true"> + <mailet match="All" class="DSNBounce"> + <passThrough>false</passThrough> + </mailet> + </processor> + </processors> + +</mailetcontainer> + + http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/mailrepositorystore.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/mailrepositorystore.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/mailrepositorystore.xml new file mode 100644 index 0000000..acca810 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/destination/conf/mailrepositorystore.xml @@ -0,0 +1,34 @@ +<?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> + <mailrepositories> + <!-- File based repositories. These repositories store all message data --> + <!-- in the file system. --> + <mailrepository class="org.apache.james.mailrepository.file.FileMailRepository"> + <protocols> + <protocol>file</protocol> + </protocols> + <!-- Set if the messages should be listed sorted. False by default --> + <config FIFO="false" CACHEKEYS="true"/> + </mailrepository> + </mailrepositories> +</mailrepositorystore> http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/recipientrewritetable.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/recipientrewritetable.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/recipientrewritetable.xml new file mode 100644 index 0000000..7e7f586 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/destination/conf/recipientrewritetable.xml @@ -0,0 +1,27 @@ +<?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 class="org.apache.james.rrt.jpa.JPARecipientRewriteTable"> + <recursiveMapping>true</recursiveMapping> + <mappingLimit>10</mappingLimit> + <mapping>some@domain=some</mapping> +</recipientrewritetable> + http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/smtpserver.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/smtpserver.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/smtpserver.xml new file mode 100644 index 0000000..e464ca6 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/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> + + http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/conf/usersrepository.xml ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/conf/usersrepository.xml b/dockerfiles/run/guice/jpa-smtp/destination/conf/usersrepository.xml new file mode 100644 index 0000000..e1f1b08 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/destination/conf/usersrepository.xml @@ -0,0 +1,27 @@ +<?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" class="org.apache.james.user.jpa.JPAUsersRepository"> + <destination URL="file://users/"/> + <algorithm>SHA-512</algorithm> + <enableVirtualHosting>true</enableVirtualHosting> + <enableForwarding>true</enableForwarding> +</usersrepository> + http://git-wip-us.apache.org/repos/asf/james-project/blob/9a96bd51/dockerfiles/run/guice/jpa-smtp/destination/extensions-jars/README.md ---------------------------------------------------------------------- diff --git a/dockerfiles/run/guice/jpa-smtp/destination/extensions-jars/README.md b/dockerfiles/run/guice/jpa-smtp/destination/extensions-jars/README.md new file mode 100644 index 0000000..00f9d15 --- /dev/null +++ b/dockerfiles/run/guice/jpa-smtp/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 your customs Mailets/Matchers. --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org