You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by bt...@apache.org on 2017/02/28 09:40:30 UTC

[5/5] james-project git commit: MAILBOX-288 Remove all MIME4J limits on storing emails in StoreMessageManager

MAILBOX-288 Remove all MIME4J limits on storing emails in StoreMessageManager


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

Branch: refs/heads/master
Commit: 490c628a3da250ff007c21bbde434ae53f57d1c9
Parents: a6bbd98
Author: benwa <bt...@linagora.com>
Authored: Mon Feb 27 15:10:38 2017 +0700
Committer: benwa <bt...@linagora.com>
Committed: Tue Feb 28 16:39:07 2017 +0700

----------------------------------------------------------------------
 .../apache/james/mailbox/store/StoreMessageManager.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/james-project/blob/490c628a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
----------------------------------------------------------------------
diff --git a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
index 71d1eb4..1fb527b 100644
--- a/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
+++ b/mailbox/store/src/main/java/org/apache/james/mailbox/store/StoreMessageManager.java
@@ -112,6 +112,14 @@ import com.google.common.collect.ImmutableList;
  */
 public class StoreMessageManager implements org.apache.james.mailbox.MessageManager {
 
+    private static final MimeConfig MIME_ENTITY_CONFIG = MimeConfig.custom()
+        .setMaxContentLen(-1)
+        .setMaxHeaderCount(-1)
+        .setMaxHeaderLen(-1)
+        .setMaxHeaderCount(-1)
+        .setMaxLineLen(-1)
+        .build();
+
     /**
      * The minimal Permanent flags the {@link MessageManager} must support. <br>
      * 
@@ -303,7 +311,7 @@ public class StoreMessageManager implements org.apache.james.mailbox.MessageMana
             // Disable line length... This should be handled by the smtp server
             // component and not the parser itself
             // https://issues.apache.org/jira/browse/IMAP-122
-            MimeConfig config = MimeConfig.custom().setMaxLineLen(-1).setMaxHeaderLen(-1).build();
+            MimeConfig config = MIME_ENTITY_CONFIG;
 
             final MimeTokenStream parser = new MimeTokenStream(config, new DefaultBodyDescriptorBuilder());
 


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