You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@james.apache.org by rc...@apache.org on 2022/04/26 07:31:52 UTC

[james-project] branch master updated (41ebb52521 -> 7d9c72f12d)

This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git


    from 41ebb52521 [PERF] Avoid execution of MailboxAnnotationListener
     new 4c9717eaf7 JAMES-3751 Tests for RFC-5182 (referencing the last IMAP search)
     new 952461752c JAMES-3751 Tests for RFC-4731 (min, max, count aggregations for IMAP SEARCH)
     new 37760c69a1 JAMES-3751 IMAP SEARCH was ignoring MODSEQ for last range
     new b6e76070fd JAMES-3751 IMAP Test for ESEARCH tag ALL
     new 7d9c72f12d JAMES-3751 Relax modseq conditions

The 5 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../apache/james/mpt/imapmailbox/suite/Search.java |  16 +++
 .../imap/scripts/SearchOptionAggregations.test     | 147 +++++++++++++++++++++
 .../scripts/{Recent.test => SearchOptionSave.test} |  34 ++---
 3 files changed, 182 insertions(+), 15 deletions(-)
 create mode 100644 mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
 copy mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/{Recent.test => SearchOptionSave.test} (76%)


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


[james-project] 05/05: JAMES-3751 Relax modseq conditions

Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 7d9c72f12de9465612cdfd9bfc2c9b70305184e5
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Mon Apr 18 14:42:14 2022 +0700

    JAMES-3751 Relax modseq conditions
---
 .../org/apache/james/imap/scripts/SearchOptionAggregations.test       | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
index 6266373439..68ea2df83c 100644
--- a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
@@ -113,8 +113,8 @@ S: \* ESEARCH \(TAG "c"\) MIN 1
 S: c OK SEARCH completed.
 
 C: d SEARCH RETURN (MIN) MODSEQ 8
-S: \* OK \[HIGHESTMODSEQ 8\] Highest
-S: \* ESEARCH \(TAG "d"\) MIN 4 MODSEQ 8
+S: \* OK \[HIGHESTMODSEQ .*\] Highest
+S: \* ESEARCH \(TAG "d"\) MIN .* MODSEQ .*
 S: d OK SEARCH completed.
 
 C: e SEARCH RETURN (MAX) FLAGGED


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


[james-project] 01/05: JAMES-3751 Tests for RFC-5182 (referencing the last IMAP search)

Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 4c9717eaf733512b073463d3b2a7de559531a590
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Apr 17 10:59:10 2022 +0700

    JAMES-3751 Tests for RFC-5182 (referencing the last IMAP search)
---
 .../apache/james/mpt/imapmailbox/suite/Search.java |  8 +++
 .../james/imap/scripts/SearchOptionSave.test       | 57 ++++++++++++++++++++++
 2 files changed, 65 insertions(+)

diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
index df1dc87ca2..a1f827d9fc 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
@@ -55,6 +55,14 @@ public abstract class Search implements ImapTestConstants {
             .run("SearchAtoms");
     }
 
+    @Test
+    public void testSearchOptionSaveUS() throws Exception {
+        Assume.assumeTrue(system.supports(ImapFeatures.Feature.MOD_SEQ_SEARCH));
+        simpleScriptedTestProtocol
+            .withLocale(Locale.US)
+            .run("SearchOptionSave");
+    }
+
     @Test
     public void testSearchAtomsITALY() throws Exception {
         Assume.assumeTrue(system.supports(ImapFeatures.Feature.MOD_SEQ_SEARCH));
diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionSave.test b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionSave.test
new file mode 100644
index 0000000000..ed13f9951c
--- /dev/null
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionSave.test
@@ -0,0 +1,57 @@
+################################################################
+# 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.                                           #
+################################################################
+
+# https://datatracker.ietf.org/doc/html/rfc5182
+
+C: A2 CREATE testmailbox
+S: A2 OK CREATE completed\.
+
+C: A3 SELECT testmailbox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY (.)*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( \\\*)?\)\](.)*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: A3 OK \[READ-WRITE\] SELECT completed\.
+
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: b STORE 1:* +FLAGS.SILENT (\FLAGGED)
+S: b OK STORE completed.
+
+C: c SEARCH RETURN (SAVE) FLAGGED
+S: \* SEARCH 1
+S: c OK SEARCH completed.
+
+C: c FETCH $ FLAGS
+S: \* 1 FETCH .*
+S: c OK FETCH completed.
+


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


[james-project] 04/05: JAMES-3751 IMAP Test for ESEARCH tag ALL

Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit b6e76070fd739656a0509ec742618ae0ba9cdc36
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Apr 17 11:52:21 2022 +0700

    JAMES-3751 IMAP Test for ESEARCH tag ALL
---
 .../org/apache/james/imap/scripts/SearchOptionAggregations.test     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
index 42fa51fe72..6266373439 100644
--- a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
@@ -140,4 +140,8 @@ S: \* 2 FETCH .*
 S: \* 4 FETCH .*
 S: \* 5 FETCH .*
 }
-S: i OK FETCH completed.
\ No newline at end of file
+S: i OK FETCH completed.
+
+C: h SEARCH RETURN (ALL) FLAGGED
+S: \* ESEARCH \(TAG "h"\) ALL 1:2,4:5
+S: h OK SEARCH completed.
\ No newline at end of file


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


[james-project] 03/05: JAMES-3751 IMAP SEARCH was ignoring MODSEQ for last range

Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 37760c69a19383c0675bb0ddac1647cf9a72e07b
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Apr 17 11:28:11 2022 +0700

    JAMES-3751 IMAP SEARCH was ignoring MODSEQ for last range
---
 .../apache/james/imap/scripts/SearchOptionAggregations.test    | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
index e112cb9885..42fa51fe72 100644
--- a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
@@ -112,17 +112,9 @@ C: c SEARCH RETURN (MIN) FLAGGED
 S: \* ESEARCH \(TAG "c"\) MIN 1
 S: c OK SEARCH completed.
 
-# https://datatracker.ietf.org/doc/html/rfc4731#section-3.2
-# When the server supports both the ESEARCH and the CONDSTORE
-# [CONDSTORE] extension, and the client requests one or more result
-# option described in section 3.1 together with the MODSEQ search
-# criterion in the same SEARCH/UID SEARCH command, then the server MUST
-# return the ESEARCH response containing the MODSEQ result option
-# (described in the following paragraph)
 C: d SEARCH RETURN (MIN) MODSEQ 8
 S: \* OK \[HIGHESTMODSEQ 8\] Highest
-S: \* ESEARCH \(TAG "d"\) MIN 4
-# S: \* ESEARCH (TAG "d") MIN 4 MODSEQ 8
+S: \* ESEARCH \(TAG "d"\) MIN 4 MODSEQ 8
 S: d OK SEARCH completed.
 
 C: e SEARCH RETURN (MAX) FLAGGED


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


[james-project] 02/05: JAMES-3751 Tests for RFC-4731 (min, max, count aggregations for IMAP SEARCH)

Posted by rc...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rcordier pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/james-project.git

commit 952461752c19168823423a4450a4a91e8b6a24c3
Author: Benoit Tellier <bt...@linagora.com>
AuthorDate: Sun Apr 17 11:26:20 2022 +0700

    JAMES-3751 Tests for RFC-4731 (min, max, count aggregations for IMAP SEARCH)
---
 .../apache/james/mpt/imapmailbox/suite/Search.java |   8 ++
 .../imap/scripts/SearchOptionAggregations.test     | 151 +++++++++++++++++++++
 2 files changed, 159 insertions(+)

diff --git a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
index a1f827d9fc..e62f07ef32 100644
--- a/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
+++ b/mpt/impl/imap-mailbox/core/src/main/java/org/apache/james/mpt/imapmailbox/suite/Search.java
@@ -63,6 +63,14 @@ public abstract class Search implements ImapTestConstants {
             .run("SearchOptionSave");
     }
 
+    @Test
+    public void testSearchOptionAggregationsUS() throws Exception {
+        Assume.assumeTrue(system.supports(ImapFeatures.Feature.MOD_SEQ_SEARCH));
+        simpleScriptedTestProtocol
+            .withLocale(Locale.US)
+            .run("SearchOptionAggregations");
+    }
+
     @Test
     public void testSearchAtomsITALY() throws Exception {
         Assume.assumeTrue(system.supports(ImapFeatures.Feature.MOD_SEQ_SEARCH));
diff --git a/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
new file mode 100644
index 0000000000..e112cb9885
--- /dev/null
+++ b/mpt/impl/imap-mailbox/core/src/main/resources/org/apache/james/imap/scripts/SearchOptionAggregations.test
@@ -0,0 +1,151 @@
+################################################################
+# 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.                                           #
+################################################################
+
+# https://datatracker.ietf.org/doc/html/rfc4731
+
+C: A2 CREATE testmailbox
+S: A2 OK CREATE completed\.
+
+C: A3 SELECT testmailbox
+S: \* FLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\Seen\)
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY (.)*
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Deleted \\Draft \\Flagged \\\Seen( \\\*)?\)\](.)*
+S: \* OK \[HIGHESTMODSEQ \d+\].*
+S: \* OK \[UIDNEXT 1\].*
+S: A3 OK \[READ-WRITE\] SELECT completed\.
+
+# Append 6 messages
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 1 EXISTS
+S: \* 1 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 2 EXISTS
+S: \* 2 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 3 EXISTS
+S: \* 3 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 4 EXISTS
+S: \* 4 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 5 EXISTS
+S: \* 5 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <ti...@example.org>
+C: To: Samual Smith <sa...@example.org>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Simple Email
+C:
+C: This is a very simple email.
+C:
+S: \* 6 EXISTS
+S: \* 6 RECENT
+S: A4 OK (\[.+\] )?APPEND completed\.
+
+C: b STORE 1:2,4:5 +FLAGS.SILENT (\FLAGGED)
+S: b OK STORE completed.
+
+C: c SEARCH RETURN (MIN) FLAGGED
+S: \* ESEARCH \(TAG "c"\) MIN 1
+S: c OK SEARCH completed.
+
+# https://datatracker.ietf.org/doc/html/rfc4731#section-3.2
+# When the server supports both the ESEARCH and the CONDSTORE
+# [CONDSTORE] extension, and the client requests one or more result
+# option described in section 3.1 together with the MODSEQ search
+# criterion in the same SEARCH/UID SEARCH command, then the server MUST
+# return the ESEARCH response containing the MODSEQ result option
+# (described in the following paragraph)
+C: d SEARCH RETURN (MIN) MODSEQ 8
+S: \* OK \[HIGHESTMODSEQ 8\] Highest
+S: \* ESEARCH \(TAG "d"\) MIN 4
+# S: \* ESEARCH (TAG "d") MIN 4 MODSEQ 8
+S: d OK SEARCH completed.
+
+C: e SEARCH RETURN (MAX) FLAGGED
+S: \* ESEARCH \(TAG "e"\) MAX 5
+S: e OK SEARCH completed.
+
+C: f SEARCH RETURN (COUNT) FLAGGED
+S: \* ESEARCH \(TAG "f"\) COUNT 4
+S: f OK SEARCH completed.
+
+C: g SEARCH RETURN (MIN MAX COUNT) FLAGGED
+S: \* ESEARCH \(TAG "g"\) MIN 1 MAX 5 COUNT 4
+S: g OK SEARCH completed.
+
+C: h SEARCH RETURN (MIN MAX COUNT SAVE) FLAGGED
+S: \* ESEARCH \(TAG "h"\) MIN 1 MAX 5 COUNT 4
+S: h OK SEARCH completed.
+
+C: i FETCH $ FLAGS
+SUB {
+S: \* 1 FETCH .*
+S: \* 2 FETCH .*
+S: \* 4 FETCH .*
+S: \* 5 FETCH .*
+}
+S: i OK FETCH completed.
\ No newline at end of file


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