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/03/23 15:46:18 UTC

[jira] Created: (JAMES-461) Maildir support

Maildir support
---------------

         Key: JAMES-461
         URL: http://issues.apache.org/jira/browse/JAMES-461
     Project: James
        Type: New Feature
    Reporter: Norman Maurer


Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Norman Maurer resolved JAMES-461.
---------------------------------

    Resolution: Fixed
      Assignee: Norman Maurer  (was: Stefano Bagnara)

was applied to trunk

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>                 Key: JAMES-461
>                 URL: http://issues.apache.org/jira/browse/JAMES-461
>             Project: James
>          Issue Type: New Feature
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Norman Maurer
>             Fix For: Trunk
>
>         Attachments: diff_to-javamaildir-0.7-pre1-2.diff, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip, javamailstore-mailrepository-5.jar, JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
>
> Add support for Javamail Stores as MailRepositories

-- 
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] Updated: (JAMES-461) Javamail Store based MailRepository support

Posted by Stefano Bagnara <ap...@bago.org>.
Joachim Draeger wrote:
>> 1) Why you introduced the StoreAware interface? It seems it is not 
>> used in the code.
> 
> (Formally know as  FolderAware) This exposes the underlaying Javamail 
> store. The IMAP server will depend on that until James has an own solution.

Ok, now I remember! ;-)

>> 2) Is there any javamail store implementation (even not maildir) under 
>> a compatible license that we can use for the examples in the 
>> config.xml and for the default tests? 
> 
> I fear not. There is a LGPL one but I know there are uncertainties with 
> LGPL, too. But I agree we need something for testing. Creating an in 
> memory MOCK should be very easy. (ArrayList of MimeMessages with easy 
> operations) We could uses a memory://blah url for that.
> Another thing I have in mind is offering a javamail implementation for 
> James storing methods. This should be no problem, when we have made the 
> extensions needed for Imap. A JDBC javamail store could be in demand.

This is a problem.

I'm a bit busy at the moment, but the most ASL friendly store 
implementation I heard of is under the MPL.

AFAIK MPL has been declared compatible with ASL (to be confirmed).
The MPL store is inside the sources of Grendel 
(http://wiki.mozilla.org/Grendel)
"storage/BerkeleyStore" found in their repository seems to be a BDB 
based store implementation under the MPL.

Maybe we should try a deeper search for any other store under a 
compliant license.

>> Imho the code you provided in the src folder can be included in James, 
>> but the patch to config.xml and the tests references the "maildir 
>> store" and the only known (to me) implementation of the maildir store 
>> is GPL, so it would be safer for us to avoid even this "virtual" 
>> references in our codebase.
> 
> That sounds like "persecution mania". :-) But of course it would be 
> dissatisfying to have untestable code. The tests should run the MOCK by 
> default and be configurable by a properties file.
> How to actually use javamaildir could be explained on the website/faq/wiki.
> BTW: classpathx has a maildir implementation, as well but it's also GPL 
> and has less features.

The important thing, imho, is that we now have a javamail store 
mailrepository "adapter". We can't bundle the tests, but we know we have 
tests: this is better than nothing.

Btw if we want to add IMAP support to James we'll need to create our own 
(JDBC) store, sooner or later....

Stefano


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


Re: [jira] Updated: (JAMES-461) Javamail Store based MailRepository support

Posted by Joachim Draeger <jd...@joachim-draeger.de>.
Hi Stefano,

> At a first look you did a really good job!

Thank you.

> 1) Why you introduced the StoreAware interface? It seems it is not used 
> in the code.

(Formally know as  FolderAware) This exposes the underlaying Javamail 
store. The IMAP server will depend on that until James has an own solution.

> 2) Is there any javamail store implementation (even not maildir) under a 
> compatible license that we can use for the examples in the config.xml 
> and for the default tests? 

I fear not. There is a LGPL one but I know there are uncertainties with 
LGPL, too. But I agree we need something for testing. Creating an in 
memory MOCK should be very easy. (ArrayList of MimeMessages with easy 
operations) We could uses a memory://blah url for that.
Another thing I have in mind is offering a javamail implementation for 
James storing methods. This should be no problem, when we have made the 
extensions needed for Imap. A JDBC javamail store could be in demand.

> Imho the code you provided in the src folder 
> can be included in James, but the patch to config.xml and the tests 
> references the "maildir store" and the only known (to me) implementation 
> of the maildir store is GPL, so it would be safer for us to avoid even 
> this "virtual" references in our codebase.

That sounds like "persecution mania". :-) But of course it would be 
dissatisfying to have untestable code. The tests should run the MOCK by 
default and be configurable by a properties file.
How to actually use javamaildir could be explained on the website/faq/wiki.
BTW: classpathx has a maildir implementation, as well but it's also GPL 
and has less features.

Joachim

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


Re: [jira] Updated: (JAMES-461) Javamail Store based MailRepository support

Posted by Stefano Bagnara <ap...@bago.org>.
Hi Joachim,

At a first look you did a really good job!

I have 2 questions:

1) Why you introduced the StoreAware interface? It seems it is not used 
in the code.

2) Is there any javamail store implementation (even not maildir) under a 
compatible license that we can use for the examples in the config.xml 
and for the default tests? Imho the code you provided in the src folder 
can be included in James, but the patch to config.xml and the tests 
references the "maildir store" and the only known (to me) implementation 
of the maildir store is GPL, so it would be safer for us to avoid even 
this "virtual" references in our codebase.

Stefano

Joachim Draeger (JIRA) wrote:
>      [ http://issues.apache.org/jira/browse/JAMES-461?page=all ]
> 
> Joachim Draeger updated JAMES-461:
> ----------------------------------
> 
>     Attachment: JavamailStoreMailRepository2.zip
> 
> 
> This proposal has no other dependencies than Javamail (i think even before 1.4) and James.
> 
> HashJavamailStoreMailRepository  should work with every JavamailStore implementation that has deterministic
> message content. (checksum save).  Performance could be quite good because after storing/listing it tries to get the messages by the last seen message number.
> 
> UIDPlusFolderMailRepository depends on javamail Folders that have a public long[] addUIDMessages(Message[] msgs); method which returns the uids of the added messages. This method is called via reflection, and in the future even the message name might be configureable form config.xml.
> At the moment there is no known Javamail store implementation that provides such a method, but it should come soon.
> 
> The Javamail store url is not configureable in the unit tests at the moment. Nearly all tests depend on getNativeMessageCount(), and getNativeMessages() at the moment. I plan to write a few more general tests in the future.
> 
> This implementation should be considered as EXPERIMENTAL, but I think it's not so far from being stable.
> 
> Joachim


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


[jira] Updated: (JAMES-461) Javamail Store based MailRepository support (was: Maildir support)

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

Joachim Draeger updated JAMES-461:
----------------------------------

    Attachment: JavamailStoreMailRepository2.zip


This proposal has no other dependencies than Javamail (i think even before 1.4) and James.

HashJavamailStoreMailRepository  should work with every JavamailStore implementation that has deterministic
message content. (checksum save).  Performance could be quite good because after storing/listing it tries to get the messages by the last seen message number.

UIDPlusFolderMailRepository depends on javamail Folders that have a public long[] addUIDMessages(Message[] msgs); method which returns the uids of the added messages. This method is called via reflection, and in the future even the message name might be configureable form config.xml.
At the moment there is no known Javamail store implementation that provides such a method, but it should come soon.

The Javamail store url is not configureable in the unit tests at the moment. Nearly all tests depend on getNativeMessageCount(), and getNativeMessages() at the moment. I plan to write a few more general tests in the future.

This implementation should be considered as EXPERIMENTAL, but I think it's not so far from being stable.

Joachim

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
I agree on the Md5AwareFolderMessageStore idea.

Just a note: we should limit our discussion to the "UIDPlusFolder" and 
"Javamail Store / Javamail Folder" concepts and avoid to talk about 
maildir and in particular of the GPL Javamail Store maildir implementaion.

It is likely that if we support Javamail stores people will use the 
maildir implementation, but we should concentrate on our usage by now. I 
think your work is a good step forward in this direction.

There is not too much support of Javamail storage APIs out there, but I 
know at least Grendel (http://wiki.mozilla.org/Grendel) that should 
include at least a BerkleyDB based implementation in Java. IIRC they 
also intended to support derby. I should check out their progresses.

If they release Grendel libs under the MPL their usage is more ASL 
friedly than the GPLs.

Stefano

Joachim Draeger wrote:
> Hi Stefano,
> 
> Stefano Bagnara wrote:
> 
>> My opinion is that we should use reflection for that so we don't have 
>> to introduce "imaginary.javax" packages/interfaces.
> 
> Yes, that seems to be the only practicable alternative.
> 
> quote: 'We can add the "imaginary.javax.mail.UIDPlusFolder" (or a
> similar interface) to the mailet API or to a third party ASL2 licensed
> project.'
> That is the other possibility I had in mind, but it is obviously to
> complicated.
> 
>> The best of both worlds would also be to have a workaround (based on 
>> the md5 hash hack for each message we discussed before) for stores not 
>> implementing this "method".
> 
> I'm not sure if that would be a way. I fear that stores might break the
> checksum just because they are not aware of it.
> We could provide an implementation of Md5AwareFolderMessageStore and
> warn people that the store has to guarantee this behavior.
> Performance of this could be acceptable because it might be possible to
> guess message number of requested messages by a cache and only rehash
> the whole folder if that fails.
> 
> Using the Message-ID as Noel suggested in his wiki-post is problematic
> because it's generated by the client. This conflicts with Postel's Law
> "...be liberal in what you accept from others.."
> 
> Joachim


---------------------------------------------------------------------
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-461) Maildir support

Posted by Joachim Draeger <jd...@gmx.de>.
Hi Stefano,

Stefano Bagnara wrote:

> My opinion is that we should use reflection for that so we don't have to 
> introduce "imaginary.javax" packages/interfaces.

Yes, that seems to be the only practicable alternative.

quote: 'We can add the "imaginary.javax.mail.UIDPlusFolder" (or a
similar interface) to the mailet API or to a third party ASL2 licensed
project.'
That is the other possibility I had in mind, but it is obviously to
complicated.

> The best of both worlds would also be to have a workaround (based on the 
> md5 hash hack for each message we discussed before) for stores not 
> implementing this "method".

I'm not sure if that would be a way. I fear that stores might break the
checksum just because they are not aware of it.
We could provide an implementation of Md5AwareFolderMessageStore and
warn people that the store has to guarantee this behavior.
Performance of this could be acceptable because it might be possible to
guess message number of requested messages by a cache and only rehash
the whole folder if that fails.

Using the Message-ID as Noel suggested in his wiki-post is problematic
because it's generated by the client. This conflicts with Postel's Law
"...be liberal in what you accept from others.."

Joachim



---------------------------------------------------------------------
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-461) Maildir support

Posted by Markus Kühn <ty...@hotmail.com>.
----- Original Message ----- 
From: "Ahmed Mohombe" <am...@yahoo.com>
To: <se...@james.apache.org>
Sent: Thursday, May 18, 2006 6:12 PM
Subject: Re: [jira] Commented: (JAMES-461) Maildir support


>>>> I know what the GPL is and I also know about the differences in the
>>>>  interpretations by Apache lawyers and FSF, but this is not the point.
>>>>
>>>> I asked for a solution, not for explanations of the problem ;-)
>>>>
>>>> We can add the "imaginary.javax.mail.UIDPlusFolder" (or a similar 
>>>> interface) to the mailet API or to a third party ASL2 licensed project. 
>>>> We can then add a sourceforge project that include the GPL
>>>>  maildir and the GPL plugin including our ASL interface. People then 
>>>> will have Maildir support in james: is this right?
>>> This is a borderline case.
>>
>> I agree.
>>
>>> And this is not in the interest of people using Apache software.
>
>> I don't agree: Not all apache software users use it due to the ASL 
>> licensing. I believe that most James users would use it even if it were 
>> GPL.
> Exactly. You hit the nail here, and it seems that from the "top" many 
> Apache commiters don't see the
> reality anymore:
> - most of the people use JAMES because it's the *ONLY* *free* *java_based* 
> email server.
> - many more, that would like to use it, but are not allowed because of the 
> missing features, would
> use it for the same reason.
> - even more, most of them would use it even if the were closed source but 
> guaranteed free.
>
> Ahmed.

Support (not incorporation, usage or whatever) of GPL-code by an ASF-project 
is problematic, as long as it is not because of standards both the ASL- and 
GPL-code are following.

Markus


---------------------------------------------------------------------
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-461) Maildir support

Posted by Ahmed Mohombe <am...@yahoo.com>.
>>> I know what the GPL is and I also know about the differences in the
>>>  interpretations by Apache lawyers and FSF, but this is not the point.
>>>
>>> I asked for a solution, not for explanations of the problem ;-)
>>>
>>> We can add the "imaginary.javax.mail.UIDPlusFolder" (or a similar 
>>> interface) to the mailet API or to a third party ASL2 licensed 
>>> project. We can then add a sourceforge project that include the GPL
>>>  maildir and the GPL plugin including our ASL interface. People then 
>>> will have Maildir support in james: is this right?
>> This is a borderline case.
> 
> I agree.
> 
>> And this is not in the interest of people using Apache software.

> I don't agree: Not all apache software users use it due to the ASL 
> licensing. I believe that most James users would use it even if it were 
> GPL.
Exactly. You hit the nail here, and it seems that from the "top" many Apache commiters don't see the
reality anymore:
- most of the people use JAMES because it's the *ONLY* *free* *java_based* email server.
- many more, that would like to use it, but are not allowed because of the missing features, would
use it for the same reason.
- even more, most of them would use it even if the were closed source but guaranteed free.

Ahmed.


---------------------------------------------------------------------
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-461) Maildir support

Posted by Markus Kühn <ty...@hotmail.com>.
----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Developers List" <se...@james.apache.org>
Sent: Thursday, May 18, 2006 6:52 PM
Subject: Re: [jira] Commented: (JAMES-461) Maildir support



> Turning back to our issue: the contribution is about the support of a 
> SUN API, that we already have dependencies on (javamail), and the fact 
> that the submitter is testing this code against a GPL implementation of 
> that code does not activate the virality of the GPL.

I agree. 

Markus

---------------------------------------------------------------------
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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
Markus Kühn wrote:
> Easy, easy!
> 
> I said in general, not specific, that code does not need to include 
> GPL-code to create - let's be more specific - a license violation.
> Or in other words, an ASF project should not actively support (e. g. by 
> API) GPL-covered code.
> 
> If none of it involves your plans, that is fine. And if you are 100 % 
> sure what you are doing won't create problems, even better; so you only 
> have to convince ASF-members.
> 
> Markus

I'm ok with that. I just wanted to be sure you were speaking in general 
and not about this specific contribution.

I'm not 100% sure: in fact you can NEVER been 100% sure that any code 
submitted, even if the submitter grant you the rights, even if he added 
the license, even if he send you a signed fax granting you the rights, 
that he has the full trasferrable copyrights for the code he submit.

This is not an issue with GPL itself: this is an issue with *every* 
commit made.

If tomorrow I steal some code somewhere and I commit it to the apache 
repository you cannot find out this so easily and, even if Apache 
Foundation can sue me for this, this will not protect the project from 
the copyright law.

Opensource is an hard world, it's easier "to steal" when you hide your 
sources and you can show to the world only your binary side ;-)

Turning back to our issue: the contribution is about the support of a 
SUN API, that we already have dependencies on (javamail), and the fact 
that the submitter is testing this code against a GPL implementation of 
that code does not activate the virality of the GPL.

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-461) Maildir support

Posted by Markus Kühn <ty...@hotmail.com>.
Mit freundlichen Grüßen

Markus Kühn
----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Developers List" <se...@james.apache.org>
Sent: Thursday, May 18, 2006 6:24 PM
Subject: Re: [jira] Commented: (JAMES-461) Maildir support


> Markus Kühn wrote:
>> It is not about what is in the code, but about if there could be a 
>> license problem. And to create a problem there does not need to be 
>> GPL-code incorporated in James.
>
> So you want to convince me that if you say the GPL word while looking at a 
> code then the code is cursed and you can't include it in ASL project?
>
> I already said that I'm not interested in a generic legal discussion, now: 
> if you think you have the knowledge then download the contributed patch 
> and contribute us a detailed opinion about what code creates licesing 
> issues and why.

Easy, easy!

I said in general, not specific, that code does not need to include GPL-code 
to create - let's be more specific - a license violation.
Or in other words, an ASF project should not actively support (e. g. by API) 
GPL-covered code.

If none of it involves your plans, that is fine. And if you are 100 % sure 
what you are doing won't create problems, even better; so you only have to 
convince ASF-members.

Markus 

---------------------------------------------------------------------
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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
Markus Kühn wrote:
> It is not about what is in the code, but about if there could be a 
> license problem. And to create a problem there does not need to be 
> GPL-code incorporated in James.

So you want to convince me that if you say the GPL word while looking at 
a code then the code is cursed and you can't include it in ASL project?

I already said that I'm not interested in a generic legal discussion, 
now: if you think you have the knowledge then download the contributed 
patch and contribute us a detailed opinion about what code creates 
licesing issues and why.

Thank you,
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-461) Maildir support

Posted by Markus Kühn <ty...@hotmail.com>.
----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Developers List" <se...@james.apache.org>
Sent: Thursday, May 18, 2006 5:56 PM
Subject: Re: [jira] Commented: (JAMES-461) Maildir support

>> This is a borderline case.
>
> I agree.
>
>> And this is not in the interest of people using Apache software.
>
> I don't agree: Not all apache software users use it due to the ASL 
> licensing. I believe that most James users would use it even if it were 
> GPL.
> So I think that *adding a new feature* is not against "the interest of 
> people using Apache software"
>
> Furthermore the fact is that we simply want to overcome a limitation of 
> Javamail Stores. This is not a Maildir issue, neither an issue with the 
> GPL Java implementation of the Javamail Store with Maildir format.
>
> The contribution is about the support of Javamail Stores as Repositories. 
> This has nothing to do with the GPL!!!
>
> > A major point not to include or support code under the GPL is to keep a
>> clear license situation.
>>
>> Markus
>
> Again, can you tell me what is GPL in the contributed code? I do like to 
> talk about *real* things: both you and Noel are talking about GPL-ASL 
> integration and not about the contribution itself.
>
> You probably being fooled by the GPL and Maildir words in the JIRA issue 
> comments, but I think that it worth to look at the contribution itself 
> before starting such long threads.
>
> Stefano

It is not about what is in the code, but about if there could be a license 
problem. And to create a problem there does not need to be GPL-code 
incorporated in James.

Markus 

---------------------------------------------------------------------
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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
Markus Kühn wrote:
>> I know what the GPL is and I also know about the differences in the
>>  interpretations by Apache lawyers and FSF, but this is not the 
>> point.
>> 
>> I asked for a solution, not for explanations of the problem ;-)
>> 
>> We can add the "imaginary.javax.mail.UIDPlusFolder" (or a similar 
>> interface) to the mailet API or to a third party ASL2 licensed 
>> project. We can then add a sourceforge project that include the GPL
>>  maildir and the GPL plugin including our ASL interface. People 
>> then will have Maildir support in james: is this right?
>> 
>> Stefano
> 
> This is a borderline case.

I agree.

> And this is not in the interest of people using Apache software.

I don't agree: Not all apache software users use it due to the ASL 
licensing. I believe that most James users would use it even if it were GPL.
So I think that *adding a new feature* is not against "the interest of 
people using Apache software"

Furthermore the fact is that we simply want to overcome a limitation of 
Javamail Stores. This is not a Maildir issue, neither an issue with the 
GPL Java implementation of the Javamail Store with Maildir format.

The contribution is about the support of Javamail Stores as 
Repositories. This has nothing to do with the GPL!!!

 > A major point not to include or support code under the GPL is to keep a
> clear license situation.
> 
> Markus 

Again, can you tell me what is GPL in the contributed code? I do like to 
talk about *real* things: both you and Noel are talking about GPL-ASL 
integration and not about the contribution itself.

You probably being fooled by the GPL and Maildir words in the JIRA issue 
comments, but I think that it worth to look at the contribution itself 
before starting such long threads.

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-461) Maildir support

Posted by Markus Kühn <ty...@hotmail.com>.
----- Original Message ----- 
From: "Stefano Bagnara" <ap...@bago.org>
To: "James Developers List" <se...@james.apache.org>
Sent: Thursday, May 18, 2006 5:12 PM
Subject: Re: [jira] Commented: (JAMES-461) Maildir support

>> If GPL code includes methods that are not present in the javax.* API, you 
>> cannot use them without infecting the code.
>>
>> --- Noel
>
> Maybe I'm not able to explain what I want to know.
>
> I know what the GPL is and I also know about the differences in the 
> interpretations by Apache lawyers and FSF, but this is not the point.
>
> I asked for a solution, not for explanations of the problem ;-)
>
> We can add the "imaginary.javax.mail.UIDPlusFolder" (or a similar 
> interface) to the mailet API or to a third party ASL2 licensed project. We 
> can then add a sourceforge project that include the GPL maildir and the 
> GPL plugin including our ASL interface. People then will have Maildir 
> support in james: is this right?
>
> Stefano

This is a borderline case. And this is not in the interest of people using 
Apache software.
A major point not to include or support code under the GPL is to keep a 
clear license situation.

Markus 

---------------------------------------------------------------------
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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
Noel J. Bergman wrote:
> Stefano Bagnara wrote:
>> Noel J. Bergman wrote:
>>> Stefano Bagnara wrote:
>>>> I think we could write a simple implementation of MailRepository
>>>> over Javamail MailStore and support the UID specific behaviour
>>>> via reflection.
>>> If you have to write reflective code then you are bypassing the
>>> standard JavaMail interface, and touching GPL code, contaminating
>>> our entire codebase.
>> javamail store interface not supporting a way to retrieve a message
>> you just stored to it.
> 
> If GPL code includes methods that are not present in the javax.* API, you cannot use them without infecting the code.
> 
> 	--- Noel

Maybe I'm not able to explain what I want to know.

I know what the GPL is and I also know about the differences in the 
interpretations by Apache lawyers and FSF, but this is not the point.

I asked for a solution, not for explanations of the problem ;-)

We can add the "imaginary.javax.mail.UIDPlusFolder" (or a similar 
interface) to the mailet API or to a third party ASL2 licensed project. 
We can then add a sourceforge project that include the GPL maildir and 
the GPL plugin including our ASL interface. People then will have 
Maildir support in james: is this right?

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-461) Maildir support

Posted by "Noel J. Bergman" <no...@devtech.com>.
Stefano Bagnara wrote:
> Noel J. Bergman wrote:
>> Stefano Bagnara wrote:
>>> I think we could write a simple implementation of MailRepository
>>> over Javamail MailStore and support the UID specific behaviour
>>> via reflection.
>> If you have to write reflective code then you are bypassing the
>> standard JavaMail interface, and touching GPL code, contaminating
>> our entire codebase.
> javamail store interface not supporting a way to retrieve a message
> you just stored to it.

If GPL code includes methods that are not present in the javax.* API, you cannot use them without infecting the code.

	--- 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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
Noel J. Bergman wrote:
> Stefano Bagnara wrote:
> 
>> I think we could write a simple implementation of MailRepository over 
>> Javamail MailStore and support the UID specific behaviour via reflection.
> 
> No!  If you have to write reflective code then you are bypassing the standard JavaMail interface, and touching GPL code, contaminating our entire codebase.

Noel, can you download the contribution and tell me where is the GPL 
violation? Otherwise maybe we confuse apples and oranges.

Can you make any propositive contribution about the issue itself: 
javamail store interface not supporting a way to retrieve a message you 
just stored to it.

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-461) Maildir support

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

> I think we could write a simple implementation of MailRepository over 
> Javamail MailStore and support the UID specific behaviour via reflection.

No!  If you have to write reflective code then you are bypassing the standard JavaMail interface, and touching GPL code, contaminating our entire codebase.

As for Norman's question, "Why we should not do it?", it is important to have code usable by the world, not just the FSF.  ASF code is open for *everyone*, including people who build proprietary, turnkey, solutions embedding our code.  If someone wants to write a suitable maildir implementation, fine.

	--- 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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
My opinion is that we should use reflection for that so we don't have to 
introduce "imaginary.javax" packages/interfaces.

The best of both worlds would also be to have a workaround (based on the 
md5 hash hack for each message we discussed before) for stores not 
implementing this "method".

What do you think?

Stefano

Joachim Draeger (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-461?page=comments#action_12412302 ] 
> 
> Joachim Draeger commented on JAMES-461:
> ---------------------------------------
> 
> No, it isn't necessary to patch javamail. I don't think it's a big problem to contribute that few, little but powerful methods to javamaildir.
> The problem is how to access that methods because javamail nonsensically doesn't offer such an interface (UIDPlusFolder). (But using that methods in the class  IMAPFolder)
> I'm not willing to accept this seeming insuperable borders between Apache and GPL. There is a good java implementation of maildir, we should use it.
> In a worst case we could use reflection to avoid strong dependencies.
> 
> To clarify the original problem: When you store a mail in a javamail Folder, a copy get's stored and it is not possible to find that copy again. So  this doesn't fit in James MailStore contract.
> 
>> Maildir support
>> ---------------
>>
>>          Key: JAMES-461
>>          URL: http://issues.apache.org/jira/browse/JAMES-461
>>      Project: James
>>         Type: New Feature
> 
>>   Components: MailStore & MailRepository
>>     Reporter: Norman Maurer
>>      Fix For: 2.4.0
>>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>>
>> Add Maildir support..
> 



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


[jira] Commented: (JAMES-461) Maildir support

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

Joachim Draeger commented on JAMES-461:
---------------------------------------

No, it isn't necessary to patch javamail. I don't think it's a big problem to contribute that few, little but powerful methods to javamaildir.
The problem is how to access that methods because javamail nonsensically doesn't offer such an interface (UIDPlusFolder). (But using that methods in the class  IMAPFolder)
I'm not willing to accept this seeming insuperable borders between Apache and GPL. There is a good java implementation of maildir, we should use it.
In a worst case we could use reflection to avoid strong dependencies.

To clarify the original problem: When you store a mail in a javamail Folder, a copy get's stored and it is not possible to find that copy again. So  this doesn't fit in James MailStore contract.

> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Joachim Draeger updated JAMES-461:
----------------------------------

    Attachment: diff_to-javamaildir-0.7-pre1-2.diff

patch to javamaildir-0.7-pre1 for javamailstore-mailrepository-4

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip, diff_to-javamaildir-0.7-pre1-2.diff, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Joachim Draeger updated JAMES-461:
----------------------------------

    Attachment: javamailstore-mailrepository-4.zip

javamailstore-mailrepository-4

  * HashJavamailStoreMailRepository always allows to deliver to a closed
    folder. It opens the folder for getMessageCount() only if necessary
  * HashJavamailStoreMailRepository was missing capability to update 
    message when store got called with an existing key
  * UIDPlusFolderMailRepository tries first to deliver to a closed folder. 
    If IllegalStateException was caught it retries on the opened folder.  
  * Flag.RECENT is set on MimeMessage before passed to JavaMail Store
  * when using javamaildir, new messages should stay in the new folder
    until list() or retrieve() is called on Repository.
    thanks to Norman for reporting this!  
  * tested with James-2.3.0b1

see INSTALL.txt

A completely compatible javamaildir version (greater than 0.7-pre1) is on the way, I will announce it here. I provide unofficial prerelease by private email for the impatient! :-)

I appreciate any feedback! Success, issues, bad style... :-)


> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

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

Stefano Bagnara updated JAMES-461:
----------------------------------

    Attachment: MaildirMailRepository.java

I removed all but one of the references to javamaildir.
I added a TODO to the last call that should be replaced.
It still will not be compliant to the mailrepository contract but maybe it will work because of the current usage of the mailrepository bundled objects by james.

If somewhere in the james code we expect to find a message in a repository by name after having stored it this repository will not work.


> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature
>     Reporter: Norman Maurer
>  Attachments: MaildirMailRepository.java, MaildirMailRepository.java
>
> Add Maildir support..

-- 
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-461) Maildir support

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

Norman Maurer commented on JAMES-461:
-------------------------------------

Not yet.. But maybe someone else..  How you solve the problem in MboxMailRepository.. Maybe we can use something like in there..


> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature
>     Reporter: Norman Maurer
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java
>
> Add Maildir support..

-- 
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] Assigned: (JAMES-461) Javamail Store based MailRepository support (was: Maildir support)

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

Stefano Bagnara reassigned JAMES-461:
-------------------------------------

    Assign To: Stefano Bagnara

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Norman Maurer updated JAMES-461:
--------------------------------

    Attachment: javamailstore-mailrepository-5.jar

I did two fixes on joachims great work:

- fix the path where the messages get stored
- connect the store



> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>                 Key: JAMES-461
>                 URL: http://issues.apache.org/jira/browse/JAMES-461
>             Project: James
>          Issue Type: New Feature
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Stefano Bagnara
>             Fix For: 3.0
>
>         Attachments: diff_to-javamaildir-0.7-pre1-2.diff, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip, javamailstore-mailrepository-5.jar, JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

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

Stefano Bagnara commented on JAMES-461:
---------------------------------------

Here is a problematic scenario:

Iterator i1 = repos.list();
Iterator i2 = repos.list();
repos.retrieve(i1.next());

IMHO the second call to repos.list() reset/renew the uniqToMessageNumber hashtable and it will prevent the following retrieve from working.

MailRepository MUST be thread safe, so we cannot relay on the exact sequence list=>retrieve. Another thread could run another list before our retrieve.

Any idea on how to solve this?


> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature
>     Reporter: Norman Maurer
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java
>
> Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

I proposed UIDFolderPlus to javamail interest, let's say what Bill Shannon thinks about it.
http://archives.java.sun.com/cgi-bin/wa?A2=ind0609&L=javamail-interest&F=&S=&P=78

I also think that we could start including the "Javamail Store based MailRepository" into the source repository now that we found a license compatible javamail store implementation (MStore => file based, mbox format, repository). If MStor works like expected this is indeed a great news for our IMAP roadmap as we don't need to depend on javamaildir and we don't have to wait for a in house development of the JDBC based javamail store.

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>                 Key: JAMES-461
>                 URL: http://issues.apache.org/jira/browse/JAMES-461
>             Project: James
>          Issue Type: New Feature
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Stefano Bagnara
>             Fix For: 3.0
>
>         Attachments: diff_to-javamaildir-0.7-pre1-2.diff, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip, JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

Posted by Stefano Bagnara <ap...@bago.org>.
I think we could write a simple implementation of MailRepository over 
Javamail MailStore and support the UID specific behaviour via reflection.

We do not support directly Maildir, but any Javamail Store.
That said, it is true that we'll never distribute James with that 
implementation of Maildir, but many users could find it useful to be 
able to download the GPL library, put it in the SAR-INF/lib folder, add 
a configuration in the config.xml (simply the store url, as Javamail 
already automatically handle the "providers" declaration).

Stefano

Noel J. Bergman (JIRA) wrote:
>     [ http://issues.apache.org/jira/browse/JAMES-461?page=comments#action_12412347 ] 
> 
> Noel J. Bergman commented on JAMES-461:
> ---------------------------------------
> 
> We cannot use any GPL code.  Period.  It will not happen.   If someone wants to write a new maildir implementation using an acceptable license, that's fine.
> 
>> Maildir support
>> ---------------
>>
>>          Key: JAMES-461
>>          URL: http://issues.apache.org/jira/browse/JAMES-461
>>      Project: James
>>         Type: New Feature
> 
>>   Components: MailStore & MailRepository
>>     Reporter: Norman Maurer
>>      Fix For: 2.4.0
>>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>>
>> Add Maildir support..
> 



---------------------------------------------------------------------
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-461) Maildir support

Posted by Norman Maurer <nm...@byteaction.de>.
I fully agree with Stefano. Why we should not do it ? People who want to
use mysql also must download the connector by hand..

bye
Norman

Am Donnerstag, den 18.05.2006, 16:04 +0200 schrieb Stefano Bagnara:
> I think we could write a simple implementation of MailRepository over 
> Javamail MailStore and support the UID specific behaviour via reflection.
> 
> We do not support directly Maildir, but any Javamail Store.
> That said, it is true that we'll never distribute James with that 
> implementation of Maildir, but many users could find it useful to be 
> able to download the GPL library, put it in the SAR-INF/lib folder, add 
> a configuration in the config.xml (simply the store url, as Javamail 
> already automatically handle the "providers" declaration).
> 
> Stefano
> 
> Noel J. Bergman (JIRA) wrote:
> >     [ http://issues.apache.org/jira/browse/JAMES-461?page=comments#action_12412347 ] 
> > 
> > Noel J. Bergman commented on JAMES-461:
> > ---------------------------------------
> > 
> > We cannot use any GPL code.  Period.  It will not happen.   If someone wants to write a new maildir implementation using an acceptable license, that's fine.
> > 
> >> Maildir support
> >> ---------------
> >>
> >>          Key: JAMES-461
> >>          URL: http://issues.apache.org/jira/browse/JAMES-461
> >>      Project: James
> >>         Type: New Feature
> > 
> >>   Components: MailStore & MailRepository
> >>     Reporter: Norman Maurer
> >>      Fix For: 2.4.0
> >>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
> >>
> >> Add Maildir support..
> > 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> !EXCUBATOR:1,446c80d937022701467214!

[jira] Commented: (JAMES-461) Maildir support

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

Noel J. Bergman commented on JAMES-461:
---------------------------------------

We cannot use any GPL code.  Period.  It will not happen.   If someone wants to write a new maildir implementation using an acceptable license, that's fine.

> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Joachim Draeger commented on JAMES-461:
---------------------------------------

1. Please note that it is much easier to add the jars than described above: see INSTALL.txt. (Thanks to Norman)

2. There is an issue with storing messages and the Flag.RECENT. 
At the moment messages are stored, after opening the JavaMail Folder. This may cause that the RECENT Flag is removed after storing. In Maildir this means that the message gets moved immediately from the new into the cur folder.
AFAIK James doesn't care about the RECENT Flag and POP3 doesn't make a difference at all. 
Apart from that: It is impossible to preserve the RECENT Flag between MailRepository.list() and retrieve() with JavaMail API.
An IMAP enabled MessageRepository would have to be some kind of session agnostic. 
Anyway: I'll try to make it deliver to closed Folders. That way we would fulfill the contract for 3rd party apps accessing e.g. Maildir directly. The IMAP server will also need that.

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip, javamailstore-mailrepository-3.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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


Unfortunately mstor does not support any UID capabilities. So it is not suitable as an IMAP backend. And I guess it does not fully support the needed flags. (didn't test it).
>From my point of view the IMAP blocker is not the lack of a suitable implementation but of new repository *API* for James. 
It would be a pleasure for me starting with or helping on a corresponding JDBC implementation after some decisions have been made how the API should look like.

At the moment I would be +0 for including javamailstore-mailrepository into trunk because I hope for a new API in James that fits the needs of JavaMail a bit better. 
The current "client" generated permanent key in MailRepository is totally incompatible with the requirements of mbox, IMAP and JavaMail.

Joachim

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>                 Key: JAMES-461
>                 URL: http://issues.apache.org/jira/browse/JAMES-461
>             Project: James
>          Issue Type: New Feature
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Stefano Bagnara
>             Fix For: 3.0
>
>         Attachments: diff_to-javamaildir-0.7-pre1-2.diff, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip, javamailstore-mailrepository-5.jar, JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

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

Norman Maurer updated JAMES-461:
--------------------------------

    Attachment: JavamailStoreMailRepository.java

Rename the class and fix the TODO

> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature
>     Reporter: Norman Maurer
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java
>
> Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Stefano Bagnara updated JAMES-461:
----------------------------------

        Summary: Javamail Store based MailRepository support (was: Maildir support)  (was: Maildir support)
    Description: Add support for Javamail Stores as MailRepositories  (was: Add Maildir support..)

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

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

Norman Maurer updated JAMES-461:
--------------------------------

    Attachment: MaildirMailRepository.java

First Version based un the patch of alex.. This need the javamail.jar for compile :-(

> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature
>     Reporter: Norman Maurer
>  Attachments: MaildirMailRepository.java
>
> Add Maildir support..

-- 
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-461) Maildir support

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

Stefano Bagnara commented on JAMES-461:
---------------------------------------

It is ok if it needs javamail. The problematic import is the one from "javamailDIR".

You should use MimeMessage instead of MaildirMessage.
The problem is the missing getUniq method.

But reviewing the code I see further problems: using that code you are not able to retrieve a message from a repository given the message key (name) without a prior "list()" call. This is not part of the "repository contract".

If we cannot find a workaround for this we probably should wait until we'll refactor the repository interface so that the store() return an handler to retrieve the message later.


> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature
>     Reporter: Norman Maurer
>  Attachments: MaildirMailRepository.java
>
> Add Maildir support..

-- 
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-461) Maildir support

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

Stefano Bagnara updated JAMES-461:
----------------------------------

      Component: MailStore & MailRepository
    Fix Version: 2.4.0

> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java
>
> Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support

Posted by Joachim Draeger <jd...@joachim-draeger.de>.
Hi!

"There should be a more convenient way. Is there?"

Is there? :-) How to add a Jar to the core of James without going so deep? Maybe 
just as easy as placing a custom Mailet into the ext folder.

Joachim


Joachim Draeger (JIRA) schrieb:

> To setup a Javamail store MailRepository you have to make sure the corresponding Javamail implementation, e.g. javamaildir-0.6.2.jar, is added at the SAR-INF/lib directory of the james.sar. To check this, you can open james.sar with your favorite ZIP packer.
> 
> 1. possibility: put the jar in the lib directory of the trunk and modify  include.properties and build.xml
> 
> Index: B:/java/jamesws/JamesSecondTrunk/build.xml
> ===================================================================
> --- B:/java/jamesws/JamesSecondTrunk/build.xml	(revision 409878)
> +++ B:/java/jamesws/JamesSecondTrunk/build.xml	(working copy)
> @@ -503,6 +503,7 @@
>            <include name="${excalibur-datasource.jar}"/>
>            <include name="${javax-activation.jar}"/>
>            <include name="${javax-mail.jar}"/>
> +          <include name="${javamaildir.jar}"/>
>            <include name="${commons-dbcp.jar}"/>
>            <include name="${commons-pool.jar}"/>
>            <include name="${bcmail.jar}"/>
> 
> Index: B:/java/jamesws/JamesSecondTrunk/include.properties
> ===================================================================
> --- B:/java/jamesws/JamesSecondTrunk/include.properties	(revision 409878)
> +++ B:/java/jamesws/JamesSecondTrunk/include.properties	(working copy)
> @@ -42,6 +42,9 @@
>  # ----- Activation -----
>  javax-activation.jar=${activation.id}.jar
>  
> +# ----- javamaildir
> +javamaildir.jar=javamaildir-0.6.2.jar
> +
>  # ----- DNS -----
>  dns.jar=dnsjava-2.0.1.jar
> 
> then run ant. 
> 
> 2. possibility: open james.sar with you favorite zip packer and inject the jar directly into the SAR-INF/lib directory.
> 
> I don't like both methods. There should be a more convenient way. Is there?
> 
> Of course you have to add JavamailStoreMailRepository code, too. You can do this by putting source files directly into the src/java directory of the trunk. Another way, that has the advantage of not touching your working copy, is to build a jar of the code first and add it like the javamail store implementation explained above.
>

---------------------------------------------------------------------
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-461) Javamail Store based MailRepository support

Posted by Norman Maurer <nm...@byteaction.de>.
Hi,

just create a lib folder in the SAR-INF and place it there.

For example:

/james-xxx/apps/james/SAR-INF/lib/your.jar

bye
Norman

Am Samstag, den 03.06.2006, 10:29 +0200 schrieb Joachim Draeger:
> Hi!
> 
> "There should be a more convenient way. Is there?"
> 
> Is there? :-) How to add a Jar to the core of James without going so deep? Maybe 
> just as easy as placing a custom Mailet into the ext folder.
> 
> Joachim
> 
> 
> Joachim Draeger (JIRA) schrieb:
> 
> > To setup a Javamail store MailRepository you have to make sure the corresponding Javamail implementation, e.g. javamaildir-0.6.2.jar, is added at the SAR-INF/lib directory of the james.sar. To check this, you can open james.sar with your favorite ZIP packer.
> > 
> > 1. possibility: put the jar in the lib directory of the trunk and modify  include.properties and build.xml
> > 
> > Index: B:/java/jamesws/JamesSecondTrunk/build.xml
> > ===================================================================
> > --- B:/java/jamesws/JamesSecondTrunk/build.xml	(revision 409878)
> > +++ B:/java/jamesws/JamesSecondTrunk/build.xml	(working copy)
> > @@ -503,6 +503,7 @@
> >            <include name="${excalibur-datasource.jar}"/>
> >            <include name="${javax-activation.jar}"/>
> >            <include name="${javax-mail.jar}"/>
> > +          <include name="${javamaildir.jar}"/>
> >            <include name="${commons-dbcp.jar}"/>
> >            <include name="${commons-pool.jar}"/>
> >            <include name="${bcmail.jar}"/>
> > 
> > Index: B:/java/jamesws/JamesSecondTrunk/include.properties
> > ===================================================================
> > --- B:/java/jamesws/JamesSecondTrunk/include.properties	(revision 409878)
> > +++ B:/java/jamesws/JamesSecondTrunk/include.properties	(working copy)
> > @@ -42,6 +42,9 @@
> >  # ----- Activation -----
> >  javax-activation.jar=${activation.id}.jar
> >  
> > +# ----- javamaildir
> > +javamaildir.jar=javamaildir-0.6.2.jar
> > +
> >  # ----- DNS -----
> >  dns.jar=dnsjava-2.0.1.jar
> > 
> > then run ant. 
> > 
> > 2. possibility: open james.sar with you favorite zip packer and inject the jar directly into the SAR-INF/lib directory.
> > 
> > I don't like both methods. There should be a more convenient way. Is there?
> > 
> > Of course you have to add JavamailStoreMailRepository code, too. You can do this by putting source files directly into the src/java directory of the trunk. Another way, that has the advantage of not touching your working copy, is to build a jar of the code first and add it like the javamail store implementation explained above.
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 
> !EXCUBATOR:1,44814a2c37021649247318!

[jira] Commented: (JAMES-461) Javamail Store based MailRepository support (was: Maildir support)

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

Joachim Draeger commented on JAMES-461:
---------------------------------------



To setup a Javamail store MailRepository you have to make sure the corresponding Javamail implementation, e.g. javamaildir-0.6.2.jar, is added at the SAR-INF/lib directory of the james.sar. To check this, you can open james.sar with your favorite ZIP packer.

1. possibility: put the jar in the lib directory of the trunk and modify  include.properties and build.xml

Index: B:/java/jamesws/JamesSecondTrunk/build.xml
===================================================================
--- B:/java/jamesws/JamesSecondTrunk/build.xml	(revision 409878)
+++ B:/java/jamesws/JamesSecondTrunk/build.xml	(working copy)
@@ -503,6 +503,7 @@
           <include name="${excalibur-datasource.jar}"/>
           <include name="${javax-activation.jar}"/>
           <include name="${javax-mail.jar}"/>
+          <include name="${javamaildir.jar}"/>
           <include name="${commons-dbcp.jar}"/>
           <include name="${commons-pool.jar}"/>
           <include name="${bcmail.jar}"/>

Index: B:/java/jamesws/JamesSecondTrunk/include.properties
===================================================================
--- B:/java/jamesws/JamesSecondTrunk/include.properties	(revision 409878)
+++ B:/java/jamesws/JamesSecondTrunk/include.properties	(working copy)
@@ -42,6 +42,9 @@
 # ----- Activation -----
 javax-activation.jar=${activation.id}.jar
 
+# ----- javamaildir
+javamaildir.jar=javamaildir-0.6.2.jar
+
 # ----- DNS -----
 dns.jar=dnsjava-2.0.1.jar

then run ant. 

2. possibility: open james.sar with you favorite zip packer and inject the jar directly into the SAR-INF/lib directory.

I don't like both methods. There should be a more convenient way. Is there?

Of course you have to add JavamailStoreMailRepository code, too. You can do this by putting source files directly into the src/java directory of the trunk. Another way, that has the advantage of not touching your working copy, is to build a jar of the code first and add it like the javamail store implementation explained above.


> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

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

Joachim Draeger updated JAMES-461:
----------------------------------

    Attachment: UIDPlusFolderMailRepository1.zip

This is my proposal for the Maildir access in James. 
For better traceability i have extendet Alexander's and Norman's efforts. 
I think it's the right approach to access Maildir through the existing implementation (javamaildir) and if needed contribute back to it.
By the way, Javamail would be a sufficient backend for a imap, one of the most missed features in James. 
I have made some progress getting the existing imap code to run that way, more to it later.

My solution to the "James message key to Javamail message" problem depends on the UID capabilities of Javamail and Javamaildir. That is managed by the UIDFolder http://java.sun.com/products/javamail/javadocs/javax/mail/UIDFolder.html interface which is implemented by MaildirFolder. Unfortunately Javamail has imho a few design deficiencies. You cannot determine which uid a stored message is assigned. The IMAPFolder has such methods: http://java.sun.com/products/javamail/javadocs/com/sun/mail/imap/IMAPFolder.html#appendUIDMessages(javax.mail.Message[]) 
Why the didn't they encapsulate that important functionality in an extra interface?
I wrote a patch for javamaildir-0.6.2 (just a few lines) to implement that imaginary interface (UIDPlusFolder) and a MailRepository implementation which should work with any Javamail store which Folder implements that UIDPlusFolder interface.

Imo at the moment there is no way to implement this in pure Javamail. Maybe it is possible to implement an universal Javamail store adapter for James depending on MD5 sums etc, but that would cost the biggest Maildir advantage: speed.
I guess it is no problem to ask to include that few new methods in javamaildir, which allow getting UIDs for added messages.
Asking for including UIDPlusFolder in Javamail is an attempt worth, but will surely take years. 
Without common interface there are these ugly licensing problems and dependencies again. But we shouldn't get slow down by that. In a worst case
needed methods could be called via reflection. (i hate the word impossible) 
Maven2 could maybe make things easier, too.

What do you think, could this be an solution to fulfill the James MailStore contract?

Some notes for running the code:

 * The code is some kind of "proof-of-concept" and not really testet. (messages are stored and loaded, log looks good)

 * I run it in a test enviroment using trunk r399103 (it should run with newer/older versions too)
 
 * It depends on javamail-1.4.0.

 * The java-maildir-0.6.2-UIDPlusFolder.patch has to be applied to the archive from http://devel.priocom.com/~zhukov/javamaildir/ the resulting jar is needed to compile UIDPlusFolderMailRepository because of the UIDPlusFolder interface (I can send you a copy of the resulting jar by private email, just ask)
   
 Joachim Draeger <jd at joachim-draeger.de>
 
 Cologne, Germany, 2006-05-16

> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Joachim Draeger commented on JAMES-461:
---------------------------------------

Issue in  JavamailStoreMailRepository2.zip: When accessed by multiple threads, Folder should be closed when all have finished. (remove getOpenedFolder in favour of getFolder and void openFolder, increment a counter in openFolder,  synchronized void closeFolder: decrement counter, close when 0)

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Norman Maurer commented on JAMES-461:
-------------------------------------

Just after a quick review it seems to be nice work. Will install it tomorrow and test it a bit . Thx for your help and work.

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Maildir support

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

Norman Maurer commented on JAMES-461:
-------------------------------------

Nice to see that people work on james :-)
I will test your patch tomorrow. But the main problem with this is that we need to patch javamail. Thats really ugly :-( BTW i don'T think that if you contribute this patches to javamail that they will ever be included. 

Maybe we can find a other solution... 

thx anyway

> Maildir support
> ---------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add Maildir support..

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Joachim Draeger updated JAMES-461:
----------------------------------

    Attachment: javamailstore-mailrepository-3.zip


javamailstore-mailrepository-3
     
  * folder is now accessed through a gatekeeper that manages open/close operation
    this allows access by concurrent threads
  * introduced several interfaces for easier mock based tests  
  * ant build
  * jMock based interaction/behavior tests
  * optional code coverage analysis by cobertura
  
 Oh, "mock framework" and "code coverage", isn't that a bit overkill?
 Mmhhhh.. let me think... No!
 I think xMock can always be useful even if only used for a few lines. Making a  code coverage analysis showed me a few missing important test cases (not only to reach the 100%)
 Okay, maybe I mocked a bit to low level. But I wanted to evaluate how it can 
 help. The build process with integrated code coverage analysis was made for
 evaluation too. Looking forward to imap! :-)
 I'll drop a few lines, why I have decided for jMock and Cobertura soon.

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip, javamailstore-mailrepository-3.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Javamail Store based MailRepository support

Posted by Joachim Draeger <jd...@joachim-draeger.de>.
Norman Maurer (JIRA) wrote:

> After first test i don't get it to work. 

I think we should discuss this on the mailing list and post the 
conclusions to Jira. A couple of comments like: "it doesn't work" "try 
this" will make it hard to read. :-)

> 1. It don't seems to create the inboxes folder. I have set the mailstore logging level to DEBUG. No exceptions seen here
> 2. When try login via pop3 it just disconnect after the pass is passed. I also changed here the logging level. No exceptions found. Should it not throw and illegalStateException ?

I have now tried the needed steps on a fresh checkout. If there was 
something missing it threw an exception. So I can't reproduce your 
issue. Could you please provide config.xml and mailstore-x.log.

Joachim

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


[jira] Commented: (JAMES-461) Javamail Store based MailRepository support (was: Maildir support)

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

Norman Maurer commented on JAMES-461:
-------------------------------------

After first test i don't get it to work. 

1. It don't seems to create the inboxes folder. I have set the mailstore logging level to DEBUG. No exceptions seen here
2. When try login via pop3 it just disconnect after the pass is passed. I also changed here the logging level. No exceptions found. Should it not throw and illegalStateException ?


> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 2.4.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

mstor provide to store metadata (flags etc ) to xml files so it should be ok. See: http://mstor.sourceforge.net/features.html

 

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>                 Key: JAMES-461
>                 URL: http://issues.apache.org/jira/browse/JAMES-461
>             Project: James
>          Issue Type: New Feature
>          Components: MailStore & MailRepository
>            Reporter: Norman Maurer
>         Assigned To: Stefano Bagnara
>             Fix For: 3.0
>
>         Attachments: diff_to-javamaildir-0.7-pre1-2.diff, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip, javamailstore-mailrepository-5.jar, JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip
>
>
> Add support for Javamail Stores as MailRepositories

-- 
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-461) Javamail Store based MailRepository support (was: Maildir support)

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

Norman Maurer updated JAMES-461:
--------------------------------

    Fix Version: 3.0
                     (was: 2.4.0)

> Javamail Store based MailRepository support (was: Maildir support)
> ------------------------------------------------------------------
>
>          Key: JAMES-461
>          URL: http://issues.apache.org/jira/browse/JAMES-461
>      Project: James
>         Type: New Feature

>   Components: MailStore & MailRepository
>     Reporter: Norman Maurer
>     Assignee: Stefano Bagnara
>      Fix For: 3.0
>  Attachments: JavamailStoreMailRepository.java, JavamailStoreMailRepository2.zip, MaildirMailRepository.java, MaildirMailRepository.java, UIDPlusFolderMailRepository1.zip, diff_to-javamaildir-0.7-pre1-2.diff, javamailstore-mailrepository-3.zip, javamailstore-mailrepository-4.zip
>
> Add support for Javamail Stores as MailRepositories

-- 
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