Stefano Bagnara wrote:

> I'm working on it but I cannot reproduce it using a mock environment yet.

See the below.  All I did was telnet into JAMES and post a sample message,
and in the root processor I used SetMimeHeader.

        --- Noel


Index: src/java/org/apache/james/mailrepository/AvalonMailRepository.java
===================================================================
--- src/java/org/apache/james/mailrepository/AvalonMailRepository.java
(revision 420194)
+++ src/java/org/apache/james/mailrepository/AvalonMailRepository.java
(working copy)
@@ -236,6 +236,15 @@
         }
     }

+    private void logMessage(Mail mc, String label) throws
java.io.IOException, MessagingException {
+        // NjB
+        System.out.println("---- AMR: store(" + destination +
") -----------");
+        System.out.println("---- " + label + ") ----");
+        mc.getMessage().writeTo(System.out);
+        System.out.println("-----------------------------");
+        // NjB
+    }
+
     /**
      * Stores a message in this repository. Shouldn't this return the key
      * under which it is stored?
@@ -296,8 +305,11 @@
                 if (saveStream) {
                     OutputStream out = null;
                     try {
+                        logMessage(mc, "mark 4");
                         out = sr.put(key);
+                        logMessage(mc, "mark 5");
                         mc.getMessage().writeTo(out);
+                        logMessage(mc, "mark 6");
                     } finally {
                         if (out != null) out.close();
                     }


----------------------------------------------------------------------------
--------------------------------


---- AMR: store(file://var/mail/spool/) -----------
---- mark 4) ----
Return-Path: null
Received: from localhost.localdomain ([127.0.0.1])
          by localhost.localdomain (JAMES SMTP Server 2.3.0b2) with SMTP ID
254
          for <[EMAIL PROTECTED]>;
          Sun, 9 Jul 2006 00:51:17 -0400 (EDT)
Date: Now
Subject: Binary search?
To: Me
From: Me
X-MailetHeader: TheHeaderValue
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Message-ID: <[EMAIL PROTECTED]>

Help me!

Please.  :-)

-----------------------------
---- AMR: store(file://var/mail/spool/) -----------
---- mark 5) ----
Return-Path: null
Received: from localhost.localdomain ([127.0.0.1])
          by localhost.localdomain (JAMES SMTP Server 2.3.0b2) with SMTP ID
254
          for <[EMAIL PROTECTED]>;
          Sun, 9 Jul 2006 00:51:17 -0400 (EDT)
Date: Now
Subject: Binary search?
To: Me
From: Me
X-MailetHeader: TheHeaderValue
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Message-ID: <[EMAIL PROTECTED]>

-----------------------------
---- AMR: store(file://var/mail/spool/) -----------
---- mark 6) ----
Return-Path: null
Received: from localhost.localdomain ([127.0.0.1])
          by localhost.localdomain (JAMES SMTP Server 2.3.0b2) with SMTP ID
254
          for <[EMAIL PROTECTED]>;
          Sun, 9 Jul 2006 00:51:17 -0400 (EDT)
Date: Now
Subject: Binary search?
To: Me
From: Me
X-MailetHeader: TheHeaderValue
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
MIME-Version: 1.0
Message-ID: <[EMAIL PROTECTED]>

o: Me
From: Me
X-MailetHea-----------------------------


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

Reply via email to