http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java ---------------------------------------------------------------------- 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 new file mode 100644 index 0000000..e905de8 --- /dev/null +++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/data/MemoryDataModule.java @@ -0,0 +1,76 @@ +/**************************************************************** + * 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.modules.data; + +import org.apache.james.domainlist.api.DomainList; +import org.apache.james.domainlist.memory.MemoryDomainList; +import org.apache.james.rrt.api.RecipientRewriteTable; +import org.apache.james.rrt.memory.MemoryRecipientRewriteTable; +import org.apache.james.user.api.UsersRepository; +import org.apache.james.user.memory.MemoryUsersRepository; +import org.apache.james.utils.ConfigurationPerformer; +import org.apache.james.utils.ConfigurationProvider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.inject.AbstractModule; +import com.google.inject.Inject; +import com.google.inject.Scopes; +import com.google.inject.Singleton; + +public class MemoryDataModule extends AbstractModule { + + private static final Logger LOGGER = LoggerFactory.getLogger(MemoryDataModule.class); + + @Override + protected void configure() { + bind(MemoryDomainList.class).in(Scopes.SINGLETON); + bind(DomainList.class).to(MemoryDomainList.class); + + bind(MemoryRecipientRewriteTable.class).in(Scopes.SINGLETON); + bind(RecipientRewriteTable.class).to(MemoryRecipientRewriteTable.class); + + bind(MemoryUsersRepository.class).toInstance(MemoryUsersRepository.withVirtualHosting()); + bind(UsersRepository.class).to(MemoryUsersRepository.class); + } + + @Singleton + public static class MemoryDataConfigurationPerformer implements ConfigurationPerformer { + + private final ConfigurationProvider configurationProvider; + private final MemoryDomainList memoryDomainList; + private final MemoryRecipientRewriteTable memoryRecipientRewriteTable; + + @Inject + public MemoryDataConfigurationPerformer(ConfigurationProvider configurationProvider, MemoryDomainList memoryDomainList, MemoryRecipientRewriteTable memoryRecipientRewriteTable) { + this.configurationProvider = configurationProvider; + this.memoryDomainList = memoryDomainList; + this.memoryRecipientRewriteTable = memoryRecipientRewriteTable; + } + + @Override + public void initModule() throws Exception { + memoryDomainList.setLog(LOGGER); + memoryDomainList.configure(configurationProvider.getConfiguration("domainlist")); + memoryRecipientRewriteTable.setLog(LOGGER); + memoryRecipientRewriteTable.configure(configurationProvider.getConfiguration("recipientrewritetable")); + } + } +}
http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/mailbox/MemoryMailboxModule.java ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/mailbox/MemoryMailboxModule.java b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/mailbox/MemoryMailboxModule.java new file mode 100644 index 0000000..85d6db9 --- /dev/null +++ b/server/container/guice/memory-guice/src/main/java/org/apache/james/modules/mailbox/MemoryMailboxModule.java @@ -0,0 +1,101 @@ +/**************************************************************** + * 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.modules.mailbox; + +import javax.inject.Singleton; + +import org.apache.james.adapter.mailbox.store.UserRepositoryAuthenticator; +import org.apache.james.mailbox.MailboxManager; +import org.apache.james.mailbox.MailboxPathLocker; +import org.apache.james.mailbox.SubscriptionManager; +import org.apache.james.mailbox.acl.GroupMembershipResolver; +import org.apache.james.mailbox.acl.MailboxACLResolver; +import org.apache.james.mailbox.acl.SimpleGroupMembershipResolver; +import org.apache.james.mailbox.acl.UnionMailboxACLResolver; +import org.apache.james.mailbox.exception.MailboxException; +import org.apache.james.mailbox.inmemory.InMemoryId; +import org.apache.james.mailbox.inmemory.InMemoryMailboxManager; +import org.apache.james.mailbox.inmemory.InMemoryMailboxSessionMapperFactory; +import org.apache.james.mailbox.inmemory.mail.InMemoryModSeqProvider; +import org.apache.james.mailbox.inmemory.mail.InMemoryUidProvider; +import org.apache.james.mailbox.store.Authenticator; +import org.apache.james.mailbox.store.JVMMailboxPathLocker; +import org.apache.james.mailbox.store.MailboxSessionMapperFactory; +import org.apache.james.mailbox.store.StoreSubscriptionManager; +import org.apache.james.mailbox.store.extractor.TextExtractor; +import org.apache.james.mailbox.store.mail.MailboxMapperFactory; +import org.apache.james.mailbox.store.mail.MessageMapperFactory; +import org.apache.james.mailbox.store.mail.ModSeqProvider; +import org.apache.james.mailbox.store.mail.UidProvider; +import org.apache.james.mailbox.store.mail.model.MailboxId; +import org.apache.james.mailbox.store.search.MessageSearchIndex; +import org.apache.james.mailbox.store.search.SimpleMessageSearchIndex; +import org.apache.james.mailbox.store.user.SubscriptionMapperFactory; +import org.apache.james.mailbox.tika.extractor.TikaTextExtractor; +import org.apache.james.modules.Names; + +import com.google.inject.AbstractModule; +import com.google.inject.Provides; +import com.google.inject.Scopes; +import com.google.inject.TypeLiteral; +import com.google.inject.name.Named; + +public class MemoryMailboxModule extends AbstractModule { + + @Override + protected void configure() { + + bind(new TypeLiteral<MessageMapperFactory<InMemoryId>>(){}).to(InMemoryMailboxSessionMapperFactory.class); + bind(new TypeLiteral<MailboxMapperFactory<InMemoryId>>(){}).to(InMemoryMailboxSessionMapperFactory.class); + bind(MailboxMapperFactory.class).to(InMemoryMailboxSessionMapperFactory.class); + bind(new TypeLiteral<MailboxSessionMapperFactory<InMemoryId>>(){}).to(InMemoryMailboxSessionMapperFactory.class); + bind(new TypeLiteral<MailboxSessionMapperFactory<? extends MailboxId>>(){}).to(InMemoryMailboxSessionMapperFactory.class); + bind(new TypeLiteral<ModSeqProvider<InMemoryId>>(){}).to(new TypeLiteral<InMemoryModSeqProvider>(){}); + bind(new TypeLiteral<UidProvider<InMemoryId>>(){}).to(new TypeLiteral<InMemoryUidProvider>(){}); + + bind(SubscriptionManager.class).to(StoreSubscriptionManager.class); + bind(SubscriptionMapperFactory.class).to(InMemoryMailboxSessionMapperFactory.class); + bind(MailboxSessionMapperFactory.class).to(InMemoryMailboxSessionMapperFactory.class); + bind(MailboxPathLocker.class).to(JVMMailboxPathLocker.class); + bind(Authenticator.class).to(UserRepositoryAuthenticator.class); + bind(MailboxManager.class).to(InMemoryMailboxManager.class); + bind(MailboxACLResolver.class).to(UnionMailboxACLResolver.class); + bind(GroupMembershipResolver.class).to(SimpleGroupMembershipResolver.class); + + bind(new TypeLiteral<MessageSearchIndex<InMemoryId>>(){}).to(new TypeLiteral<SimpleMessageSearchIndex<InMemoryId>>() {}); + bind(TextExtractor.class).to(TikaTextExtractor.class); + + bind(InMemoryMailboxSessionMapperFactory.class).in(Scopes.SINGLETON); + bind(new TypeLiteral<InMemoryModSeqProvider>(){}).in(Scopes.SINGLETON); + bind(new TypeLiteral<InMemoryUidProvider>(){}).in(Scopes.SINGLETON); + bind(StoreSubscriptionManager.class).in(Scopes.SINGLETON); + bind(JVMMailboxPathLocker.class).in(Scopes.SINGLETON); + bind(UserRepositoryAuthenticator.class).in(Scopes.SINGLETON); + bind(InMemoryMailboxManager.class).in(Scopes.SINGLETON); + bind(UnionMailboxACLResolver.class).in(Scopes.SINGLETON); + bind(SimpleGroupMembershipResolver.class).in(Scopes.SINGLETON); + } + + @Provides @Named(Names.MAILBOXMANAGER_NAME) @Singleton + public MailboxManager provideMailboxManager(InMemoryMailboxManager mailboxManager) throws MailboxException { + mailboxManager.init(); + return mailboxManager; + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java new file mode 100644 index 0000000..2926711 --- /dev/null +++ b/server/container/guice/memory-guice/src/test/java/org/apache/james/MemoryJamesServerTest.java @@ -0,0 +1,44 @@ +/**************************************************************** + * 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.jmap.methods.GetMessageListMethod; +import org.apache.james.mailbox.inmemory.InMemoryId; +import org.apache.james.modules.TestFilesystemModule; +import org.apache.james.modules.TestJMAPServerModule; +import org.junit.Rule; +import org.junit.rules.TemporaryFolder; + +import com.google.inject.TypeLiteral; + +public class MemoryJamesServerTest extends AbstractJamesServerTest<InMemoryId> { + + @Rule + public TemporaryFolder temporaryFolder = new TemporaryFolder(); + + @Override + protected GuiceJamesServer<InMemoryId> createJamesServer() { + return new GuiceJamesServer<>(new TypeLiteral<InMemoryId>(){}) + .combineWith(MemoryJamesServerMain.inMemoryServerModule) + .overrideWith(new TestFilesystemModule(temporaryFolder), + new TestJMAPServerModule(GetMessageListMethod.DEFAULT_MAXIMUM_LIMIT)); + } + +} http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/test/resources/dnsservice.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/dnsservice.xml b/server/container/guice/memory-guice/src/test/resources/dnsservice.xml new file mode 100644 index 0000000..0978a00 --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/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/517a4cfe/server/container/guice/memory-guice/src/test/resources/imapserver.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/imapserver.xml b/server/container/guice/memory-guice/src/test/resources/imapserver.xml new file mode 100644 index 0000000..ff478a9 --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/imapserver.xml @@ -0,0 +1,54 @@ +<?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:1143</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> + <connectionLimit>0</connectionLimit> + <connectionLimitPerIP>0</connectionLimitPerIP> + </imapserver> + <imapserver enabled="true"> + <jmxName>imapserver-ssl</jmxName> + <bind>0.0.0.0:1993</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> + <connectionLimit>0</connectionLimit> + <connectionLimitPerIP>0</connectionLimitPerIP> + </imapserver> +</imapservers> http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/test/resources/keystore ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/keystore b/server/container/guice/memory-guice/src/test/resources/keystore new file mode 100644 index 0000000..536a6c7 Binary files /dev/null and b/server/container/guice/memory-guice/src/test/resources/keystore differ http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/test/resources/lmtpserver.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/lmtpserver.xml b/server/container/guice/memory-guice/src/test/resources/lmtpserver.xml new file mode 100644 index 0000000..5c4a9c7 --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/lmtpserver.xml @@ -0,0 +1,41 @@ +<?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="true"> + <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/517a4cfe/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml b/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml new file mode 100644 index 0000000..57c5784 --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/mailetcontainer.xml @@ -0,0 +1,168 @@ +<?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="false"> + + <context> + <postmaster>postmas...@james.minet.net</postmaster> + </context> + + <spooler> + <threads>20</threads> + </spooler> + + <processors> + <processor state="root" enableJmx="false"> + <mailet match="All" class="PostmasterAlias"/> + <mailet match="RelayLimit=30" class="Null"/> + <!-- Hook on sievemana...@james.linagora.com + Mail send to this address will get interpreted with SIEVE Manage --> + <mailet match="RecipientIs=sievemana...@james.linagora.com" class="ToProcessor"> + <processor>sieve-manager-check</processor> + </mailet> + <mailet match="HasMailAttribute=spamChecked" class="ToProcessor"> + <processor>transport</processor> + </mailet> + <mailet match="All" class="SetMailAttribute"> + <spamChecked>true</spamChecked> + </mailet> + <mailet match="SMTPAuthSuccessful" class="ToProcessor"> + <processor>transport</processor> + </mailet> + <mailet match="InSpammerBlacklist=query.bondedsender.org." class="ToProcessor"> + <processor>transport</processor> + </mailet> + <!-- Check for delivery from a known spam server --> + <!-- This set of matchers/mailets redirect all emails from known --> + <!-- black holes, open relays, and spam servers to the spam processor --> + <!-- For this set to function properly, the spam processor must be configured. --> + <mailet match="InSpammerBlacklist=dnsbl.njabl.org." class="ToProcessor"> + <processor>spam</processor> + <notice>550 Requested action not taken: rejected - see http://njabl.org/</notice> + </mailet> + <mailet match="All" class="ToProcessor"> + <processor>transport</processor> + </mailet> + </processor> + + <processor state="error" enableJmx="false"> + <mailet match="All" class="Bounce"/> + <mailet match="All" class="ToRepository"> + <repositoryPath>file://var/mail/error/</repositoryPath> + </mailet> + </processor> + + + <processor state="transport" enableJmx="false"> + <mailet match="SMTPAuthSuccessful" class="SetMimeHeader"> + <name>X-UserIsAuth</name> + <value>true</value> + </mailet> + <mailet match="HasMailAttribute=org.apache.james.SMIMECheckSignature" class="SetMimeHeader"> + <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="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> + <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="spam" enableJmx="false"> + <mailet match="All" class="ToRepository"> + <repositoryPath>file://var/mail/spam/</repositoryPath> + </mailet> + </processor> + + <processor state="local-address-error" enableJmx="false"> + <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="false"> + <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="false"> + <mailet match="All" class="DSNBounce"> + <passThrough>false</passThrough> + </mailet> + </processor> + + <processor state="sieve-manager-check" enableJmx="false"> + <!-- Only local users can manage their scripts --> + <mailet match="RecipientIsLocal" class="ToProcessor"> + <processor>sieve-manager</processor> + </mailet> + <!-- Notify other people about their failure --> + <mailet match="All" class="Bounce"> + <inline>heads</inline> + <attachment>none</attachment> + <passThrough>false</passThrough> + <prefix>[REJECTED]</prefix> + <notice> + You can't send messages to configure SIEVE on this serveur unless you are the official SIEVE manager. + </notice> + </mailet> + <mailet match="All" class="Null"/> + </processor> + + <processor state="sieve-manager"> + <mailet match="All" class="SetMailAttribute"> + <org.apache.james.SMTPAuthUser>true</org.apache.james.SMTPAuthUser> + </mailet> + <mailet match="All" class="org.apache.james.transport.mailets.managesieve.ManageSieveMailet"> + <helpURL>file:/root/james-server-app-3.0.0-beta5-SNAPSHOT/conf/managesieve.help.txt</helpURL> + </mailet> + <mailet match="All" class="Null"/> + </processor> + </processors> + +</mailetcontainer> + + http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/test/resources/mailrepositorystore.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/mailrepositorystore.xml b/server/container/guice/memory-guice/src/test/resources/mailrepositorystore.xml new file mode 100644 index 0000000..3ca4a1d --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/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> + <mailrepositories> + <mailrepository class="org.apache.james.mailrepository.file.FileMailRepository"> + <protocols> + <protocol>file</protocol> + </protocols> + <config FIFO="false" CACHEKEYS="true"/> + </mailrepository> + </mailrepositories> +</mailrepositorystore> http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/test/resources/managesieveserver.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/managesieveserver.xml b/server/container/guice/memory-guice/src/test/resources/managesieveserver.xml new file mode 100644 index 0000000..ec57e09 --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/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="true"> + + <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/517a4cfe/server/container/guice/memory-guice/src/test/resources/pop3server.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/pop3server.xml b/server/container/guice/memory-guice/src/test/resources/pop3server.xml new file mode 100644 index 0000000..e4187da --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/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="true"> + <jmxName>pop3server</jmxName> + <bind>0.0.0.0:1110</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> http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/container/guice/memory-guice/src/test/resources/smtpserver.xml ---------------------------------------------------------------------- diff --git a/server/container/guice/memory-guice/src/test/resources/smtpserver.xml b/server/container/guice/memory-guice/src/test/resources/smtpserver.xml new file mode 100644 index 0000000..a3d4b8f --- /dev/null +++ b/server/container/guice/memory-guice/src/test/resources/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:1025</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>0.0.0.0/0</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:10465</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> + <!-- + Authorize only local users + --> + <authRequired>true</authRequired> + <authorizedAddresses>0.0.0.0/0</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:1587</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> + <!-- + Authorize only local users + --> + <authRequired>true</authRequired> + <authorizedAddresses>0.0.0.0/0</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/517a4cfe/server/data/data-memory/pom.xml ---------------------------------------------------------------------- diff --git a/server/data/data-memory/pom.xml b/server/data/data-memory/pom.xml index aa35b9f..fa43105 100644 --- a/server/data/data-memory/pom.xml +++ b/server/data/data-memory/pom.xml @@ -44,6 +44,12 @@ </dependency> <dependency> <groupId>org.apache.james</groupId> + <artifactId>james-server-dnsservice-api</artifactId> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> <artifactId>james-server-data-library</artifactId> <type>test-jar</type> <scope>test</scope> http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/pom.xml ---------------------------------------------------------------------- diff --git a/server/pom.xml b/server/pom.xml index 358c385..910d58f 100644 --- a/server/pom.xml +++ b/server/pom.xml @@ -58,7 +58,9 @@ <module>karaf/features</module> <module>karaf/integration</module> - <module>container/cassandra-guice</module> + <module>container/guice/cassandra-guice</module> + <module>container/guice/memory-guice</module> + <module>container/guice/guice-common</module> <module>container/cli</module> <module>container/core</module> <module>container/filesystem-api</module> @@ -92,7 +94,9 @@ <module>protocols/fetchmail</module> <module>protocols/protocols-imap4</module> <module>protocols/jmap</module> - <module>protocols/jmap-integration-testing</module> + <module>protocols/jmap-integration-testing/cassandra-jmap-integration-testing</module> + <module>protocols/jmap-integration-testing/memory-jmap-integration-testing</module> + <module>protocols/jmap-integration-testing/jmap-integration-testing-common</module> <module>protocols/protocols-library</module> <module>protocols/protocols-lmtp</module> <module>protocols/protocols-managesieve</module> @@ -220,6 +224,17 @@ </dependency> <dependency> <groupId>org.apache.james</groupId> + <artifactId>james-server-guice-common</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> + <artifactId>james-server-guice-common</artifactId> + <version>${project.version}</version> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> <artifactId>james-server-jetty</artifactId> <version>${project.version}</version> </dependency> @@ -531,6 +546,11 @@ </dependency> <dependency> <groupId>org.apache.james</groupId> + <artifactId>james-server-data-memory</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> <artifactId>james-server-core</artifactId> <version>${project.version}</version> </dependency> @@ -555,6 +575,11 @@ </dependency> <dependency> <groupId>org.apache.james</groupId> + <artifactId>james-server-memory-guice</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> <artifactId>james-server-jmap</artifactId> <version>${project.version}</version> </dependency> @@ -564,6 +589,12 @@ <version>${project.version}</version> </dependency> <dependency> + <groupId>org.apache.james</groupId> + <artifactId>james-server-jmap-integration-testing</artifactId> + <type>test-jar</type> + <version>${project.version}</version> + </dependency> + <dependency> <groupId>org.apache.james.protocols</groupId> <artifactId>protocols-smtp</artifactId> <version>${protocols.version}</version> @@ -574,7 +605,6 @@ <groupId>org.apache.james</groupId> <artifactId>apache-james-mailbox-memory</artifactId> <version>${mailbox.version}</version> - <scope>test</scope> </dependency> <dependency> <groupId>org.apache.james</groupId> @@ -853,6 +883,11 @@ <artifactId>commons-collections4</artifactId> <version>4.0</version> </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>java-hamcrest</artifactId> + <version>2.0.0.0</version> + </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-api</artifactId> http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml new file mode 100644 index 0000000..c5b6f4e --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/pom.xml @@ -0,0 +1,255 @@ +<?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. +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <artifactId>james-server</artifactId> + <groupId>org.apache.james</groupId> + <version>3.0.0-beta5-SNAPSHOT</version> + <relativePath>../../../pom.xml</relativePath> + </parent> + + <artifactId>cassandra-jmap-integration-testing</artifactId> + <packaging>jar</packaging> + + <name>Apache James :: Server :: JMAP :: Cassandra Integration testing</name> + + <profiles> + <profile> + <id>noTest</id> + <activation> + <os> + <family>windows</family> + </os> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <configuration> + <skipTests>true</skipTests> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>disable-build-for-older-jdk</id> + <activation> + <jdk>(,1.8)</jdk> + </activation> + <build> + <plugins> + <plugin> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <id>default-jar</id> + <phase>none</phase> + </execution> + <execution> + <id>jar</id> + <phase>none</phase> + </execution> + <execution> + <id>test-jar</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-compiler-plugin</artifactId> + <executions> + <execution> + <id>default-compile</id> + <phase>none</phase> + </execution> + <execution> + <id>default-testCompile</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-surefire-plugin</artifactId> + <executions> + <execution> + <id>default-test</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-source-plugin</artifactId> + <executions> + <execution> + <id>attach-sources</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-install-plugin</artifactId> + <executions> + <execution> + <id>default-install</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-resources-plugin</artifactId> + <executions> + <execution> + <id>default-resources</id> + <phase>none</phase> + </execution> + <execution> + <id>default-testResources</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-site-plugin</artifactId> + <executions> + <execution> + <id>attach-descriptor</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>build-for-jdk-8</id> + <activation> + <jdk>[1.8,)</jdk> + </activation> + <dependencies> + <dependency> + <groupId>${project.groupId}</groupId> + <artifactId>apache-james-mailbox-elasticsearch</artifactId> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> + <artifactId>james-server-cassandra-guice</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> + <artifactId>james-server-cassandra-guice</artifactId> + <scope>test</scope> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> + <artifactId>james-server-guice-common</artifactId> + <scope>test</scope> + <type>test-jar</type> + </dependency> + <dependency> + <groupId>org.apache.james</groupId> + <artifactId>james-server-jmap-integration-testing</artifactId> + <type>test-jar</type> + <scope>test</scope> + </dependency> + <dependency> + <groupId>com.jayway.restassured</groupId> + <artifactId>rest-assured</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.assertj</groupId> + <artifactId>assertj-core</artifactId> + <version>${assertj-3.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.cassandraunit</groupId> + <artifactId>cassandra-unit</artifactId> + <version>${cassandra-unit.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.hamcrest</groupId> + <artifactId>java-hamcrest</artifactId> + <scope>test</scope> + </dependency> + </dependencies> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <configuration> + <archive> + <manifest> + <mainClass>fully.qualified.MainClass</mainClass> + </manifest> + </archive> + <descriptorRefs> + <descriptorRef>jar-with-dependencies</descriptorRef> + </descriptorRefs> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>disable-animal-sniffer</id> + <activation> + <jdk>[1.6,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>animal-sniffer-maven-plugin</artifactId> + <executions> + <execution> + <id>check_java_6</id> + <phase>none</phase> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> +</project> http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java new file mode 100644 index 0000000..2c7bf47 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMailboxesMethodTest.java @@ -0,0 +1,53 @@ +/**************************************************************** + * 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.jmap.cassandra; + +import org.apache.james.CassandraJamesServerMain; +import org.apache.james.GuiceJamesServer; +import org.apache.james.backends.cassandra.EmbeddedCassandra; +import org.apache.james.jmap.methods.integration.GetMailboxesMethodTest; +import org.apache.james.jmap.servers.CassandraJmapServerModule; +import org.apache.james.mailbox.cassandra.CassandraId; +import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch; +import org.junit.Rule; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; + +import com.google.inject.TypeLiteral; + +public class CassandraGetMailboxesMethodTest extends GetMailboxesMethodTest { + + private TemporaryFolder temporaryFolder = new TemporaryFolder(); + private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(); + private EmbeddedCassandra cassandra = EmbeddedCassandra.createStartServer(); + + @Rule + public RuleChain chain = RuleChain + .outerRule(temporaryFolder) + .around(embeddedElasticSearch); + + @Override + protected GuiceJamesServer<CassandraId> createJmapServer() { + return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){}) + .combineWith(CassandraJamesServerMain.cassandraServerModule) + .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch, cassandra)); + } + +} http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java new file mode 100644 index 0000000..1d81cc8 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessageListMethodTest.java @@ -0,0 +1,57 @@ +/**************************************************************** + * 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.jmap.cassandra; + +import org.apache.james.CassandraJamesServerMain; +import org.apache.james.GuiceJamesServer; +import org.apache.james.backends.cassandra.EmbeddedCassandra; +import org.apache.james.jmap.methods.integration.GetMessageListMethodTest; +import org.apache.james.jmap.servers.CassandraJmapServerModule; +import org.apache.james.mailbox.cassandra.CassandraId; +import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch; +import org.junit.Rule; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; + +import com.google.inject.TypeLiteral; + +public class CassandraGetMessageListMethodTest extends GetMessageListMethodTest { + + private TemporaryFolder temporaryFolder = new TemporaryFolder(); + private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(); + private EmbeddedCassandra cassandra = EmbeddedCassandra.createStartServer(); + + @Rule + public RuleChain chain = RuleChain + .outerRule(temporaryFolder) + .around(embeddedElasticSearch); + + @Override + protected GuiceJamesServer<?> createJmapServer() { + return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){}) + .combineWith(CassandraJamesServerMain.cassandraServerModule) + .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch, cassandra)); + } + + @Override + protected void await() { + embeddedElasticSearch.awaitForElasticSearch(); + } +} http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java new file mode 100644 index 0000000..7cc7a55 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraGetMessagesMethodTest.java @@ -0,0 +1,57 @@ +/**************************************************************** + * 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.jmap.cassandra; + +import org.apache.james.CassandraJamesServerMain; +import org.apache.james.GuiceJamesServer; +import org.apache.james.backends.cassandra.EmbeddedCassandra; +import org.apache.james.jmap.methods.integration.GetMessagesMethodTest; +import org.apache.james.jmap.servers.CassandraJmapServerModule; +import org.apache.james.mailbox.cassandra.CassandraId; +import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch; +import org.junit.Rule; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; + +import com.google.inject.TypeLiteral; + +public class CassandraGetMessagesMethodTest extends GetMessagesMethodTest { + + private TemporaryFolder temporaryFolder = new TemporaryFolder(); + private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(); + private EmbeddedCassandra cassandra = EmbeddedCassandra.createStartServer(); + + @Rule + public RuleChain chain = RuleChain + .outerRule(temporaryFolder) + .around(embeddedElasticSearch); + + @Override + protected GuiceJamesServer<?> createJmapServer() { + return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){}) + .combineWith(CassandraJamesServerMain.cassandraServerModule) + .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch, cassandra)); + } + + @Override + protected void await() { + embeddedElasticSearch.awaitForElasticSearch(); + } +} http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java new file mode 100644 index 0000000..4408a31 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraJmapAuthenticationTest.java @@ -0,0 +1,55 @@ +/**************************************************************** + * 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.jmap.cassandra; + +import org.apache.james.CassandraJamesServerMain; +import org.apache.james.GuiceJamesServer; +import org.apache.james.backends.cassandra.EmbeddedCassandra; +import org.apache.james.jmap.FixedDateZonedDateTimeProvider; +import org.apache.james.jmap.JMAPAuthenticationTest; +import org.apache.james.jmap.servers.CassandraJmapServerModule; +import org.apache.james.jmap.utils.ZonedDateTimeProvider; +import org.apache.james.mailbox.cassandra.CassandraId; +import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch; +import org.junit.Rule; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; + +import com.google.inject.TypeLiteral; + +public class CassandraJmapAuthenticationTest extends JMAPAuthenticationTest { + + private TemporaryFolder temporaryFolder = new TemporaryFolder(); + private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(); + private EmbeddedCassandra cassandra = EmbeddedCassandra.createStartServer(); + + @Rule + public RuleChain chain = RuleChain + .outerRule(temporaryFolder) + .around(embeddedElasticSearch); + + @Override + protected GuiceJamesServer<?> createJmapServer(FixedDateZonedDateTimeProvider zonedDateTimeProvider) { + return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){}) + .combineWith(CassandraJamesServerMain.cassandraServerModule) + .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch, cassandra), + (binder) -> binder.bind(ZonedDateTimeProvider.class).toInstance(zonedDateTimeProvider)); + } + +} http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java new file mode 100644 index 0000000..04a5cb1 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/cassandra/CassandraSetMessagesMethodTest.java @@ -0,0 +1,57 @@ +/**************************************************************** + * 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.jmap.cassandra; + +import org.apache.james.CassandraJamesServerMain; +import org.apache.james.GuiceJamesServer; +import org.apache.james.backends.cassandra.EmbeddedCassandra; +import org.apache.james.jmap.methods.integration.SetMessagesMethodTest; +import org.apache.james.jmap.servers.CassandraJmapServerModule; +import org.apache.james.mailbox.cassandra.CassandraId; +import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch; +import org.junit.Rule; +import org.junit.rules.RuleChain; +import org.junit.rules.TemporaryFolder; + +import com.google.inject.TypeLiteral; + +public class CassandraSetMessagesMethodTest extends SetMessagesMethodTest { + + private TemporaryFolder temporaryFolder = new TemporaryFolder(); + private EmbeddedElasticSearch embeddedElasticSearch = new EmbeddedElasticSearch(); + private EmbeddedCassandra cassandra = EmbeddedCassandra.createStartServer(); + + @Rule + public RuleChain chain = RuleChain + .outerRule(temporaryFolder) + .around(embeddedElasticSearch); + + @Override + protected GuiceJamesServer<?> createJmapServer() { + return new GuiceJamesServer<>(new TypeLiteral<CassandraId>(){}) + .combineWith(CassandraJamesServerMain.cassandraServerModule) + .overrideWith(new CassandraJmapServerModule(temporaryFolder, embeddedElasticSearch, cassandra)); + } + + @Override + protected void await() { + embeddedElasticSearch.awaitForElasticSearch(); + } +} http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/servers/CassandraJmapServerModule.java ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/servers/CassandraJmapServerModule.java b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/servers/CassandraJmapServerModule.java new file mode 100644 index 0000000..e9c9c3c --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/java/org/apache/james/jmap/servers/CassandraJmapServerModule.java @@ -0,0 +1,64 @@ +/**************************************************************** + * 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.jmap.servers; + +import javax.inject.Singleton; + +import org.apache.james.backends.cassandra.CassandraCluster; +import org.apache.james.backends.cassandra.EmbeddedCassandra; +import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch; +import org.apache.james.modules.TestElasticSearchModule; +import org.apache.james.modules.TestFilesystemModule; +import org.apache.james.modules.TestJMAPServerModule; +import org.junit.rules.TemporaryFolder; + +import com.datastax.driver.core.Session; +import com.google.inject.AbstractModule; +import com.google.inject.Provides; + +public class CassandraJmapServerModule extends AbstractModule { + + private static final int LIMIT_TO_3_MESSAGES = 3; + private final TemporaryFolder temporaryFolder; + private final EmbeddedElasticSearch embeddedElasticSearch; + private final EmbeddedCassandra cassandra; + + public CassandraJmapServerModule(TemporaryFolder temporaryFolder, + EmbeddedElasticSearch embeddedElasticSearch, + EmbeddedCassandra cassandra) { + this.temporaryFolder = temporaryFolder; + this.embeddedElasticSearch = embeddedElasticSearch; + this.cassandra = cassandra; + } + + @Override + protected void configure() { + install(new TestElasticSearchModule(embeddedElasticSearch)); + install(new TestFilesystemModule(temporaryFolder)); + install(new TestJMAPServerModule(LIMIT_TO_3_MESSAGES)); + bind(EmbeddedCassandra.class).toInstance(cassandra); + } + + @Provides + @Singleton + Session provideSession(CassandraCluster initializedCassandra) { + return initializedCassandra.getConf(); + } +} http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/dnsservice.xml ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/dnsservice.xml b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/dnsservice.xml new file mode 100644 index 0000000..0978a00 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/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/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/imapserver.xml ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/imapserver.xml b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/imapserver.xml new file mode 100644 index 0000000..ff478a9 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/imapserver.xml @@ -0,0 +1,54 @@ +<?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:1143</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> + <connectionLimit>0</connectionLimit> + <connectionLimitPerIP>0</connectionLimitPerIP> + </imapserver> + <imapserver enabled="true"> + <jmxName>imapserver-ssl</jmxName> + <bind>0.0.0.0:1993</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> + <connectionLimit>0</connectionLimit> + <connectionLimitPerIP>0</connectionLimitPerIP> + </imapserver> +</imapservers> http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/keystore ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/keystore b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/keystore new file mode 100644 index 0000000..536a6c7 Binary files /dev/null and b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/keystore differ http://git-wip-us.apache.org/repos/asf/james-project/blob/517a4cfe/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/lmtpserver.xml ---------------------------------------------------------------------- diff --git a/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/lmtpserver.xml b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/lmtpserver.xml new file mode 100644 index 0000000..5c4a9c7 --- /dev/null +++ b/server/protocols/jmap-integration-testing/cassandra-jmap-integration-testing/src/test/resources/lmtpserver.xml @@ -0,0 +1,41 @@ +<?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="true"> + <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> --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org