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 "Norman Maurer (JIRA)" <se...@james.apache.org> on 2006/09/03 13:02:22 UTC

[jira] Created: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Rewrite MBoxMailRepository to use mstor 
----------------------------------------

                 Key: JAMES-607
                 URL: http://issues.apache.org/jira/browse/JAMES-607
             Project: James
          Issue Type: Improvement
          Components: MailStore & MailRepository
            Reporter: Norman Maurer
         Assigned To: Norman Maurer
             Fix For: 3.0


MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Resolved: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ https://issues.apache.org/jira/browse/JAMES-607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Norman Maurer resolved JAMES-607.
---------------------------------

       Resolution: Won't Fix
    Fix Version/s:     (was: Trunk)
                   3.0-M1

I don't think we ever include this.. So close it

> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: https://issues.apache.org/jira/browse/JAMES-607
>             Project: JAMES Server
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>            Assignee: Norman Maurer
>             Fix For: 3.0-M1
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


Re: [jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by Stefano Bagnara <ap...@bago.org>.
Norman Maurer (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432382 ] 
>             
> Norman Maurer commented on JAMES-607:
> -------------------------------------
> 
> Stefano point out that we don't need this class anymore after i did the work ;-P 

I'm sorry. I thought you were already working on the Joachim stuff and I 
found out that you did it differently only when you attached your diff 
to this issue! Btw all's well that ends well.

Great news here:

> We can simply use the javamailstore which joachim develop and use mstor as javamailstore provider.
> 
> Here is what you have todo to get it work:
> 
> 1. Get the javamailstore-mailrepository-5.jar from http://issues.apache.org/jira/browse/JAMES-461 and place it to /path/to/james/apps/james/SAR-INF/lib/ 
> 
> 2. Change the mbox config to:
>       <inboxRepository>
>          <repository destinationURL="mstor://var/mail/" postfix="/" type="MAIL"/>
>       </inboxRepository>
> 
>          <repository class="org.apache.james.mailrepository.javamail.HashJavamailStoreMailRepository">
>             <protocols>
>                <protocol>mstor</protocol>
>             </protocols>
>             <types>
>                <type>MAIL</type>
>             </types>
>          </repository>
> 
> 
> Thats all. I whould be +1 to include joachims work finally to james trunk

The HashJavamailStoreMailRepository is not so performant but we may try 
to find out how to make the mstor folder to implement the UidPlusFolder 
interface later. (maybe this is not easy, maybe we should talk with Ben 
Fortuna about this).

+1 !!!
Stefano


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


Re: [jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by Norman Maurer <nm...@byteaction.de>.
Am Montag, den 04.09.2006, 01:10 +0200 schrieb Stefano Bagnara:
> Norman Maurer (JIRA) wrote:
> >     [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432382 ] 
> >             
> > Norman Maurer commented on JAMES-607:
> > -------------------------------------
> > 
> > Stefano point out that we don't need this class anymore after i did the work ;-P 
> 
> I'm sorry. I thought you were already working on the Joachim stuff and I 
> found out that you did it differently only when you attached your diff 
> to this issue! Btw all's well that ends well.

No problems.. Everytime i code something on james i know it better next
time ;-)

> 
> Great news here:
> 
> > We can simply use the javamailstore which joachim develop and use mstor as javamailstore provider.
> > 
> > Here is what you have todo to get it work:
> > 
> > 1. Get the javamailstore-mailrepository-5.jar from http://issues.apache.org/jira/browse/JAMES-461 and place it to /path/to/james/apps/james/SAR-INF/lib/ 
> > 
> > 2. Change the mbox config to:
> >       <inboxRepository>
> >          <repository destinationURL="mstor://var/mail/" postfix="/" type="MAIL"/>
> >       </inboxRepository>
> > 
> >          <repository class="org.apache.james.mailrepository.javamail.HashJavamailStoreMailRepository">
> >             <protocols>
> >                <protocol>mstor</protocol>
> >             </protocols>
> >             <types>
> >                <type>MAIL</type>
> >             </types>
> >          </repository>
> > 
> > 
> > Thats all. I whould be +1 to include joachims work finally to james trunk
> 
> The HashJavamailStoreMailRepository is not so performant but we may try 
> to find out how to make the mstor folder to implement the UidPlusFolder 
> interface later. (maybe this is not easy, maybe we should talk with Ben 
> Fortuna about this).
> 
> +1 !!!
> Stefano

I will ask Ben to join us.

bye
Norman

Re: [jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by Norman Maurer <nm...@byteaction.de>.
Am Montag, den 04.09.2006, 19:24 +0200 schrieb Norman Maurer:
<snip>
> > The HashJavamailStoreMailRepository is not so performant but we may try 
> > to find out how to make the mstor folder to implement the UidPlusFolder 
> > interface later. (maybe this is not easy, maybe we should talk with Ben 
> > Fortuna about this).
> > 
> > +1 !!!
> > Stefano
> 
> I will ask Ben to join us.

I posted this message to the mstor mailinglist. Let us see what Ben
answer:

Unique id per message when stored 
2006-09-04 20:38  Hi Ben, 

we develop a java mail server named james ( james.apache.org ). We
thought about to use mstor to provide a backend for mbox. We need to
have a persist unique uid (key) per message we add to retrieve the mail
later by using the "unique" id. Any idea how to adapted this ? 

Here his the interface we using for such needs: 

package org.apache.james.mailrepository.javamail; 

import javax.mail.Message; 
import javax.mail.MessagingException; 
import javax.mail.UIDFolder; 

/** 
* Interim interface to provide access to UID PLUS methods reflecting RFC
2359, 
* until official Javamail API offers this. 
*/ 

public interface UIDPlusFolder extends UIDFolder, FolderInterface { 
/** 
* Appends the given messages to the folder and returns corresponding
uids.<br> 
* Implementations may require the folder to be open. 
* 
* @see javax.mail.Folder#appendMessages(javax.mail.Message[]) 
* 
* @param msgs 
* messages to append 
* @return array of same size and sequenze of msgs containing
corresponding 
* uids or -1, if something went wrong 
* @throws MessagingException 
* @throws IllegalStateException when folder has to be open 
*/ 
public long[] addUIDMessages(Message[] msgs) throws MessagingException; 

/** 
* Appends the given messages to the folder and returns corresponding 
* instances of the appended messages.<br> 
* Implementations may require the folder to be open. 
* 
* @see javax.mail.Folder#appendMessages(javax.mail.Message[]) 
* 
* @param msgs 
* messages to append 
* @return array of same size and sequenze of msgs containing
corresponding 
* added messages or null, if something went wrong 
* @throws MessagingException 
* @throws IllegalStateException when folder has to be open 
*/ 
public Message[] addMessages(Message[] msgs) throws MessagingException; 

}

bye
Norman

Folder interface and UID ! [was: Re: [jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor]

Posted by Norman Maurer <nm...@byteaction.de>.
Here is what Ben was answer:

Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=3899074
By: fortuna

Hi Norman,

I would assume the best place to store the message UID would be as a
custom
header in the message. eg:

X-Apache-James-UID: JVBERi0xLjQKMyAwIG9iaiA8PA

Then to retrieve a messages you could use a search term like this:

HeaderTerm uidSearch = new HeaderTerm("X-Apache-James-UID",
"JVBERi0xLjQKMyAwIG9iaiA8PA");

// messages should contain only one (1) message..
Message[] messages = folder.search(uidSearch);

Your implementation of UIDPlusFolder could encapsulate this
functionality along
with a way to generate the unique UIDs. The benefit of using the
standard JavaMail
APIs like this is that you wouldn't be tied to any particular mail store
provider,
so you could choose to use mbox, MailDir, etc. without needing code
changes.

Let me know if this is not what you meant.

regards,
ben

ps. I've used strings for the UID, but longs would also work here.


After talk to Stefano the idea raise to adapt this idea but use FLAGS to
do the UID storing. I did a fast check of the javamail apidocs and ti
seems to be possible. 

Any comments, feedback or somthing else ?

bye
Norman

Am Montag, den 04.09.2006, 20:44 +0200 schrieb Norman Maurer:
> Am Montag, den 04.09.2006, 19:24 +0200 schrieb Norman Maurer:
> <snip>
> > > The HashJavamailStoreMailRepository is not so performant but we may try 
> > > to find out how to make the mstor folder to implement the UidPlusFolder 
> > > interface later. (maybe this is not easy, maybe we should talk with Ben 
> > > Fortuna about this).
> > > 
> > > +1 !!!
> > > Stefano
> > 
> > I will ask Ben to join us.
> 
> I posted this message to the mstor mailinglist. Let us see what Ben
> answer:
> 
> Unique id per message when stored 
> 2006-09-04 20:38  Hi Ben, 
> 
> we develop a java mail server named james ( james.apache.org ). We
> thought about to use mstor to provide a backend for mbox. We need to
> have a persist unique uid (key) per message we add to retrieve the mail
> later by using the "unique" id. Any idea how to adapted this ? 
> 
> Here his the interface we using for such needs: 
> 
> package org.apache.james.mailrepository.javamail; 
> 
> import javax.mail.Message; 
> import javax.mail.MessagingException; 
> import javax.mail.UIDFolder; 
> 
> /** 
> * Interim interface to provide access to UID PLUS methods reflecting RFC
> 2359, 
> * until official Javamail API offers this. 
> */ 
> 
> public interface UIDPlusFolder extends UIDFolder, FolderInterface { 
> /** 
> * Appends the given messages to the folder and returns corresponding
> uids.<br> 
> * Implementations may require the folder to be open. 
> * 
> * @see javax.mail.Folder#appendMessages(javax.mail.Message[]) 
> * 
> * @param msgs 
> * messages to append 
> * @return array of same size and sequenze of msgs containing
> corresponding 
> * uids or -1, if something went wrong 
> * @throws MessagingException 
> * @throws IllegalStateException when folder has to be open 
> */ 
> public long[] addUIDMessages(Message[] msgs) throws MessagingException; 
> 
> /** 
> * Appends the given messages to the folder and returns corresponding 
> * instances of the appended messages.<br> 
> * Implementations may require the folder to be open. 
> * 
> * @see javax.mail.Folder#appendMessages(javax.mail.Message[]) 
> * 
> * @param msgs 
> * messages to append 
> * @return array of same size and sequenze of msgs containing
> corresponding 
> * added messages or null, if something went wrong 
> * @throws MessagingException 
> * @throws IllegalStateException when folder has to be open 
> */ 
> public Message[] addMessages(Message[] msgs) throws MessagingException; 
> 
> }
> 
> bye
> Norman

[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432382 ] 
            
Norman Maurer commented on JAMES-607:
-------------------------------------

Stefano point out that we don't need this class anymore after i did the work ;-P 

We can simply use the javamailstore which joachim develop and use mstor as javamailstore provider.

Here is what you have todo to get it work:

1. Get the javamailstore-mailrepository-5.jar from http://issues.apache.org/jira/browse/JAMES-461 and place it to /path/to/james/apps/james/SAR-INF/lib/ 

2. Change the mbox config to:
      <inboxRepository>
         <repository destinationURL="mstor://var/mail/" postfix="/" type="MAIL"/>
      </inboxRepository>

         <repository class="org.apache.james.mailrepository.javamail.HashJavamailStoreMailRepository">
            <protocols>
               <protocol>mstor</protocol>
            </protocols>
            <types>
               <type>MAIL</type>
            </types>
         </repository>


Thats all. I whould be +1 to include joachims work finally to james trunk





> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: 3.0
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Joachim Draeger (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12437636 ] 
            
Joachim Draeger commented on JAMES-607:
---------------------------------------

I had no luck using mstor 0.9.9

 - it's not checksum save because it returns additional (mbox related) \r\n when fetching a message that it not the last one
- it messes internal cache up, when reopening folder
   1. add 2  Messages 
   2. delete and expunge 1. message, close folder
   3. open and close with expunge: the retaining message gets deleted because an unclean DELETED flag is  
       assumed
- metadata file doesn't get closed after save, so you can't delete it
So IMHO it is unusable by now.

But I have something positive to say, too: :-)
It's code looks quite decent, structured and clean
And I was wrong saying  that would be complex to add flag and uid support! It uses a xml metadata file along with the mbox file which already is able to store Flags and could be easily extended to support UIDs.
BTW there don't seem to be any changes in trunk till 0.9.9

I'l try to write unit tests and patches for what I've found and submit them to mstor but I wasn't able to fix everything by now. Anyway: very promising.





> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: Trunk
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Noel J. Bergman (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432393 ] 
            
Noel J. Bergman commented on JAMES-607:
---------------------------------------

We should not be using JavaMail for storage except to interface to existing systems.  JavaMail is intended to be a client-side API, and is not really suitable for performant work on the server-side.

> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: 3.0
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Stefano Bagnara (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432394 ] 
            
Stefano Bagnara commented on JAMES-607:
---------------------------------------

>From what I understood the mstor implementation (javamail store implementation) is much more performant than our custom mboxrepository. In fact mboxrepository had very big performance limit when used for reading and there was a lot of TODO in the list.

> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: 3.0
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Updated: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-607?page=all ]

Norman Maurer updated JAMES-607:
--------------------------------

    Attachment: mbox.diff

Here it is. Plz review

> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: 3.0
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Joachim Draeger (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432481 ] 
            
Joachim Draeger commented on JAMES-607:
---------------------------------------

A note to mbox in general:
In a medium-term James should support different feature-levels of repositories. The "client" generated permanent keys will never  fit satisfyingly to a mbox backend. 
In the normal SMTP -> POP3 lifecycle no permanent keys are needed at all and mbox could be perfectly supported without any hash-sum workarounds.

Joachim 

> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: 3.0
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Updated: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
     [ http://issues.apache.org/jira/browse/JAMES-607?page=all ]

Norman Maurer updated JAMES-607:
--------------------------------

    Fix Version/s: Trunk
                       (was: Next Major)

Move to trunk until the bugs are fixed 

> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: Trunk
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Re: [jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by Stefano Bagnara <ap...@bago.org>.
Noel J. Bergman wrote:
> Stefano Bagnara wrote:
> 
>> I'm refer to any general idea of using JavaMail for local storage.
> 
>> Shouldn't this discussion be supported by benchmarks?
> 
> See the various analysis of JavaMail done by ... IIRC ... Jason Webb from years ago after I suggested using JavaMail in the first place.

I just searched a lot of old messages but I cannot find the analysis of 
JavaMail done by Jason Webb: can you point me to an url with the topic?

I'm interested in reading it because javamail is publishing much more of 
its internals nowadays and maybe it is possible to workaround its 
limitations: but I need to know what the problem was!

> The other important thing is that we stop using JavaMail internally unless we need to manipulate the contents of the message.  MIME4J will be faster, more reliable in the face of a real-world corpus (doesn't throw exceptions "all the time", unlike JavaMail), and has a smaller footprint.
> 
> 	--- Noel

Ok, but Mime4J does not provide an API for message persistence, so we 
can't use Mime4J to store messages.

And I'm not sure I agree with the "more reliable" statement: mime4j has 
not a big userbase like javamail had so I think it's not fair to think 
that it is more reliable. I at least found one thing that is not handled 
in an rfc compliant way (I don't remember what, now, but I noticed this 
while looking the source code to understand how it was parsing headers).

Stefano


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


RE: [jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Noel J. Bergman" <no...@devtech.com>.
Stefano Bagnara wrote:

> I'm refer to any general idea of using JavaMail for local storage.

> Shouldn't this discussion be supported by benchmarks?

See the various analysis of JavaMail done by ... IIRC ... Jason Webb from years ago after I suggested using JavaMail in the first place.

The other important thing is that we stop using JavaMail internally unless we need to manipulate the contents of the message.  MIME4J will be faster, more reliable in the face of a real-world corpus (doesn't throw exceptions "all the time", unlike JavaMail), and has a smaller footprint.

	--- Noel



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


Re: [jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by Stefano Bagnara <ap...@bago.org>.
Noel J. Bergman (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432396 ] 
>             
> Noel J. Bergman commented on JAMES-607:
> ---------------------------------------
> 
> The question isn't the mbox code that we wrote vs mstor, which is apparently much faster (no surprise, actually).  It is integrating mstor into a repository interface vs JavaMail.  And for importing from MBOX or MailDir, it might be fine to use JavaMail.  I'm refer to any general idea of using JavaMail for local storage.

Shouldn't this discussion be supported by benchmarks?
I don't have any problems in using a client API if it just works as I 
expect....

Stefano


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


[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Noel J. Bergman (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12432396 ] 
            
Noel J. Bergman commented on JAMES-607:
---------------------------------------

The question isn't the mbox code that we wrote vs mstor, which is apparently much faster (no surprise, actually).  It is integrating mstor into a repository interface vs JavaMail.  And for importing from MBOX or MailDir, it might be fine to use JavaMail.  I'm refer to any general idea of using JavaMail for local storage.


> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: 3.0
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Norman Maurer (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12437651 ] 
            
Norman Maurer commented on JAMES-607:
-------------------------------------

Sad to hear that mstor not work like aspected by now.

But anyway i think if we supply patches to the author he we probaly fix the bugs ( i hope so)

> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: Trunk
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] Commented: (JAMES-607) Rewrite MBoxMailRepository to use mstor

Posted by "Joachim Draeger (JIRA)" <se...@james.apache.org>.
    [ http://issues.apache.org/jira/browse/JAMES-607?page=comments#action_12438479 ] 
            
Joachim Draeger commented on JAMES-607:
---------------------------------------

I just created bug reports for the ones I found. But I fear there maybe more.

 1567158  	  Metadata file doesn't get closed after been saved
http://sourceforge.net/tracker/index.php?func=detail&aid=1567158&group_id=114229&atid=667638

 1567139  	  Messages read from Folder contain additional \r\n
http://sourceforge.net/tracker/index.php?func=detail&aid=1567139&group_id=114229&atid=667638

 1565328  	  messageCache out of date after reopen causes message loss
http://sourceforge.net/tracker/index.php?func=detail&aid=1565328&group_id=114229&atid=667638


> Rewrite MBoxMailRepository to use mstor
> ---------------------------------------
>
>                 Key: JAMES-607
>                 URL: http://issues.apache.org/jira/browse/JAMES-607
>             Project: James
>          Issue Type: Improvement
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: Trunk
>
>         Attachments: mbox.diff
>
>
> MBoxMailRepository should be rewritten to use mstor. Mstor provide a clean way to access mbox files etc

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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