Author: rdonkin
Date: Sat Feb 23 01:59:46 2008
New Revision: 630419

URL: http://svn.apache.org/viewvc?rev=630419&view=rev
Log:
FETCH HEADER.FIELDS test script.

Added:
    
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchHeaderFields.test
    
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-hello-world.mail
    
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-multiple-addresses.mail
    
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-sender.mail
    
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/wild-example.mail
Modified:
    
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
    
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/ScriptBuilder.java

Modified: 
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java?rev=630419&r1=630418&r2=630419&view=diff
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
 (original)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/CreateScript.java
 Sat Feb 23 01:59:46 2008
@@ -23,9 +23,39 @@
 
     public static final void main(String[] args) throws Exception {
         ScriptBuilder builder = ScriptBuilder.open("localhost", 143);
-        recent(builder);
+        simpleCombinedFetches(builder);
     }
     
+    public static void simpleCombinedFetches(ScriptBuilder builder) throws 
Exception {
+        builder.login();
+        builder.create();
+        builder.select();
+        builder.append();
+        builder.setFile("wild-example.mail");
+        builder.append();
+        builder.setFile("multipart-alt.mail");
+        builder.append();
+        builder.setFile("multipart-mixed.mail");
+        builder.append();
+        builder.setFile("multipart-mixed-complex.mail");
+        builder.append();
+        builder.setFile("rfc822-hello-world.mail");
+        builder.append();
+        builder.setFile("rfc822-sender.mail");
+        builder.append();
+        builder.setFile("rfc822.mail");
+        builder.append();
+        builder.setFile("rfc822-multiple-addresses.mail");
+        builder.append();
+        builder.select();
+        builder.getFetch().bodyPeekCompleteMessage();
+        builder.fetchAllMessages();
+        builder.resetFetch();
+        
builder.getFetch().bodyPeekHeaders(ScriptBuilder.Fetch.COMPREHENSIVE_HEADERS);
+        builder.fetchAllMessages();
+        builder.select();
+        builder.quit();
+    }
     
     public static void recent(ScriptBuilder builder) throws Exception {
         builder.login();

Modified: 
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/ScriptBuilder.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/ScriptBuilder.java?rev=630419&r1=630418&r2=630419&view=diff
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/ScriptBuilder.java
 (original)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/java/org/apache/james/test/functional/ScriptBuilder.java
 Sat Feb 23 01:59:46 2008
@@ -52,6 +52,7 @@
     private String basedir = "/org/apache/james/test/functional/";
     private boolean createdMailbox = false;
     private final Client client;
+    private Fetch fetch = new Fetch();
     
     
     public ScriptBuilder(final Client client) {
@@ -88,6 +89,18 @@
         return new IgnoreHeaderInputStream(result);
     }
     
+    public final Fetch getFetch() {
+        return fetch;
+    }
+
+    public final void setFetch(Fetch fetch) {
+        this.fetch = fetch;
+    }
+    
+    public final void resetFetch() {
+        this.fetch = new Fetch();
+    }
+    
     public final int getMessageNumber() {
         return messageNumber;
     }
@@ -157,7 +170,16 @@
         command(command);
     }
     
-
+    public void fetchAllMessages() throws Exception {
+        final String command = fetch.command();
+        command(command);
+    }
+    
+    public void fetch() throws Exception {
+        final String command = fetch.command(messageNumber);
+        command(command);
+    }
+    
     public void fetchFlags() throws Exception {
         final String command = "FETCH " + messageNumber + " (FLAGS)";
         command(command);
@@ -204,6 +226,118 @@
         delete();
         logout();
         close();
+    }
+    
+    public static final class Fetch {
+        
+        public static final String[] COMPREHENSIVE_HEADERS = {"DATE", "FROM", 
"TO", "CC", "SUBJECT", 
+            "REFERENCES", "IN-REPLY-TO", "MESSAGE-ID", "MIME-VERSION", 
"CONTENT-TYPE", 
+            "X-MAILING-LIST", "X-LOOP", "LIST-ID", "LIST-POST", 
"MAILING-LIST", "ORIGINATOR", "X-LIST", 
+            "SENDER", "RETURN-PATH", "X-BEENTHERE"};
+        
+        private boolean flagsFetch = false;
+        private boolean rfc822Size = false;
+        private boolean internalDate = false;
+        private String bodyPeek = null;
+        
+        public String command(int messageNumber) {
+            return "FETCH " + messageNumber + "(" + fetchData() + ")";
+        }
+        
+        public String command() {
+            return "FETCH 1:* (" + fetchData() + ")";
+        }
+        
+        public final boolean isFlagsFetch() {
+            return flagsFetch;
+        }
+
+        public final void setFlagsFetch(boolean flagsFetch) {
+            this.flagsFetch = flagsFetch;
+        }
+        
+        public final boolean isRfc822Size() {
+            return rfc822Size;
+        }
+
+        public final void setRfc822Size(boolean rfc822Size) {
+            this.rfc822Size = rfc822Size;
+        }
+        
+        public final boolean isInternalDate() {
+            return internalDate;
+        }
+
+        public final void setInternalDate(boolean internalDate) {
+            this.internalDate = internalDate;
+        }
+        
+        public final String getBodyPeek() {
+            return bodyPeek;
+        }
+
+        public final void setBodyPeek(String bodyPeek) {
+            this.bodyPeek = bodyPeek;
+        }
+
+        public void bodyPeekCompleteMessage() {
+            setBodyPeek(buildBody(true, ""));
+        }
+        
+        public void bodyPeekHeaders(String[] fields) {
+            setBodyPeek(buildBody(true, buildHeaderFields(fields)));
+        }
+        
+        public String buildBody(boolean peek, String section) {
+            String result;
+            if (peek) {
+                result  = "BODY.PEEK[";
+            } else {
+                result = "BODY[";
+            }
+            result = result + section + "]";
+            return result;
+        }
+        
+        public String buildHeaderFields(String[] fields) {
+            String result = "HEADER.FIELDS (";
+            for (int i = 0; i < fields.length; i++) {
+                if (i>0) {
+                    result = result + " ";
+                }
+                result = result + fields[i];
+            }
+            result = result + ")";
+            return result;
+        }
+        
+        public String fetchData() {
+            final StringBuffer buffer = new StringBuffer();
+            boolean first = true;
+            if (flagsFetch) {
+                first = add(buffer, first, "FLAGS");
+            }
+            if (rfc822Size) {
+                first = add(buffer, first, "RFC822.SIZE");
+            }
+            if (internalDate) {
+                first = add(buffer, first, "INTERNALDATE");
+            }
+            add(buffer, first, bodyPeek);
+            return buffer.toString();
+        }
+
+        private boolean add(final StringBuffer buffer, boolean first, String 
atom) {
+            if (atom != null) {
+                if (first) {
+                    first = false;
+                } else {
+                    buffer.append(" ");
+                }
+                buffer.append(atom);
+            }
+            return first;
+        }
     }
     
     public static final class Client {

Added: 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchHeaderFields.test
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchHeaderFields.test?rev=630419&view=auto
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchHeaderFields.test
 (added)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/imap/scripts/FetchHeaderFields.test
 Sat Feb 23 01:59:46 2008
@@ -0,0 +1,593 @@
+################################################################
+# 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.                                           #
+################################################################
+
+C: A2 CREATE testmailbox
+S: A2 OK Create completed\.
+C: A3 SELECT testmailbox
+S: \* FLAGS \(\\Answered \\Flagged \\Deleted \\Seen \\Draft\)
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Flagged \\Deleted \\Seen \\Draft 
\\\*\)\] Flags permitted\.
+S: \* 0 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UIDVALIDITY 1203759267\] UIDs valid
+S: \* OK \[UIDNEXT 1\] Predicted next UID
+S: A3 OK \[READ-WRITE\] Select completed\.
+C: A4 APPEND testmailbox {185+}
+C: From: Timothy Tayler <[EMAIL PROTECTED]>
+C: To: Samual Smith <[EMAIL PROTECTED]>
+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: A5 APPEND testmailbox {704+}
+C: Received: by 10.114.81.13 with HTTP; Sat, 2 Feb 2008 05:14:19 -0800 (PST)
+C: Message-ID: <[EMAIL PROTECTED]>
+C: Date: Sat, 2 Feb 2008 13:14:19 +0000
+C: From: "Robert Burrell Donkin" <[EMAIL PROTECTED]>
+C: To: "James Developers List" <[email protected]>
+C: Subject: JCR -> trunk ...?
+C: MIME-Version: 1.0
+C: Content-Type: text/plain; charset=ISO-8859-1
+C: Content-Transfer-Encoding: 7bit
+C: Content-Disposition: inline
+C: Delivered-To: [EMAIL PROTECTED]
+C: 
+C: i'd like to copy james-jcr into trunk and add some example
+C: configurations. development can continue in the sandbox (or not) and
+C: merged in later (if necessary).
+C: 
+C: any objections?
+C: 
+C: - robert
+S: \* 2 EXISTS
+S: \* 2 RECENT
+S: A5 OK Append completed\.
+C: A6 APPEND testmailbox {668+}
+C: From: Timothy Tayler <[EMAIL PROTECTED]>
+C: To: Samual Smith <[EMAIL PROTECTED]>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Multipart Email
+C: Content-Type: multipart/alternative;boundary=1729
+C: 
+C: Start with a preamble
+C: 
+C: --1729
+C: Content-Type: applcation/xhtml+xml
+C: 
+C: <!DOCTYPE html
+C: PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+C: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+C: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+C: 
+C: --1729
+C: Content-Type: text/plain; charset=US-ASCII
+C: 
+C: Rhubarb!
+C: 
+C: --1729
+C: Content-Type: text/html; charset=US-ASCII
+C: 
+C: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+C: 
+C: --1729--
+C: 
+S: \* 3 EXISTS
+S: \* 3 RECENT
+S: A6 OK Append completed\.
+C: A7 APPEND testmailbox {765+}
+C: From: Timothy Tayler <[EMAIL PROTECTED]>
+C: To: Samual Smith <[EMAIL PROTECTED]>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Multipart Email
+C: Content-Type: multipart/mixed;boundary=1729
+C: 
+C: Start with a preamble
+C: 
+C: --1729
+C: Content-Type: text/plain; charset=US-ASCII
+C: 
+C: Rhubarb!
+C: 
+C: --1729
+C: Content-Type: text/html; charset=US-ASCII
+C: 
+C: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+C: 
+C: --1729
+C: Content-Type: application/xhtml+xml
+C: 
+C: <!DOCTYPE html
+C: PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+C: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+C: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+C: 
+C: --1729
+C: Content-Type: image/jpeg
+C: Content-Transfer-Encoding: base64
+C: 
+C: 1234567890ABCDEFGHIJKLMNOPQ
+C: 
+C: --1729--
+C: 
+S: \* 4 EXISTS
+S: \* 4 RECENT
+S: A7 OK Append completed\.
+C: A8 APPEND testmailbox {1767+}
+C: From: Timothy Tayler <[EMAIL PROTECTED]>
+C: To: Samual Smith <[EMAIL PROTECTED]>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Multipart Email
+C: Content-Type: multipart/mixed;boundary=1729
+C: 
+C: Start with a preamble
+C: 
+C: --1729
+C: Content-Type: text/plain; charset=US-ASCII
+C: 
+C: Rhubarb!
+C: 
+C: --1729
+C: Content-Type: application/octet-stream
+C: Content-Transfer-Encoding: base64
+C: 
+C: 987654321AHPLA
+C: 
+C: --1729
+C: Content-Type: message/rfc822
+C: 
+C: From: Timothy Tayler <[EMAIL PROTECTED]>
+C: To: Samual Smith <[EMAIL PROTECTED]>
+C: Date: Thu, 14 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: A Multipart Alternative Email
+C: Content-Type: multipart/alternative;boundary=42
+C: 
+C: This message has a premable
+C: 
+C: --42
+C: Content-Type: text/plain; charset=US-ASCII
+C: 
+C: Custard!
+C: 
+C: --42
+C: Content-Type: application/octet-stream
+C: 
+C: CUSTARDCUSTARDCUSTARD
+C: 
+C: --42--
+C: 
+C: --1729
+C: Content-Type: multipart/mixed; boundary=4.66920160910299
+C: 
+C: --4.66920160910299
+C: Content-Type: image/gif
+C: Content-Transfer-Encoding: base64
+C: MIME-Version: 1.0
+C: Content-ID: 238478934723847238947892374
+C: Content-Description: Bogus Image Data
+C: 
+C: ABCDFEGHIJKLMNO
+C: 
+C: --4.66920160910299
+C: Content-Type: message/rfc822
+C: 
+C: From: Timothy Tayler <[EMAIL PROTECTED]>
+C: To: John Smith <[EMAIL PROTECTED]>
+C: Date: Sat, 16 Feb 2008 12:00:00 +0000 (GMT)
+C: Subject: Another Example Email
+C: Content-Type: multipart/mixed;boundary=2.50290787509
+C: 
+C: Yet another preamble
+C: 
+C: --2.50290787509
+C: Content-Type: text/plain
+C: 
+C: Rhubard AND Custard!
+C: 
+C: --2.50290787509
+C: Content-Type: multipart/alternative;boundary=3.243F6A8885A308D3
+C: 
+C: --3.243F6A8885A308D3
+C: Content-Type: text/plain
+C: 
+C: Rhubard?Custard?
+C: 
+C: --3.243F6A8885A308D3
+C: 
+C: Content-Type: text/richtext
+C: 
+C: Rhubard?Custard?
+C: 
+C: --3.243F6A8885A308D3--
+C: 
+C: --2.50290787509--
+C: 
+C: --4.66920160910299--
+C: --1729--
+C: 
+S: \* 5 EXISTS
+S: \* 5 RECENT
+S: A8 OK Append completed\.
+C: A9 APPEND testmailbox {185+}
+C: From: John Smith <[EMAIL PROTECTED]>
+C: To: Timothy Taylor <[EMAIL PROTECTED]>
+C: Subject: Hello
+C: Date: Sat, 23 Feb 2008 07:48:03 -0600
+C: Message-ID: <[EMAIL PROTECTED]>
+C: 
+C: Hello, World!
+S: \* 6 EXISTS
+S: \* 6 RECENT
+S: A9 OK Append completed\.
+C: A10 APPEND testmailbox {227+}
+C: From: John Smith <[EMAIL PROTECTED]>
+C: Sender: Samual Smith <[EMAIL PROTECTED]>
+C: To: Timothy Taylor <[EMAIL PROTECTED]>
+C: Subject: Hello
+C: Date: Sat, 23 Feb 2008 07:48:03 -0600
+C: Message-ID: <[EMAIL PROTECTED]>
+C: 
+C: Hello, World!
+S: \* 7 EXISTS
+S: \* 7 RECENT
+S: A10 OK Append completed\.
+C: A11 APPEND testmailbox {185+}
+C: From: Timothy Tayler <[EMAIL PROTECTED]>
+C: To: Samual Smith <[EMAIL PROTECTED]>
+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: \* 8 EXISTS
+S: \* 8 RECENT
+S: A11 OK Append completed\.
+C: A12 APPEND testmailbox {318+}
+C: From: "Brian G. Hutton" <[EMAIL PROTECTED]>
+C: To: Timothy Taylor <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Huh? <[EMAIL 
PROTECTED]>
+C: CC: <[EMAIL PROTECTED]>, "David \"The Thin White Duke\" Bowie" <[EMAIL 
PROTECTED]>
+C: Subject: Rhubarb
+C: Date: Sat, 23 Feb 2008 07:48:03 -0600
+C: Message-ID: <[EMAIL PROTECTED]>
+C: 
+C: Rhubarb!
+S: \* 9 EXISTS
+S: \* 9 RECENT
+S: A12 OK Append completed\.
+C: A13 SELECT testmailbox
+S: \* FLAGS \(\\Answered \\Flagged \\Deleted \\Seen \\Draft\)
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Flagged \\Deleted \\Seen \\Draft 
\\\*\)\] Flags permitted\.
+S: \* 9 EXISTS
+S: \* 1 RECENT
+S: \* OK \[UNSEEN 1\] First unseen\.
+S: \* OK \[UIDVALIDITY 1203759267\] UIDs valid
+S: \* OK \[UIDNEXT 10\] Predicted next UID
+S: A13 OK \[READ-WRITE\] Select completed\.
+C: A14 FETCH 1:* (BODY.PEEK[])
+S: \* 1 FETCH \(BODY\[\] \{185\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Simple Email
+S: 
+S: This is a very simple email\.
+S: \)
+S: \* 2 FETCH \(BODY\[\] \{704\}
+S: Received: by 10\.114\.81\.13 with HTTP; Sat, 2 Feb 2008 05:14:19 -0800 
\(PST\)
+S: Message-ID: <[EMAIL PROTECTED]>
+S: Date: Sat, 2 Feb 2008 13:14:19 \+0000
+S: From: "Robert Burrell Donkin" <[EMAIL PROTECTED]>
+S: To: "James Developers List" <[EMAIL PROTECTED]>
+S: Subject: JCR -> trunk \.\.\.\?
+S: MIME-Version: 1\.0
+S: Content-Type: text/plain; charset=ISO-8859-1
+S: Content-Transfer-Encoding: 7bit
+S: Content-Disposition: inline
+S: Delivered-To: [EMAIL PROTECTED]
+S: 
+S: i'd like to copy james-jcr into trunk and add some example
+S: configurations\. development can continue in the sandbox \(or not\) and
+S: merged in later \(if necessary\)\.
+S: 
+S: any objections\?
+S: 
+S: - robert\)
+S: \* 3 FETCH \(BODY\[\] \{668\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Multipart Email
+S: Content-Type: multipart/alternative;boundary=1729
+S: 
+S: Start with a preamble
+S: 
+S: --1729
+S: Content-Type: applcation/xhtml\+xml
+S: 
+S: <!DOCTYPE html
+S: PUBLIC "-//W3C//DTD XHTML 1\.0 Strict//EN"
+S: "http://www\.w3\.org/TR/xhtml1/DTD/xhtml1-strict\.dtd";>
+S: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+S: 
+S: --1729
+S: Content-Type: text/plain; charset=US-ASCII
+S: 
+S: Rhubarb!
+S: 
+S: --1729
+S: Content-Type: text/html; charset=US-ASCII
+S: 
+S: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+S: 
+S: --1729--
+S: \)
+S: \* 4 FETCH \(BODY\[\] \{765\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Multipart Email
+S: Content-Type: multipart/mixed;boundary=1729
+S: 
+S: Start with a preamble
+S: 
+S: --1729
+S: Content-Type: text/plain; charset=US-ASCII
+S: 
+S: Rhubarb!
+S: 
+S: --1729
+S: Content-Type: text/html; charset=US-ASCII
+S: 
+S: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+S: 
+S: --1729
+S: Content-Type: application/xhtml\+xml
+S: 
+S: <!DOCTYPE html
+S: PUBLIC "-//W3C//DTD XHTML 1\.0 Strict//EN"
+S: "http://www\.w3\.org/TR/xhtml1/DTD/xhtml1-strict\.dtd";>
+S: <html><head><title>Rhubarb</title></head><body>Rhubarb!</body></html>
+S: 
+S: --1729
+S: Content-Type: image/jpeg
+S: Content-Transfer-Encoding: base64
+S: 
+S: 1234567890ABCDEFGHIJKLMNOPQ
+S: 
+S: --1729--
+S: \)
+S: \* 5 FETCH \(BODY\[\] \{1767\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Multipart Email
+S: Content-Type: multipart/mixed;boundary=1729
+S: 
+S: Start with a preamble
+S: 
+S: --1729
+S: Content-Type: text/plain; charset=US-ASCII
+S: 
+S: Rhubarb!
+S: 
+S: --1729
+S: Content-Type: application/octet-stream
+S: Content-Transfer-Encoding: base64
+S: 
+S: 987654321AHPLA
+S: 
+S: --1729
+S: Content-Type: message/rfc822
+S: 
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Multipart Alternative Email
+S: Content-Type: multipart/alternative;boundary=42
+S: 
+S: This message has a premable
+S: 
+S: --42
+S: Content-Type: text/plain; charset=US-ASCII
+S: 
+S: Custard!
+S: 
+S: --42
+S: Content-Type: application/octet-stream
+S: 
+S: CUSTARDCUSTARDCUSTARD
+S: 
+S: --42--
+S: 
+S: --1729
+S: Content-Type: multipart/mixed; boundary=4\.66920160910299
+S: 
+S: --4\.66920160910299
+S: Content-Type: image/gif
+S: Content-Transfer-Encoding: base64
+S: MIME-Version: 1\.0
+S: Content-ID: 238478934723847238947892374
+S: Content-Description: Bogus Image Data
+S: 
+S: ABCDFEGHIJKLMNO
+S: 
+S: --4\.66920160910299
+S: Content-Type: message/rfc822
+S: 
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: John Smith <[EMAIL PROTECTED]>
+S: Date: Sat, 16 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: Another Example Email
+S: Content-Type: multipart/mixed;boundary=2\.50290787509
+S: 
+S: Yet another preamble
+S: 
+S: --2\.50290787509
+S: Content-Type: text/plain
+S: 
+S: Rhubard AND Custard!
+S: 
+S: --2\.50290787509
+S: Content-Type: multipart/alternative;boundary=3\.243F6A8885A308D3
+S: 
+S: --3\.243F6A8885A308D3
+S: Content-Type: text/plain
+S: 
+S: Rhubard\?Custard\?
+S: 
+S: --3\.243F6A8885A308D3
+S: 
+S: Content-Type: text/richtext
+S: 
+S: Rhubard\?Custard\?
+S: 
+S: --3\.243F6A8885A308D3--
+S: 
+S: --2\.50290787509--
+S: 
+S: --4\.66920160910299--
+S: --1729--
+S: \)
+S: \* 6 FETCH \(BODY\[\] \{185\}
+S: From: John Smith <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>
+S: Subject: Hello
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S: 
+S: Hello, World!\)
+S: \* 7 FETCH \(BODY\[\] \{227\}
+S: From: John Smith <[EMAIL PROTECTED]>
+S: Sender: Samual Smith <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>
+S: Subject: Hello
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S: 
+S: Hello, World!\)
+S: \* 8 FETCH \(BODY\[\] \{185\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Simple Email
+S: 
+S: This is a very simple email\.
+S: \)
+S: \* 9 FETCH \(BODY\[\] \{318\}
+S: From: "Brian G\. Hutton" <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Huh\? <[EMAIL 
PROTECTED]>
+S: CC: <[EMAIL PROTECTED]>, "David \\"The Thin White Duke\\" Bowie" <[EMAIL 
PROTECTED]>
+S: Subject: Rhubarb
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S: 
+S: Rhubarb!\)
+S: A14 OK Fetch completed\.
+C: A15 FETCH 1:* (BODY.PEEK[HEADER.FIELDS (DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE)])
+S: \* 1 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{155\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Simple Email
+S: 
+S: \)
+S: \* 2 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{330\}
+S: Message-ID: <[EMAIL PROTECTED]>
+S: Date: Sat, 2 Feb 2008 13:14:19 \+0000
+S: From: "Robert Burrell Donkin" <[EMAIL PROTECTED]>
+S: To: "James Developers List" <[EMAIL PROTECTED]>
+S: Subject: JCR -> trunk \.\.\.\?
+S: MIME-Version: 1\.0
+S: Content-Type: text/plain; charset=ISO-8859-1
+S: 
+S: \)
+S: \* 3 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{209\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Multipart Email
+S: Content-Type: multipart/alternative;boundary=1729
+S: 
+S: \)
+S: \* 4 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{203\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Multipart Email
+S: Content-Type: multipart/mixed;boundary=1729
+S: 
+S: \)
+S: \* 5 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{203\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Multipart Email
+S: Content-Type: multipart/mixed;boundary=1729
+S: 
+S: \)
+S: \* 6 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{172\}
+S: From: John Smith <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>
+S: Subject: Hello
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S: 
+S: \)
+S: \* 7 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{214\}
+S: From: John Smith <[EMAIL PROTECTED]>
+S: Sender: Samual Smith <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>
+S: Subject: Hello
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S: 
+S: \)
+S: \* 8 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{155\}
+S: From: Timothy Tayler <[EMAIL PROTECTED]>
+S: To: Samual Smith <[EMAIL PROTECTED]>
+S: Date: Thu, 14 Feb 2008 12:00:00 \+0000 \(GMT\)
+S: Subject: A Simple Email
+S: 
+S: \)
+S: \* 9 FETCH \(BODY\[HEADER\.FIELDS \(DATE FROM TO CC SUBJECT REFERENCES 
IN-REPLY-TO MESSAGE-ID MIME-VERSION CONTENT-TYPE X-MAILING-LIST X-LOOP LIST-ID 
LIST-POST MAILING-LIST ORIGINATOR X-LIST SENDER RETURN-PATH X-BEENTHERE\)\] 
\{310\}
+S: From: "Brian G\. Hutton" <[EMAIL PROTECTED]>
+S: To: Timothy Taylor <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Huh\? <[EMAIL 
PROTECTED]>
+S: CC: <[EMAIL PROTECTED]>, "David \\"The Thin White Duke\\" Bowie" <[EMAIL 
PROTECTED]>
+S: Subject: Rhubarb
+S: Date: Sat, 23 Feb 2008 07:48:03 -0600
+S: Message-ID: <[EMAIL PROTECTED]>
+S: 
+S: \)
+S: A15 OK Fetch completed\.
+C: A16 SELECT testmailbox
+S: \* FLAGS \(\\Answered \\Flagged \\Deleted \\Seen \\Draft\)
+S: \* OK \[PERMANENTFLAGS \(\\Answered \\Flagged \\Deleted \\Seen \\Draft 
\\\*\)\] Flags permitted\.
+S: \* 9 EXISTS
+S: \* 0 RECENT
+S: \* OK \[UNSEEN 1\] First unseen\.
+S: \* OK \[UIDVALIDITY 1203759267\] UIDs valid
+S: \* OK \[UIDNEXT 10\] Predicted next UID
+S: A16 OK \[READ-WRITE\] Select completed\.
+C: A17 DELETE testmailbox
+S: A17 OK Delete completed\.
+C: A18 LOGOUT
+S: \* BYE Logging out
+S: A18 OK Logout completed\.
\ No newline at end of file

Added: 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-hello-world.mail
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-hello-world.mail?rev=630419&view=auto
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-hello-world.mail
 (added)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-hello-world.mail
 Sat Feb 23 01:59:46 2008
@@ -0,0 +1,26 @@
+################################################################
+# 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.                                           #
+################################################################
+
+From: John Smith <[EMAIL PROTECTED]>
+To: Timothy Taylor <[EMAIL PROTECTED]>
+Subject: Hello
+Date: Sat, 23 Feb 2008 07:48:03 -0600
+Message-ID: <[EMAIL PROTECTED]>
+
+Hello, World!
\ No newline at end of file

Added: 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-multiple-addresses.mail
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-multiple-addresses.mail?rev=630419&view=auto
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-multiple-addresses.mail
 (added)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-multiple-addresses.mail
 Sat Feb 23 01:59:46 2008
@@ -0,0 +1,27 @@
+################################################################
+# 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.                                           #
+################################################################
+
+From: "Brian G. Hutton" <[EMAIL PROTECTED]>
+To: Timothy Taylor <[EMAIL PROTECTED]>, [EMAIL PROTECTED], Huh? <[EMAIL 
PROTECTED]>
+CC: <[EMAIL PROTECTED]>, "David \"The Thin White Duke\" Bowie" <[EMAIL 
PROTECTED]>
+Subject: Rhubarb
+Date: Sat, 23 Feb 2008 07:48:03 -0600
+Message-ID: <[EMAIL PROTECTED]>
+
+Rhubarb!
\ No newline at end of file

Added: 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-sender.mail
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-sender.mail?rev=630419&view=auto
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-sender.mail
 (added)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/rfc822-sender.mail
 Sat Feb 23 01:59:46 2008
@@ -0,0 +1,27 @@
+################################################################
+# 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.                                           #
+################################################################
+
+From: John Smith <[EMAIL PROTECTED]>
+Sender: Samual Smith <[EMAIL PROTECTED]>
+To: Timothy Taylor <[EMAIL PROTECTED]>
+Subject: Hello
+Date: Sat, 23 Feb 2008 07:48:03 -0600
+Message-ID: <[EMAIL PROTECTED]>
+
+Hello, World!
\ No newline at end of file

Added: 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/wild-example.mail
URL: 
http://svn.apache.org/viewvc/james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/wild-example.mail?rev=630419&view=auto
==============================================================================
--- 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/wild-example.mail
 (added)
+++ 
james/server/trunk/experimental-seda-imap-function/src/test/resources/org/apache/james/test/functional/wild-example.mail
 Sat Feb 23 01:59:46 2008
@@ -0,0 +1,38 @@
+################################################################
+# 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.                                           #
+################################################################
+
+Received: by 10.114.81.13 with HTTP; Sat, 2 Feb 2008 05:14:19 -0800 (PST)
+Message-ID: <[EMAIL PROTECTED]>
+Date: Sat, 2 Feb 2008 13:14:19 +0000
+From: "Robert Burrell Donkin" <[EMAIL PROTECTED]>
+To: "James Developers List" <[email protected]>
+Subject: JCR -> trunk ...?
+MIME-Version: 1.0
+Content-Type: text/plain; charset=ISO-8859-1
+Content-Transfer-Encoding: 7bit
+Content-Disposition: inline
+Delivered-To: [EMAIL PROTECTED]
+
+i'd like to copy james-jcr into trunk and add some example
+configurations. development can continue in the sandbox (or not) and
+merged in later (if necessary).
+
+any objections?
+
+- robert
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to