james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From btell...@apache.org
Subject [35/44] james-project git commit: JAMES-2267 INBOX creation is generally not needed
Date Fri, 05 Jan 2018 03:01:19 GMT
JAMES-2267 INBOX creation is generally 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/8f082d3c
Tree: http://git-wip-us.apache.org/repos/asf/james-project/tree/8f082d3c
Diff: http://git-wip-us.apache.org/repos/asf/james-project/diff/8f082d3c

Branch: refs/heads/master
Commit: 8f082d3ce8ecaef43f3cff49d546810dc65f5c65
Parents: c096920
Author: benwa <btellier@linagora.com>
Authored: Thu Dec 21 09:28:44 2017 +0700
Committer: benwa <btellier@linagora.com>
Committed: Fri Jan 5 09:33:52 2018 +0700

----------------------------------------------------------------------
 .../GatewayRemoteDeliveryIntegrationTest.java   | 11 ++------
 .../RecipientRewriteTableIntegrationTest.java   | 29 ++++++++------------
 .../james/mailets/SmtpAuthIntegrationTest.java  |  2 --
 .../crypto/SMIMEDecryptIntegrationTest.java     |  5 ----
 .../crypto/SMIMESignIntegrationTest.java        |  4 ---
 .../mailets/AmqpForwardAttachmentTest.java      |  3 --
 .../mailets/ICSAttachmentWorkflowTest.java      |  3 --
 .../transport/mailets/StripAttachmentTest.java  |  3 --
 8 files changed, 13 insertions(+), 47 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/8f082d3c/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 f6bf420..afb5546 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
@@ -46,7 +46,6 @@ 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.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;
@@ -261,10 +260,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
                 .addProcessor(root())
                 .addProcessor(CommonProcessors.error())
                 .addProcessor(ProcessorConfiguration.transport()
-                    .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))
@@ -358,10 +354,7 @@ public class GatewayRemoteDeliveryIntegrationTest {
 
     private ProcessorConfiguration relayOnlyTransport(String gatewayProperty) {
         return ProcessorConfiguration.transport()
-            .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/8f082d3c/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
----------------------------------------------------------------------
diff --git a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
index c07852a..01fb9bd 100644
--- a/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
+++ b/server/mailet/integration-testing/src/test/java/org/apache/james/mailets/RecipientRewriteTableIntegrationTest.java
@@ -26,8 +26,6 @@ import static org.apache.james.mailets.configuration.Constants.PASSWORD;
 import static org.apache.james.mailets.configuration.Constants.SMTP_PORT;
 import static org.apache.james.mailets.configuration.Constants.awaitOneMinute;
 
-import org.apache.james.mailbox.model.MailboxConstants;
-import org.apache.james.modules.MailboxProbeImpl;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.utils.DataProbeImpl;
 import org.apache.james.utils.IMAPMessageReader;
@@ -76,8 +74,8 @@ public class RecipientRewriteTableIntegrationTest {
     @Test
     public void rrtServiceShouldDeliverEmailToMappingRecipients() throws Exception {
         dataProbe.addUser(FROM, PASSWORD);
-        createUserInbox(ANY_AT_JAMES);
-        createUserInbox(OTHER_AT_JAMES);
+        dataProbe.addUser(ANY_AT_JAMES, PASSWORD);
+        dataProbe.addUser(OTHER_AT_JAMES, PASSWORD);
 
         dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, ANY_AT_JAMES);
         dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, OTHER_AT_JAMES);
@@ -99,9 +97,9 @@ public class RecipientRewriteTableIntegrationTest {
     @Test
     public void rrtServiceShouldNotDeliverEmailToRecipientWhenHaveMappingRecipients() throws
Exception {
         dataProbe.addUser(FROM, PASSWORD);
-        createUserInbox(RECIPIENT);
-        createUserInbox(ANY_AT_JAMES);
-        createUserInbox(OTHER_AT_JAMES);
+        dataProbe.addUser(RECIPIENT, PASSWORD);
+        dataProbe.addUser(ANY_AT_JAMES, PASSWORD);
+        dataProbe.addUser(OTHER_AT_JAMES, PASSWORD);
 
         dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, ANY_AT_JAMES);
         dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, OTHER_AT_JAMES);
@@ -121,8 +119,8 @@ public class RecipientRewriteTableIntegrationTest {
         String nonDomainUser = "nondomain";
         String localUser = nonDomainUser + "@" + dataProbe.getDefaultDomain();
         dataProbe.addUser(FROM, PASSWORD);
-        createUserInbox(localUser);
-        createUserInbox(OTHER_AT_JAMES);
+        dataProbe.addUser(localUser, PASSWORD);
+        dataProbe.addUser(OTHER_AT_JAMES, PASSWORD);
 
         dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, nonDomainUser);
         dataProbe.addAddressMapping("touser", DEFAULT_DOMAIN, OTHER_AT_JAMES);
@@ -144,8 +142,8 @@ public class RecipientRewriteTableIntegrationTest {
     @Test
     public void messageShouldRedirectToTheSameUserWhenDomainMapping() throws Exception {
         dataProbe.addDomainAliasMapping(DEFAULT_DOMAIN, JAMES_ANOTHER_DOMAIN);
-        createUserInbox(ANY_AT_JAMES);
-        createUserInbox(ANY_AT_ANOTHER_DOMAIN);
+        dataProbe.addUser(ANY_AT_JAMES, PASSWORD);
+        dataProbe.addUser(ANY_AT_ANOTHER_DOMAIN, PASSWORD);
 
         messageSender.connect(LOCALHOST_IP, SMTP_PORT)
             .sendMessage(FROM, ANY_AT_JAMES)
@@ -160,8 +158,8 @@ public class RecipientRewriteTableIntegrationTest {
     @Test
     public void messageShouldNotSendToRecipientWhenDomainMapping() throws Exception {
         dataProbe.addDomainAliasMapping(DEFAULT_DOMAIN, JAMES_ANOTHER_DOMAIN);
-        createUserInbox(ANY_AT_JAMES);
-        createUserInbox(ANY_AT_ANOTHER_DOMAIN);
+        dataProbe.addUser(ANY_AT_JAMES, PASSWORD);
+        dataProbe.addUser(ANY_AT_ANOTHER_DOMAIN, PASSWORD);
 
         messageSender.connect(LOCALHOST_IP, SMTP_PORT)
             .sendMessage(FROM, ANY_AT_JAMES)
@@ -173,9 +171,4 @@ public class RecipientRewriteTableIntegrationTest {
         awaitOneMinute.until(imapMessageReader::userDoesNotReceiveMessage);
     }
 
-    private void createUserInbox(String username) throws Exception {
-        dataProbe.addUser(username, PASSWORD);
-        jamesServer.getProbe(MailboxProbeImpl.class).createMailbox(MailboxConstants.USER_NAMESPACE,
username, "INBOX");
-    }
-
 }

http://git-wip-us.apache.org/repos/asf/james-project/blob/8f082d3c/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 6f6f9db..bd0ebca 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
@@ -95,7 +95,6 @@ public class SmtpAuthIntegrationTest {
 
     private ProcessorConfiguration deliverOnlyTransport() {
         return ProcessorConfiguration.transport()
-            .enableJmx(true)
             .addMailet(MailetConfiguration.BCC_STRIPPER)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
@@ -105,7 +104,6 @@ public class SmtpAuthIntegrationTest {
 
     private ProcessorConfiguration bounces() {
         return ProcessorConfiguration.bounces()
-            .enableJmx(true)
             .addMailet(MailetConfiguration.builder()
                 .matcher(All.class)
                 .mailet(ToRepository.class)

http://git-wip-us.apache.org/repos/asf/james-project/blob/8f082d3c/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 e267fc3..9e2bb06 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
@@ -30,13 +30,11 @@ import java.time.ZonedDateTime;
 
 import org.apache.commons.io.IOUtils;
 import org.apache.james.MemoryJamesServerMain;
-import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 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.SMIMEDecrypt;
 import org.apache.james.transport.matchers.All;
@@ -72,7 +70,6 @@ public class SMIMEDecryptIntegrationTest {
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.transport()
-                .enableJmx(true)
                 .addMailet(MailetConfiguration.BCC_STRIPPER)
                 .addMailet(MailetConfiguration.builder()
                     .mailet(SMIMEDecrypt.class)
@@ -95,8 +92,6 @@ public class SMIMEDecryptIntegrationTest {
         DataProbeImpl serverProbe = jamesServer.getProbe(DataProbeImpl.class);
         serverProbe.addDomain(DEFAULT_DOMAIN);
         serverProbe.addUser(FROM, PASSWORD);
-        MailboxProbeImpl mailboxProbe = jamesServer.getProbe(MailboxProbeImpl.class);
-        mailboxProbe.createMailbox(MailboxConstants.USER_NAMESPACE, FROM, "INBOX");
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/james-project/blob/8f082d3c/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 4c67734..4d6ec0b 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
@@ -29,13 +29,11 @@ import static org.assertj.core.api.Assertions.assertThat;
 import java.time.ZonedDateTime;
 
 import org.apache.james.MemoryJamesServerMain;
-import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.MailetContainer;
 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.SMIMESign;
@@ -75,7 +73,6 @@ public class SMIMESignIntegrationTest {
             .addProcessor(CommonProcessors.root())
             .addProcessor(CommonProcessors.error())
             .addProcessor(ProcessorConfiguration.transport()
-                .enableJmx(true)
                 .addMailet(MailetConfiguration.builder()
                     .matcher(HasMailAttribute.class)
                     .matcherCondition("org.apache.james.SMIMECheckSignature")
@@ -110,7 +107,6 @@ public class SMIMESignIntegrationTest {
         dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(FROM, PASSWORD);
         dataProbe.addUser(RECIPIENT, PASSWORD);
-        jamesServer.getProbe(MailboxProbeImpl.class).createMailbox(MailboxConstants.USER_NAMESPACE,
RECIPIENT, "INBOX");
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/james-project/blob/8f082d3c/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 c3fb08d..18e8c0e 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
@@ -30,13 +30,11 @@ import static org.assertj.core.api.Assertions.assertThat;
 import java.nio.charset.StandardCharsets;
 
 import org.apache.james.MemoryJamesServerMain;
-import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.MailetContainer;
 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.amqp.AmqpRule;
 import org.apache.james.transport.matchers.All;
@@ -116,7 +114,6 @@ public class AmqpForwardAttachmentTest {
         DataProbe dataprobe = jamesServer.getProbe(DataProbeImpl.class);
         dataprobe.addDomain(DEFAULT_DOMAIN);
         dataprobe.addUser(RECIPIENT, PASSWORD);
-        jamesServer.getProbe(MailboxProbeImpl.class).createMailbox(MailboxConstants.USER_NAMESPACE,
RECIPIENT, "INBOX");
     }
 
     @After

http://git-wip-us.apache.org/repos/asf/james-project/blob/8f082d3c/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 9930c29..3532f4b 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
@@ -34,13 +34,11 @@ import javax.mail.internet.MimeMessage;
 
 import org.apache.james.MemoryJamesServerMain;
 import org.apache.james.jmap.mailet.TextCalendarBodyToAttachment;
-import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.MailetContainer;
 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.amqp.AmqpRule;
 import org.apache.james.transport.matchers.All;
@@ -501,7 +499,6 @@ public class ICSAttachmentWorkflowTest {
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
         dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
-        jamesServer.getProbe(MailboxProbeImpl.class).createMailbox(MailboxConstants.USER_NAMESPACE,
RECIPIENT, "INBOX");
 
         messageWithoutICSAttached = MimeMessageBuilder.mimeMessageBuilder()
             .setMultipartWithBodyParts(

http://git-wip-us.apache.org/repos/asf/james-project/blob/8f082d3c/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 b88a6a7..4929ca8 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
@@ -30,13 +30,11 @@ import static org.assertj.core.api.Assertions.assertThat;
 import javax.mail.internet.MimeMessage;
 
 import org.apache.james.MemoryJamesServerMain;
-import org.apache.james.mailbox.model.MailboxConstants;
 import org.apache.james.mailets.TemporaryJamesServer;
 import org.apache.james.mailets.configuration.CommonProcessors;
 import org.apache.james.mailets.configuration.MailetConfiguration;
 import org.apache.james.mailets.configuration.MailetContainer;
 import org.apache.james.mailets.configuration.ProcessorConfiguration;
-import org.apache.james.modules.MailboxProbeImpl;
 import org.apache.james.probe.DataProbe;
 import org.apache.james.transport.matchers.All;
 import org.apache.james.transport.matchers.RecipientIsLocal;
@@ -97,7 +95,6 @@ public class StripAttachmentTest {
         DataProbe dataProbe = jamesServer.getProbe(DataProbeImpl.class);
         dataProbe.addDomain(DEFAULT_DOMAIN);
         dataProbe.addUser(RECIPIENT, PASSWORD);
-        jamesServer.getProbe(MailboxProbeImpl.class).createMailbox(MailboxConstants.USER_NAMESPACE,
RECIPIENT, "INBOX");
     }
 
     @After


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