Author: matthieu Date: Tue Nov 3 16:50:17 2015 New Revision: 1712338 URL: http://svn.apache.org/viewvc?rev=1712338&view=rev Log: JAMES-1626 Add mailet support in cassandra-guice module
Added: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/SieveModule.java james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceGenericLoader.java james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMailetLoader.java james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMatcherLoader.java james/project/trunk/server/container/cassandra-guice/src/test/resources/mailetcontainer.xml Modified: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java james/project/trunk/server/container/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/system/hbase/TablePool.java Modified: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java?rev=1712338&r1=1712337&r2=1712338&view=diff ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java (original) +++ james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/CassandraJamesServerMain.java Tue Nov 3 16:50:17 2015 @@ -31,12 +31,14 @@ import org.apache.james.modules.protocol import org.apache.james.modules.protocols.ProtocolHandlerModule; import org.apache.james.modules.protocols.SMTPServerModule; import org.apache.james.modules.server.ActiveMQQueueModule; +import org.apache.james.modules.server.CamelMailetContainerModule; import org.apache.james.modules.server.ConfigurationPerformerModule; import org.apache.james.modules.server.DNSServiceModule; import org.apache.james.modules.server.FileSystemModule; import org.apache.james.modules.server.JMXServerModule; import org.apache.james.modules.server.MailStoreRepositoryModule; import org.apache.james.modules.server.QuotaModule; +import org.apache.james.modules.server.SieveModule; import com.google.inject.Module; import com.google.inject.util.Modules; @@ -58,9 +60,11 @@ public class CassandraJamesServerMain { new SMTPServerModule(), new LMTPServerModule(), new ActiveMQQueueModule(), - new QuotaModule(), new FileSystemModule(), - new MailStoreRepositoryModule()); + new SieveModule(), + new MailStoreRepositoryModule(), + new CamelMailetContainerModule(), + new QuotaModule()); public static void main(String[] args) throws Exception { CassandraJamesServer server = new CassandraJamesServer(Modules.combine( Added: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java?rev=1712338&view=auto ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java (added) +++ james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/CamelMailetContainerModule.java Tue Nov 3 16:50:17 2015 @@ -0,0 +1,107 @@ +/**************************************************************** + * 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.server; + +import com.google.inject.AbstractModule; +import com.google.inject.Inject; +import com.google.inject.Provides; +import com.google.inject.Singleton; +import com.google.inject.multibindings.Multibinder; +import org.apache.camel.impl.DefaultCamelContext; +import org.apache.james.dnsservice.api.DNSService; +import org.apache.james.domainlist.api.DomainList; +import org.apache.james.mailetcontainer.api.MailProcessor; +import org.apache.james.mailetcontainer.api.MailetLoader; +import org.apache.james.mailetcontainer.api.MatcherLoader; +import org.apache.james.mailetcontainer.api.jmx.MailSpoolerMBean; +import org.apache.james.mailetcontainer.impl.JamesMailSpooler; +import org.apache.james.mailetcontainer.impl.JamesMailetContext; +import org.apache.james.mailetcontainer.impl.camel.CamelCompositeProcessor; +import org.apache.james.user.api.UsersRepository; +import org.apache.james.utils.ClassPathConfigurationProvider; +import org.apache.james.utils.ConfigurationPerformer; +import org.apache.james.utils.GuiceMailetLoader; +import org.apache.james.utils.GuiceMatcherLoader; +import org.apache.mailet.MailetContext; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +public class CamelMailetContainerModule extends AbstractModule { + + private final static Logger LOGGER = LoggerFactory.getLogger(CamelMailetContainerModule.class); + + @Override + protected void configure() { + bind(MailProcessor.class).to(CamelCompositeProcessor.class); + bind(MailSpoolerMBean.class).to(JamesMailSpooler.class); + bind(MailetLoader.class).to(GuiceMailetLoader.class); + bind(MatcherLoader.class).to(GuiceMatcherLoader.class); + Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(IMAPModuleConfigurationPerformer.class); + } + + @Provides + @Singleton + private MailetContext provideMailetContext(MailProcessor processorList, + DNSService dns, + UsersRepository localusers, + DomainList domains) { + JamesMailetContext jamesMailetContext = new JamesMailetContext(); + jamesMailetContext.setLog(LOGGER); + jamesMailetContext.setDNSService(dns); + jamesMailetContext.setMailProcessor(processorList); + jamesMailetContext.setUsersRepository(localusers); + jamesMailetContext.setDomainList(domains); + return jamesMailetContext; + } + + @Singleton + public static class IMAPModuleConfigurationPerformer implements ConfigurationPerformer { + + private final ClassPathConfigurationProvider classPathConfigurationProvider; + private final CamelCompositeProcessor camelCompositeProcessor; + private final JamesMailSpooler jamesMailSpooler; + private final JamesMailetContext mailetContext; + + @Inject + public IMAPModuleConfigurationPerformer(ClassPathConfigurationProvider classPathConfigurationProvider, + CamelCompositeProcessor camelCompositeProcessor, + JamesMailSpooler jamesMailSpooler, + JamesMailetContext mailetContext) { + this.classPathConfigurationProvider = classPathConfigurationProvider; + this.camelCompositeProcessor = camelCompositeProcessor; + this.jamesMailSpooler = jamesMailSpooler; + this.mailetContext = mailetContext; + } + + @Override + public void initModule() throws Exception { + camelCompositeProcessor.setLog(LOGGER); + camelCompositeProcessor.setCamelContext(new DefaultCamelContext()); + camelCompositeProcessor.configure(classPathConfigurationProvider.getConfiguration("mailetcontainer").configurationAt("processors")); + camelCompositeProcessor.init(); + jamesMailSpooler.setLog(LOGGER); + jamesMailSpooler.configure(classPathConfigurationProvider.getConfiguration("mailetcontainer").configurationAt("spooler")); + jamesMailSpooler.init(); + mailetContext.setLog(LOGGER); + mailetContext.configure(classPathConfigurationProvider.getConfiguration("mailetcontainer").configurationAt("context")); + } + } + +} Added: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/SieveModule.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/SieveModule.java?rev=1712338&view=auto ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/SieveModule.java (added) +++ james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/modules/server/SieveModule.java Tue Nov 3 16:50:17 2015 @@ -0,0 +1,37 @@ +/**************************************************************** + * 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.server; + +import org.apache.james.managesieve.api.SieveParser; +import org.apache.james.managesieve.jsieve.Parser; +import org.apache.james.sieverepository.api.SieveRepository; +import org.apache.james.sieverepository.file.SieveFileRepository; + +import com.google.inject.AbstractModule; + +public class SieveModule extends AbstractModule { + + @Override + protected void configure() { + bind(SieveParser.class).to(Parser.class); + bind(SieveRepository.class).to(SieveFileRepository.class); + } + +} Added: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceGenericLoader.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceGenericLoader.java?rev=1712338&view=auto ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceGenericLoader.java (added) +++ james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceGenericLoader.java Tue Nov 3 16:50:17 2015 @@ -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. * + ****************************************************************/ + +package org.apache.james.utils; + +import com.google.inject.Injector; + +public class GuiceGenericLoader<T> { + + private final Injector injector; + private final String defaultPackageName; + + public GuiceGenericLoader(Injector injector, String defaultPackageName) { + this.injector = injector; + this.defaultPackageName = defaultPackageName; + } + + public T instanciate(String className) throws Exception { + Class<T> clazz = (Class<T>) ClassLoader.getSystemClassLoader().loadClass(constructFullName(className)); + return injector.getInstance(clazz); + } + + private String constructFullName(String name) { + if (! name.contains(".")) { + return defaultPackageName + name; + } + return name; + } + +} Added: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMailetLoader.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMailetLoader.java?rev=1712338&view=auto ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMailetLoader.java (added) +++ james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMailetLoader.java Tue Nov 3 16:50:17 2015 @@ -0,0 +1,52 @@ +/**************************************************************** + * 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.utils; + +import com.google.inject.Inject; +import com.google.inject.Injector; +import org.apache.james.mailetcontainer.api.MailetLoader; +import org.apache.mailet.Mailet; +import org.apache.mailet.MailetConfig; + +import javax.mail.MessagingException; + +public class GuiceMailetLoader implements MailetLoader { + + private static final String STANDARD_PACKAGE = "org.apache.james.transport.mailets."; + + private final GuiceGenericLoader<Mailet> genericLoader; + + @Inject + public GuiceMailetLoader(Injector injector) { + this.genericLoader = new GuiceGenericLoader<>(injector, STANDARD_PACKAGE); + } + + @Override + public Mailet getMailet(MailetConfig config) throws MessagingException { + try { + Mailet result = genericLoader.instanciate(config.getMailetName()); + result.init(config); + return result; + } catch (Exception e) { + throw new MessagingException("Can not load mailet " + config.getMailetName(), e); + } + } + +} Added: james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMatcherLoader.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMatcherLoader.java?rev=1712338&view=auto ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMatcherLoader.java (added) +++ james/project/trunk/server/container/cassandra-guice/src/main/java/org/apache/james/utils/GuiceMatcherLoader.java Tue Nov 3 16:50:17 2015 @@ -0,0 +1,52 @@ +/**************************************************************** + * 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.utils; + +import com.google.inject.Inject; +import com.google.inject.Injector; +import org.apache.james.mailetcontainer.api.MatcherLoader; +import org.apache.mailet.Matcher; +import org.apache.mailet.MatcherConfig; + +import javax.mail.MessagingException; + +public class GuiceMatcherLoader implements MatcherLoader { + + private static final String STANDARD_PACKAGE = "org.apache.james.transport.matchers."; + + private final GuiceGenericLoader<Matcher> genericLoader; + + @Inject + public GuiceMatcherLoader(Injector injector) { + this.genericLoader = new GuiceGenericLoader<>(injector, STANDARD_PACKAGE); + } + + @Override + public Matcher getMatcher(MatcherConfig config) throws MessagingException { + try { + Matcher result = genericLoader.instanciate(config.getMatcherName()); + result.init(config); + return result; + } catch (Exception e) { + throw new MessagingException("Can not load matcher " + config.getMatcherName(), e); + } + } + +} Modified: james/project/trunk/server/container/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java?rev=1712338&r1=1712337&r2=1712338&view=diff ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java (original) +++ james/project/trunk/server/container/cassandra-guice/src/test/java/org/apache/james/CassandraJamesServerTest.java Tue Nov 3 16:50:17 2015 @@ -20,6 +20,7 @@ package org.apache.james; import static org.assertj.core.api.Assertions.assertThat; +import java.io.File; import java.io.IOException; import java.net.InetSocketAddress; import java.nio.ByteBuffer; @@ -28,6 +29,8 @@ import java.nio.charset.Charset; import org.apache.james.backends.cassandra.CassandraCluster; import org.apache.james.backends.cassandra.components.CassandraModule; +import org.apache.james.core.JamesServerResourceLoader; +import org.apache.james.filesystem.api.JamesDirectoriesProvider; import org.apache.james.mailbox.elasticsearch.EmbeddedElasticSearch; import org.apache.james.modules.TestElasticSearchModule; import org.junit.After; @@ -59,10 +62,30 @@ public class CassandraJamesServerTest { @Rule public RuleChain chain = RuleChain.outerRule(temporaryFolder).around(embeddedElasticSearch); + private static class TestFilesystemModule extends AbstractModule { + + JamesServerResourceLoader jamesServerResourceLoader; + + TestFilesystemModule(File tmpDir) { + jamesServerResourceLoader = new JamesServerResourceLoader() { + @Override + public String getRootDirectory() { + return tmpDir.getAbsolutePath(); + } + }; + } + + @Override + protected void configure() { + bind(JamesDirectoriesProvider.class).toInstance(jamesServerResourceLoader); + } + } + @Before public void setup() throws Exception { server = new CassandraJamesServer(Modules.override(CassandraJamesServerMain.defaultModule) - .with(new TestElasticSearchModule(embeddedElasticSearch), + .with(new TestElasticSearchModule(embeddedElasticSearch), + new TestFilesystemModule(temporaryFolder.newFolder()), new AbstractModule() { @Override @@ -78,6 +101,7 @@ public class CassandraJamesServerTest { })); socketChannel = SocketChannel.open(); + server.start(); } Added: james/project/trunk/server/container/cassandra-guice/src/test/resources/mailetcontainer.xml URL: http://svn.apache.org/viewvc/james/project/trunk/server/container/cassandra-guice/src/test/resources/mailetcontainer.xml?rev=1712338&view=auto ============================================================================== --- james/project/trunk/server/container/cassandra-guice/src/test/resources/mailetcontainer.xml (added) +++ james/project/trunk/server/container/cassandra-guice/src/test/resources/mailetcontainer.xml Tue Nov 3 16:50:17 2015 @@ -0,0 +1,165 @@ +<?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="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.managesieve.mailet.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> + + Modified: james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/system/hbase/TablePool.java URL: http://svn.apache.org/viewvc/james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/system/hbase/TablePool.java?rev=1712338&r1=1712337&r2=1712338&view=diff ============================================================================== --- james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/system/hbase/TablePool.java (original) +++ james/project/trunk/server/data/data-hbase/src/main/java/org/apache/james/system/hbase/TablePool.java Tue Nov 3 16:50:17 2015 @@ -28,7 +28,6 @@ import org.apache.hadoop.hbase.client.HB import org.apache.hadoop.hbase.client.HTableInterface; import org.apache.hadoop.hbase.client.HTablePool; import org.apache.james.domainlist.hbase.def.HDomainList; -import org.apache.james.rrt.api.RecipientRewriteTable; import org.apache.james.rrt.hbase.def.HRecipientRewriteTable; import org.apache.james.user.api.UsersRepository; import org.apache.james.user.hbase.def.HUsersRepository; --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org