james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [02/44] james-project git commit: JAMES-2267 Bcc stripper is a common mailet
Date Fri, 05 Jan 2018 03:00:46 GMT
JAMES-2267 Bcc stripper is a common mailet


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

Branch: refs/heads/master
Commit: 2e1435227ca00ed0f706e0cf7cafa915043ba77f
Parents: 3e6b057
Author: benwa <btellier@linagora.com>
Authored: Tue Dec 19 10:58:59 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Jan 5 09:13:50 2018 +0700

----------------------------------------------------------------------
 .../org/apache/james/mailets/BounceIntegrationTest.java   |  6 +-----
 .../mailets/GatewayRemoteDeliveryIntegrationTest.java     | 10 ++--------
 .../james/mailets/NetworkMatcherIntegrationTest.java      |  6 +-----
 .../org/apache/james/mailets/SmtpAuthIntegrationTest.java |  6 +-----
 .../james/mailets/configuration/CommonProcessors.java     |  6 +-----
 .../james/mailets/configuration/MailetConfiguration.java  |  8 ++++++++
 .../james/mailets/crypto/SMIMEDecryptIntegrationTest.java |  6 +-----
 .../james/mailets/crypto/SMIMESignIntegrationTest.java    |  6 +-----
 .../apache/james/smtp/SmtpAuthorizedAddressesTest.java    |  6 +-----
 .../org/apache/james/smtp/SmtpBracketEnforcementTest.java |  6 +-----
 .../apache/james/smtp/SmtpIdentityVerificationTest.java   |  6 +-----
 .../org/apache/james/smtp/SmtpSizeLimitationTest.java     |  6 +-----
 .../transport/mailets/AmqpForwardAttachmentTest.java      |  5 +----
 .../james/transport/mailets/ContactExtractorTest.java     |  5 +----
 .../apache/james/transport/mailets/GroupMappingTest.java  |  5 +----
 .../transport/mailets/ICSAttachmentWorkflowTest.java      |  5 +----
 .../james/transport/mailets/StripAttachmentTest.java      |  5 +----
 17 files changed, 25 insertions(+), 78 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
index 919fb35..1d0c2a9 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/BounceIntegrationTest.java
@@ -33,7 +33,6 @@ import org.apache.james.transport.mailets.LocalDelivery;
 import org.apache.james.transport.mailets.NotifyPostmaster;
 import org.apache.james.transport.mailets.NotifySender;
 import org.apache.james.transport.mailets.Redirect;
-import org.apache.james.transport.mailets.RemoveMimeHeader;
 import org.apache.james.transport.mailets.Resend;
 import org.apache.james.transport.mailets.ToProcessor;
 import org.apache.james.transport.matchers.All;
@@ -260,10 +259,7 @@ public class BounceIntegrationTest {
         // Other recipients will be bouncing
         return ProcessorConfiguration.builder()
             .state("transport")
-            .addMailet(MailetConfiguration.builder()
-                .matcher(All.class)
-                .mailet(RemoveMimeHeader.class)
-                .addProperty("name", "bcc"))
+            .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(RecipientIsLocal.class)
                 .mailet(VacationMailet.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/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 9df8289..0f07481 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
@@ -410,10 +410,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
         return ProcessorConfiguration.builder()
             .state("transport")
             .enableJmx(true)
-            .addMailet(MailetConfiguration.builder()
-                .matcher(All.class)
-                .mailet(RemoveMimeHeader.class)
-                .addProperty("name", "bcc"))
+            .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(RecipientIsLocal.class)
                 .mailet(LocalDelivery.class))
@@ -435,10 +432,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
         return ProcessorConfiguration.builder()
             .state("transport")
             .enableJmx(true)
-            .addMailet(MailetConfiguration.builder()
-                .matcher(All.class)
-                .mailet(RemoveMimeHeader.class)
-                .addProperty("name", "bcc"))
+            .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
                 .mailet(RemoteDelivery.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
index e5750bb..d9fb2fd 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/NetworkMatcherIntegrationTest.java
@@ -28,7 +28,6 @@ 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.RemoveMimeHeader;
 import org.apache.james.transport.mailets.ToProcessor;
 import org.apache.james.transport.mailets.ToRepository;
 import org.apache.james.transport.matchers.All;
@@ -97,10 +96,7 @@ public class NetworkMatcherIntegrationTest {
     private ProcessorConfiguration deliverOnlyTransport() {
         return ProcessorConfiguration.builder()
             .state("transport")
-            .addMailet(MailetConfiguration.builder()
-                .matcher(All.class)
-                .mailet(RemoveMimeHeader.class)
-                .addProperty("name", "bcc"))
+            .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
                 .mailet(LocalDelivery.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
index 19393a7..012334c 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SmtpAuthIntegrationTest.java
@@ -28,7 +28,6 @@ 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.RemoveMimeHeader;
 import org.apache.james.transport.mailets.ToProcessor;
 import org.apache.james.transport.mailets.ToRepository;
 import org.apache.james.transport.matchers.All;
@@ -108,10 +107,7 @@ public class SmtpAuthIntegrationTest {
         return ProcessorConfiguration.builder()
             .state("transport")
             .enableJmx(true)
-            .addMailet(MailetConfiguration.builder()
-                .matcher(All.class)
-                .mailet(RemoveMimeHeader.class)
-                .addProperty("name", "bcc"))
+            .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
                 .mailet(LocalDelivery.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
index 9f52fc3..0af0d61 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/CommonProcessors.java
@@ -29,7 +29,6 @@ import org.apache.james.transport.mailets.Null;
 import org.apache.james.transport.mailets.PostmasterAlias;
 import org.apache.james.transport.mailets.RecipientRewriteTable;
 import org.apache.james.transport.mailets.RemoteDelivery;
-import org.apache.james.transport.mailets.RemoveMimeHeader;
 import org.apache.james.transport.mailets.SetMailAttribute;
 import org.apache.james.transport.mailets.SetMimeHeader;
 import org.apache.james.transport.mailets.Sieve;
@@ -125,10 +124,7 @@ public class CommonProcessors {
                         .mailet(SetMimeHeader.class)
                         .addProperty("name", "X-WasSigned")
                         .addProperty("value", "true"))
-                .addMailet(MailetConfiguration.builder()
-                        .matcher(All.class)
-                        .mailet(RemoveMimeHeader.class)
-                        .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                         .matcher(All.class)
                         .mailet(RecipientRewriteTable.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfiguration.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfiguration.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfiguration.java
index ae91bc4..ead2e08 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfiguration.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/configuration/MailetConfiguration.java
@@ -23,6 +23,8 @@ package org.apache.james.mailets.configuration;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.james.transport.mailets.RemoveMimeHeader;
+import org.apache.james.transport.matchers.All;
 import org.apache.mailet.Mailet;
 import org.apache.mailet.Matcher;
 
@@ -75,6 +77,12 @@ public class MailetConfiguration implements SerializableAsXml {
         }
     }
 
+    public static final MailetConfiguration BCC_STRIPPER = MailetConfiguration.builder()
+        .matcher(All.class)
+        .mailet(RemoveMimeHeader.class)
+        .addProperty("name", "bcc")
+        .build();
+
     private final Class<? extends Matcher> matcher;
     private final Optional<String> matcherCondition;
     private final Class<? extends Mailet> mailet;

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/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 05e6318..9b4a13c 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
@@ -34,7 +34,6 @@ import org.apache.james.mailets.configuration.MailetContainer;
 import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.modules.MailboxProbeImpl;
 import org.apache.james.transport.mailets.LocalDelivery;
-import org.apache.james.transport.mailets.RemoveMimeHeader;
 import org.apache.james.transport.mailets.SMIMEDecrypt;
 import org.apache.james.transport.matchers.All;
 import org.apache.james.transport.matchers.RecipientIsLocal;
@@ -80,10 +79,7 @@ public class SMIMEDecryptIntegrationTest {
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
                 .enableJmx(true)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .mailet(SMIMEDecrypt.class)
                     .matcher(All.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/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 2d86d4d..1fad706 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
@@ -35,7 +35,6 @@ 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.RemoveMimeHeader;
 import org.apache.james.transport.mailets.SMIMESign;
 import org.apache.james.transport.mailets.SetMimeHeader;
 import org.apache.james.transport.mailets.ToProcessor;
@@ -97,10 +96,7 @@ public class SMIMESignIntegrationTest {
                     .mailet(SetMimeHeader.class)
                     .addProperty("name", "X-WasSigned")
                     .addProperty("value", "true"))
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RecipientRewriteTable.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
index 052df4d..d0cdcaa 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpAuthorizedAddressesTest.java
@@ -37,7 +37,6 @@ import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.mailets.LocalDelivery;
 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;
@@ -121,10 +120,7 @@ public class SmtpAuthorizedAddressesTest {
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
                 .enableJmx(true)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
                     .mailet(LocalDelivery.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
index 4507903..51e33e8 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpBracketEnforcementTest.java
@@ -28,7 +28,6 @@ import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.mailets.LocalDelivery;
-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;
@@ -84,10 +83,7 @@ public class SmtpBracketEnforcementTest {
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
                 .enableJmx(true)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
                     .mailet(LocalDelivery.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
index 61ebd81..9317282 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpIdentityVerificationTest.java
@@ -28,7 +28,6 @@ import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.mailets.LocalDelivery;
-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;
@@ -86,10 +85,7 @@ public class SmtpIdentityVerificationTest {
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
                 .enableJmx(true)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
                     .mailet(LocalDelivery.class)))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
index c477575..73a4426 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/smtp/SmtpSizeLimitationTest.java
@@ -28,7 +28,6 @@ import org.apache.james.mailets.configuration.ProcessorConfiguration;
 import org.apache.james.mailets.configuration.SmtpConfiguration;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.mailets.LocalDelivery;
-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;
@@ -85,10 +84,7 @@ public class SmtpSizeLimitationTest {
             .addProcessor(ProcessorConfiguration.builder()
                 .state("transport")
                 .enableJmx(true)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(RecipientIsLocal.class)
                     .mailet(LocalDelivery.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
index 15d5daf..054ec81 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/AmqpForwardAttachmentTest.java
@@ -95,10 +95,7 @@ public class AmqpForwardAttachmentTest {
             .addProcessor(ProcessorConfiguration.builder()
                     .state("transport")
                     .enableJmx(true)
-                    .addMailet(MailetConfiguration.builder()
-                            .matcher(All.class)
-                            .mailet(RemoveMimeHeader.class)
-                            .addProperty("name", "bcc"))
+                    .addMailet(MailetConfiguration.BCC_STRIPPER)
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(StripAttachment.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
index c348e06..8429a6e 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ContactExtractorTest.java
@@ -96,10 +96,7 @@ public class ContactExtractorTest {
                         .addProperty(AmqpForwardAttribute.URI_PARAMETER_NAME, amqpRule.getAmqpUri())
                         .addProperty(AmqpForwardAttribute.EXCHANGE_PARAMETER_NAME, EXCHANGE)
                         .addProperty(AmqpForwardAttribute.ATTRIBUTE_PARAMETER_NAME, attribute))
-                    .addMailet(MailetConfiguration.builder()
-                        .matcher(All.class)
-                        .mailet(RemoveMimeHeader.class)
-                        .addProperty("name", "bcc"))
+                    .addMailet(MailetConfiguration.BCC_STRIPPER)
                     .addMailet(MailetConfiguration.builder()
                         .matcher(RecipientIsLocal.class)
                         .mailet(VacationMailet.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/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 8f78d83..ae536f9 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
@@ -131,10 +131,7 @@ public class GroupMappingTest {
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.transport()
                 .enableJmx(true)
-                .addMailet(MailetConfiguration.builder()
-                    .matcher(All.class)
-                    .mailet(RemoveMimeHeader.class)
-                    .addProperty("name", "bcc"))
+                .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(All.class)
                     .mailet(RecipientRewriteTable.class))

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
index 00d7051..cdafabc 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/ICSAttachmentWorkflowTest.java
@@ -461,10 +461,7 @@ public class ICSAttachmentWorkflowTest {
             .addProcessor(ProcessorConfiguration.builder()
                     .state("transport")
                     .enableJmx(true)
-                    .addMailet(MailetConfiguration.builder()
-                            .matcher(All.class)
-                            .mailet(RemoveMimeHeader.class)
-                            .addProperty("name", "bcc"))
+                    .addMailet(MailetConfiguration.BCC_STRIPPER)
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(StripAttachment.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/2e143522/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
index 76f2a0a..bc13e9a 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/transport/mailets/StripAttachmentTest.java
@@ -79,10 +79,7 @@ public class StripAttachmentTest {
             .addProcessor(ProcessorConfiguration.builder()
                     .state("transport")
                     .enableJmx(true)
-                    .addMailet(MailetConfiguration.builder()
-                            .matcher(All.class)
-                            .mailet(RemoveMimeHeader.class)
-                            .addProperty("name", "bcc"))
+                    .addMailet(MailetConfiguration.BCC_STRIPPER)
                     .addMailet(MailetConfiguration.builder()
                             .matcher(All.class)
                             .mailet(StripAttachment.class)


---------------------------------------------------------------------
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