JAMES-2441 JSPF module should be loaded in SMTP module
Project: http://git-wip-us.apache.org/repos/asf/james-project/repo Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/dc2c3ea7 Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/dc2c3ea7 Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/dc2c3ea7 Branch: refs/heads/master Commit: dc2c3ea7c556f24224858b0d7dfe15d84f3d6c35 Parents: 12682d5 Author: benwa <[email protected]> Authored: Fri Jun 29 10:30:38 2018 +0700 Committer: benwa <[email protected]> Committed: Mon Jul 2 11:48:53 2018 +0700 ---------------------------------------------------------------------- .../james/modules/protocols/JSPFModule.java | 45 -------------------- .../james/modules/protocols/JSPFModule.java | 45 ++++++++++++++++++++ .../modules/protocols/SMTPServerModule.java | 2 + 3 files changed, 47 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/james-project/blob/dc2c3ea7/server/container/guice/guice-common/src/main/java/org/apache/james/modules/protocols/JSPFModule.java ---------------------------------------------------------------------- diff --git a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/protocols/JSPFModule.java b/server/container/guice/guice-common/src/main/java/org/apache/james/modules/protocols/JSPFModule.java deleted file mode 100644 index 9673770..0000000 --- a/server/container/guice/guice-common/src/main/java/org/apache/james/modules/protocols/JSPFModule.java +++ /dev/null @@ -1,45 +0,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. * - ****************************************************************/ - -package org.apache.james.modules.protocols; - -import org.apache.james.jspf.impl.DNSServiceXBillImpl; -import org.apache.james.smtpserver.fastfail.SPFHandler; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import com.google.inject.AbstractModule; -import com.google.inject.Provides; -import com.google.inject.Singleton; - -public class JSPFModule extends AbstractModule { - - private static final Logger LOGGER = LoggerFactory.getLogger(JSPFModule.class); - - @Override - protected void configure() { - - } - - @Singleton - @Provides - public DNSServiceXBillImpl provideJSPFDNSService() { - return new DNSServiceXBillImpl(new SPFHandler.SPFLogger(LOGGER)); - } -} http://git-wip-us.apache.org/repos/asf/james-project/blob/dc2c3ea7/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/JSPFModule.java ---------------------------------------------------------------------- diff --git a/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/JSPFModule.java b/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/JSPFModule.java new file mode 100644 index 0000000..9673770 --- /dev/null +++ b/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/JSPFModule.java @@ -0,0 +1,45 @@ +/**************************************************************** + * 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.protocols; + +import org.apache.james.jspf.impl.DNSServiceXBillImpl; +import org.apache.james.smtpserver.fastfail.SPFHandler; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.google.inject.AbstractModule; +import com.google.inject.Provides; +import com.google.inject.Singleton; + +public class JSPFModule extends AbstractModule { + + private static final Logger LOGGER = LoggerFactory.getLogger(JSPFModule.class); + + @Override + protected void configure() { + + } + + @Singleton + @Provides + public DNSServiceXBillImpl provideJSPFDNSService() { + return new DNSServiceXBillImpl(new SPFHandler.SPFLogger(LOGGER)); + } +} http://git-wip-us.apache.org/repos/asf/james-project/blob/dc2c3ea7/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java ---------------------------------------------------------------------- diff --git a/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java b/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java index 8f9299d..2e88204 100644 --- a/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java +++ b/server/container/guice/protocols/smtp/src/main/java/org/apache/james/modules/protocols/SMTPServerModule.java @@ -37,6 +37,8 @@ public class SMTPServerModule extends AbstractModule { @Override protected void configure() { + install(new JSPFModule()); + Multibinder.newSetBinder(binder(), ConfigurationPerformer.class).addBinding().to(SMTPModuleConfigurationPerformer.class); } --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
