james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [12/44] james-project git commit: JAMES-2267 Simplify some mailet configuration
Date Fri, 05 Jan 2018 02:56:31 GMT
JAMES-2267 Simplify some mailet configuration

Some mailets were not needed


Project: http://git-wip-us.apache.org/repos/asf/james-project/repo
Commit: http://git-wip-us.apache.org/repos/asf/james-project/commit/e0251a0f
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/e0251a0f
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/e0251a0f

Branch: refs/heads/improve-mailet-testing-experience-v1
Commit: e0251a0f173e55b06ce0741622460510b27678c0
Parents: 91e8871
Author: benwa <btellier@linagora.com>
Authored: Tue Dec 19 14:01:57 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Jan 5 09:33:18 2018 +0700

----------------------------------------------------------------------
 .../GatewayRemoteDeliveryIntegrationTest.java   | 10 -------
 .../crypto/SMIMEDecryptIntegrationTest.java     |  2 --
 .../crypto/SMIMESignIntegrationTest.java        | 29 +-------------------
 .../transport/mailets/GroupMappingTest.java     |  8 ------
 4 files changed, 1 insertion(+), 48 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/e0251a0f/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
index a2ae2e9..9c396d9 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/GatewayRemoteDeliveryIntegrationTest.java
@@ -40,14 +40,11 @@ import org.apache.james.mailets.configuration.MailetContainer;
 import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.mailets.LocalDelivery;
-import org.apache.james.transport.mailets.Null;
-import org.apache.james.transport.mailets.PostmasterAlias;
 import org.apache.james.transport.mailets.RemoteDelivery;
 import org.apache.james.transport.mailets.RemoveMimeHeader;
 import org.apache.james.transport.mailets.ToProcessor;
 import org.apache.james.transport.matchers.All;
 import org.apache.james.transport.matchers.RecipientIsLocal;
-import org.apache.james.transport.matchers.RelayLimit;
 import org.apache.james.util.docker.Images;
 import org.apache.james.util.docker.SwarmGenericContainer;
 import org.apache.james.utils.DataProbeImpl;
@@ -371,13 +368,6 @@ public class GatewayRemoteDeliveryIntegrationTest {
             .enableJmx(true)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
-                .mailet(PostmasterAlias.class))
-            .addMailet(MailetConfiguration.builder()
-                .matcher(RelayLimit.class)
-                .matcherCondition("30")
-                .mailet(Null.class))
-            .addMailet(MailetConfiguration.builder()
-                .matcher(All.class)
                 .mailet(ToProcessor.class)
                 .addProperty("processor", "transport"))
             .build();

http://git-wip-us.apache.org/repos/asf/james-project/blob/e0251a0f/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
index c2894bd..ef7cd83 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMEDecryptIntegrationTest.java
@@ -52,8 +52,6 @@ import com.jayway.awaitility.Duration;
 import com.jayway.awaitility.core.ConditionFactory;
 
 public class SMIMEDecryptIntegrationTest {
-
-
     private static final ZonedDateTime DATE_2015 = ZonedDateTime.parse("2015-10-15T14:10:00Z");
     private static final String LOCALHOST_IP = "127.0.0.1";
     private static final int IMAP_PORT = 1143;

http://git-wip-us.apache.org/repos/asf/james-project/blob/e0251a0f/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
index 90d01a4..391dfe0 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/crypto/SMIMESignIntegrationTest.java
@@ -33,15 +33,10 @@ import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.modules.MailboxProbeImpl;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.mailets.LocalDelivery;
-import org.apache.james.transport.mailets.RecipientRewriteTable;
-import org.apache.james.transport.mailets.RemoteDelivery;
 import org.apache.james.transport.mailets.SMIMESign;
 import org.apache.james.transport.mailets.SetMimeHeader;
-import org.apache.james.transport.mailets.ToProcessor;
-import org.apache.james.transport.matchers.All;
 import org.apache.james.transport.matchers.HasMailAttribute;
 import org.apache.james.transport.matchers.RecipientIsLocal;
-import org.apache.james.transport.matchers.SMTPAuthSuccessful;
 import org.apache.james.transport.matchers.SenderIsLocal;
 import org.apache.james.util.date.ZonedDateTimeProvider;
 import org.apache.james.utils.DataProbeImpl;
@@ -83,11 +78,6 @@ public class SMIMESignIntegrationTest {
             .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
-                    .matcher(SMTPAuthSuccessful.class)
-                    .mailet(SetMimeHeader.class)
-                    .addProperty("name", "X-UserIsAuth")
-                    .addProperty("value", "true"))
-                .addMailet(MailetConfiguration.builder()
                     .matcher(HasMailAttribute.class)
                     .matcherCondition("org.apache.james.SMIMECheckSignature")
                     .mailet(SetMimeHeader.class)
@@ -95,9 +85,6 @@ public class SMIMESignIntegrationTest {
                     .addProperty("value", "true"))
                 .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RecipientRewriteTable.class))
-                .addMailet(MailetConfiguration.builder()
                     .mailet(SMIMESign.class)
                     .matcher(SenderIsLocal.class)
                     .addProperty("keyStoreFileName", temporaryFolder.getRoot().getAbsoluteFile().getAbsolutePath()
+ "/conf/smime.p12")
@@ -106,21 +93,7 @@ public class SMIMESignIntegrationTest {
                     .addProperty("debug", "true"))
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
-                    .mailet(LocalDelivery.class))
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(SMTPAuthSuccessful.class)
-                    .mailet(RemoteDelivery.class)
-                    .addProperty("outgoingQueue", "outgoing")
-                    .addProperty("delayTime", "5000, 100000, 500000")
-                    .addProperty("maxRetries", "25")
-                    .addProperty("maxDnsProblemRetries", "0")
-                    .addProperty("deliveryThreads", "10")
-                    .addProperty("sendpartial", "true")
-                    .addProperty("bounceProcessor", "bounces"))
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(ToProcessor.class)
-                    .addProperty("processor", "relay-denied")))
+                    .mailet(LocalDelivery.class)))
             .addProcessor(CommonProcessors.spam())
             .addProcessor(CommonProcessors.localAddressError())
             .addProcessor(CommonProcessors.relayDenied())

http://git-wip-us.apache.org/repos/asf/james-project/blob/e0251a0f/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
index 8419cd3..a2be7f2 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/GroupMappingTest.java
@@ -43,7 +43,6 @@ import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.matchers.All;
 import org.apache.james.transport.matchers.RecipientIsLocal;
 import org.apache.james.transport.matchers.RelayLimit;
-import org.apache.james.transport.matchers.SMTPAuthSuccessful;
 import org.apache.james.util.docker.Images;
 import org.apache.james.util.docker.SwarmGenericContainer;
 import org.apache.james.utils.DataProbeImpl;
@@ -111,17 +110,10 @@ public class GroupMappingTest {
             .addProcessor(ProcessorConfiguration.root()
                 .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(PostmasterAlias.class))
-                .addMailet(MailetConfiguration.builder()
                     .matcher(RelayLimit.class)
                     .matcherCondition("30")
                     .mailet(Null.class))
                 .addMailet(MailetConfiguration.builder()
-                    .matcher(SMTPAuthSuccessful.class)
-                    .mailet(ToProcessor.class)
-                    .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT))
-                .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(ToProcessor.class)
                     .addProperty("processor", ProcessorConfiguration.STATE_TRANSPORT)))


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


Mime
View raw message