All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.james.imap.scripts.Uid.test Maven / Gradle / Ivy

There is a newer version: 0.2-M1
Show newest version
################################################################
# 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.                                           #
################################################################
#Delete the first message, so that UIDs don't match MSNs
C: a STORE 1 +FLAGS (\Deleted)
S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\)\)
S: a OK STORE completed.
C: a EXPUNGE
S: \* 1 EXPUNGE
S: \* 3 RECENT
S: a OK EXPUNGE completed.

#Regular fetch
C: a FETCH 1:3 (UID)
S: \* 1 FETCH \(UID 2\)
S: \* 2 FETCH \(UID 3\)
S: \* 3 FETCH \(UID 4\)
S: a OK FETCH completed.

#UID fetch
C: a UID FETCH 1:3 (INTERNALDATE)
S: \* 1 FETCH \(INTERNALDATE "[^"]*" UID 2\)
S: \* 2 FETCH \(INTERNALDATE ".*" UID 3\)
S: a OK FETCH completed.

#UID store
C: a1 UID STORE 2:3 +FLAGS (\Deleted)
S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 2\)
S: \* 2 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 3\)
S: a1 OK STORE completed.

# Regular fetch
C: a2 FETCH 1:100 (FLAGS UID)
S: \* 1 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 2\)
S: \* 2 FETCH \(FLAGS \(\\Deleted \\Recent\) UID 3\)
S: \* 3 FETCH \(FLAGS \(\\Recent\) UID 4\)
S: a2 OK FETCH completed.

# CREATE and do a UID COPY
C: a3 CREATE copied
S: a3 OK CREATE completed.

C: a4 UID COPY 2 copied
S: a4 OK COPY completed.

C: a STATUS copied (MESSAGES)
S: \* STATUS "copied" \(MESSAGES 1\)
S: a OK STATUS completed.

C: A003 STORE 1:4 +FLAGS.SILENT (\FLAGGED)
S: A003 OK STORE completed.

# Do a UID SEARCH
C: a UID SEARCH FLAGGED
S: \* SEARCH 2 3 4
S: a OK SEARCH completed.

# Cleanup
C: a1 DELETE copied
S: a1 OK DELETE completed.







© 2015 - 2024 Weber Informatics LLC | Privacy Policy