Re: deploying james sites
On 07/30/2011 06:35 AM, Eric Charles wrote: On 30/07/11 06:25, Eric Charles wrote: What are the right steps to deploy updated site and reports? We talked about the reports some time ago and decided to have two separate sites: the end user site and the site with reports. The goal was not to have the public site with some reports, even if it's true that previous mime4j site had such reports. I think you could copy some definitions from the site-reports profile to get this reports in the public web site. For project, server... I invoke 'mvn site', and after I scp the generated files to people apache org. I think it should even work when you deploy it using maven 'mvn site-deploy'. - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
Re: deploying james sites
On 30/07/11 06:25, Eric Charles wrote: What are the right steps to deploy updated site and reports? We talked about the reports some time ago and decided to have two separate sites: the end user site and the site with reports. The goal was not to have the public site with some reports, even if it's true that previous mime4j site had such reports. I think you could copy some definitions from the site-reports profile to get this reports in the public web site. For project, server... I invoke 'mvn site', and after I scp the generated files to people apache org. -- Eric Charles http://about.echarles.net - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
Re: deploying james sites
Hi Stefano, On 30/07/11 00:42, Stefano Bagnara wrote: I guess it's an year or more I don't deploy james websites and I found I don't know the updated way to do that. I see the svn folder james/sites/trunk/www is outdated so I guess we don't use it anymore (what about removing it?). It is not used for now, but the goal is to recommit updated sites there, and ask Apache Infra to SvnPubSub so we don't have to svn up and wait the sync for now. How am I supposed to update the web site? I tried site:deploy for the project, but it doesn't deploy the full site "mvn -Psite-reports site" creates the reports, but overwrite the index from the previous command. What are the right steps to deploy updated site and reports? We talked about the reports some time ago and decided to have two separate sites: the end user site and the site with reports. The goal was not to have the public site with some reports, even if it's true that previous mime4j site had such reports. I think you could copy some definitions from the site-reports profile to get this reports in the public web site. Also, I see the html generated from apt sources for mime4j don't produce anymore valid html (bad links): is this something related to newer maven site plugins? Do you know anything about this before I start digging it? For server, I remember I migrated the few apt to some xml (just to have a uniform format). I suppose the issue come from the new maven 3 site plugins. No idea how to solve it. Eventually, you can migrate the apt to the xml. Stefano - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org -- Eric Charles http://about.echarles.net - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
deploying james sites
I guess it's an year or more I don't deploy james websites and I found I don't know the updated way to do that. I see the svn folder james/sites/trunk/www is outdated so I guess we don't use it anymore (what about removing it?). How am I supposed to update the web site? I tried site:deploy for the project, but it doesn't deploy the full site "mvn -Psite-reports site" creates the reports, but overwrite the index from the previous command. What are the right steps to deploy updated site and reports? Also, I see the html generated from apt sources for mime4j don't produce anymore valid html (bad links): is this something related to newer maven site plugins? Do you know anything about this before I start digging it? Stefano - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1152390 - in /james/jdkim/trunk: pom.xml src/site/xdoc/index.xml
Author: bago Date: Fri Jul 29 22:14:57 2011 New Revision: 1152390 URL: http://svn.apache.org/viewvc?rev=1152390&view=rev Log: Update James jDKIM site to reflect jDKIM 0.2 release and update scm url for site deploy Modified: james/jdkim/trunk/pom.xml james/jdkim/trunk/src/site/xdoc/index.xml Modified: james/jdkim/trunk/pom.xml URL: http://svn.apache.org/viewvc/james/jdkim/trunk/pom.xml?rev=1152390&r1=1152389&r2=1152390&view=diff == --- james/jdkim/trunk/pom.xml (original) +++ james/jdkim/trunk/pom.xml Fri Jul 29 22:14:57 2011 @@ -46,7 +46,7 @@ jdkim-current-website - scp://people.apache.org/www/james.apache.org/jdkim/current/ +scp://people.apache.org/www/james.apache.org/jdkim/ Modified: james/jdkim/trunk/src/site/xdoc/index.xml URL: http://svn.apache.org/viewvc/james/jdkim/trunk/src/site/xdoc/index.xml?rev=1152390&r1=1152389&r2=1152390&view=diff == --- james/jdkim/trunk/src/site/xdoc/index.xml (original) +++ james/jdkim/trunk/src/site/xdoc/index.xml Fri Jul 29 22:14:57 2011 @@ -31,16 +31,28 @@ It provides both verification and signing and also provides Mailets for the Apache JAMES project. - + + + The 0.2 release is the first release. It requires Java 1.5 at + runtime and it requires the JVM running the library to support + SHA256withRSA cypher suite. The default Sun Java 1.5 does support this + suite. If your JVM doesn't support it you can install a third party + cryptography provider like BouncyCastle and configure it appropriately + in your JVM. + + + + The architecture is thought to handle multiple signatures with + performance in mind: body hashing for multiple signatures is computed + concurrently in a single stream run. + + - The 0.2 release is the first release. It requires Java - 1.4 at runtime but for full compliance with the DKIM - specification the JVM running the library must support - SHA256withRSA cypher suite. The default Sun Java 1.4 - does not support this suite, so either you move to Java - 1.5+ or you install a third party cryptography provider - like BouncyCastle and configure it appropriately in your - JVM. + The whole internal verification/signing is done via OutputStream + leaving much more flexibility than the use of InputStream. As the + InputStream approach is easier from the user side the default + implementation simply prepare the OutputStream and copy the supplied + InputStream to the OutputStream. - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1152386 - in /james/project/trunk/project/src/site/xdoc: download.xml index.xml newsarchive.xml
Author: bago Date: Fri Jul 29 22:08:47 2011 New Revision: 1152386 URL: http://svn.apache.org/viewvc?rev=1152386&view=rev Log: Update main James site to reflect jDKIM 0.2 release Modified: james/project/trunk/project/src/site/xdoc/download.xml james/project/trunk/project/src/site/xdoc/index.xml james/project/trunk/project/src/site/xdoc/newsarchive.xml Modified: james/project/trunk/project/src/site/xdoc/download.xml URL: http://svn.apache.org/viewvc/james/project/trunk/project/src/site/xdoc/download.xml?rev=1152386&r1=1152385&r2=1152386&view=diff == --- james/project/trunk/project/src/site/xdoc/download.xml (original) +++ james/project/trunk/project/src/site/xdoc/download.xml Fri Jul 29 22:08:47 2011 @@ -63,6 +63,7 @@ is found Apache James Server Apache James Mime4j Apache James jSPF + Apache James jDKIM Apache James JSieve Apache James Mailet Apache James Mailet Base @@ -325,6 +326,41 @@ is found +Apache James jDKIM 0.2 +The Apache James Project is happy to announce + the release of version 0.2 of the Apache James jDKIM library. +jDKIM is a DKIM implementation library written in Java. It provides + both verification and signing and also provides Mailets for the + Apache JAMES project. +This is the first official release of the library, but the code has + been in production almost unchanged since two years. +https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310990&version=12314300";>Read the release notes. Apache James Mime4J 0.7 The Apache James Project is happy to announce - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Resolved] (MAILBOX-110) Possible race-condition because of lazy fetching
[ https://issues.apache.org/jira/browse/MAILBOX-110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Norman Maurer resolved MAILBOX-110. --- Resolution: Fixed I think we did everything we can in the api > Possible race-condition because of lazy fetching > > > Key: MAILBOX-110 > URL: https://issues.apache.org/jira/browse/MAILBOX-110 > Project: James Mailbox > Issue Type: Bug > Components: api, store >Affects Versions: 0.3 >Reporter: Norman Maurer >Assignee: Norman Maurer > Fix For: 0.4 > > > From ml: > Hi there, > today I tried to stress-test james IMAP and see how it behaves. During > this I noticed there is a possible race-condition when concurrent > access a mailbox from many clients. > So let me explain what happens: > * The first client fetch a ranges of mails (say 1:5000) > * The second client does at the same time set the \DELETED flag on > message with msn 4500 and then trigger "EXPUNGE". > If the second client was able to execute the EXPUNGE before the first > was trying to return message 4500 it will cause prolly cause problems > to client one. As it will maybe try to get the headers in lazy fashion > (like for example load them via JPA because they are declared via > @LOB). This will fail as these rows not exist anymore. > The same scenario can gives problems with maildir impls as the message > file may not exist anymore. > So to fix this we should prolly allow to Lock a Mailbox while > accessing data from it. The best would be a read and a write lock. So > we could be quick in read only cases. This will for sure add some > overhead but I think its the best todo. > WDYT ? > Bye, > Norman -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Resolved] (MAILBOX-62) Replace javax.mail.Flags with own implementation
[ https://issues.apache.org/jira/browse/MAILBOX-62?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Norman Maurer resolved MAILBOX-62. -- Resolution: Won't Fix I think this is not necessary anymore > Replace javax.mail.Flags with own implementation > > > Key: MAILBOX-62 > URL: https://issues.apache.org/jira/browse/MAILBOX-62 > Project: James Mailbox > Issue Type: Task > Components: api >Reporter: Norman Maurer >Assignee: Norman Maurer > Fix For: 0.4 > > > At the moment we reuse the javax.mail.Flags class to represent the Flags > which need to get stored for a Message. This is the only reason why this > project even depend on javamail. I think it would make more sense to write > our own "Flag" representation which will maybe allow us later also to easier > store "User Flags" permanent -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Created] (IMAP-328) Better handle concurrent FETCH and EXPUNGE
Better handle concurrent FETCH and EXPUNGE -- Key: IMAP-328 URL: https://issues.apache.org/jira/browse/IMAP-328 Project: JAMES Imap Issue Type: Improvement Affects Versions: 0.2.1 Reporter: Norman Maurer At the moment it MAY be possible for clients which do "slow" FETCHES to fail during stream the message content back to the client of another client (or session) EXPUNGE the same message at the same time. From a talk at ##imap (freenode irc) other IMAP Server implementations handle this kind of stuff more sensible (like dovecot and cyrus). There are a few options to handle this kind of stuff: 1) Lock the mailbox during FETCH and block EXPUNGE until its done 2) Only do a "pseudo" expunge and add it to some "commitlog" which will get executed when the FETCH is done. To be 100 % sure its necessary to store it permanet but I think in most cases a in memory representation MAY be enough I think 2) is the way to go -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[RESULT] [VOTE] Release Apache James jDKIM 0.2
Hi there, the VOTE passed with the following result: +1 Dhrubo, Eric*, Stefano*, Norman* *binding. I just started to deploy the artifacts to the maven repos and uploaded the artifacts to the mirros. @Stefano: Could you update the website please and also send the ANNOUNCE ? Thanks, Norman 2011/7/25 Norman Maurer : > Hi there, > > its time for the second release of jDKIM a.k.a 0.2. > > A list of changes can be found here: > https://issues.apache.org/jira/secure/ReleaseNote.jspa?projectId=12310990&version=12314300 > > The artifacts for review can be found here: > https://repository.apache.org/content/repositories/orgapachejames-031/ > > > So please go ahead and cast your VOTE. > > [ ] +1 Yes, go ahead > [ ] +0 No time for review > [ ] -1 Something wrong > > > Thanks, > Norman > - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1152209 - in /james/mailbox/trunk/store/src: main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java test/java/org/apache/james/mailbox/store/StoreMessageResultIteratorTe
Author: norman Date: Fri Jul 29 13:18:17 2011 New Revision: 1152209 URL: http://svn.apache.org/viewvc?rev=1152209&view=rev Log: Fix batch fetching of messages Added: james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMessageResultIteratorTest.java (with props) Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java Modified: james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java?rev=1152209&r1=1152208&r2=1152209&view=diff == --- james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java (original) +++ james/mailbox/trunk/store/src/main/java/org/apache/james/mailbox/store/StoreMessageResultIterator.java Fri Jul 29 13:18:17 2011 @@ -109,10 +109,9 @@ public class StoreMessageResultIterator< @Override public boolean hasNext() { -if (next == null || !next.hasNext()) { +if (!done && (next == null || !next.hasNext())) { try { MessageRange range; - switch (type) { default: case ALL: @@ -120,7 +119,6 @@ public class StoreMessageResultIterator< break; case FROM: range = MessageRange.from(from); - break; case ONE: range = MessageRange.one(from); @@ -131,13 +129,16 @@ public class StoreMessageResultIterator< } next = mapper.findInMailbox(mailbox, range, ftype, batchSize); +if (!next.hasNext()) { + done = true; +} } catch (MailboxException e) { this.exception = e; done = true; } return !done; } else { -return true; +return !done; } } @@ -156,6 +157,9 @@ public class StoreMessageResultIterator< // move the start UID behind the last fetched message UID if needed if (!next.hasNext()) { from = result.getUid() + 1; +if (result.getUid() >= to || from > to) { + done = true; +} } return result; } Added: james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMessageResultIteratorTest.java URL: http://svn.apache.org/viewvc/james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMessageResultIteratorTest.java?rev=1152209&view=auto == --- james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMessageResultIteratorTest.java (added) +++ james/mailbox/trunk/store/src/test/java/org/apache/james/mailbox/store/StoreMessageResultIteratorTest.java Fri Jul 29 13:18:17 2011 @@ -0,0 +1,184 @@ +/ + * Licensed to the Apache Software Foundation (ASF) under one * + * or more contributor license agreements. See the NOTICE file * + * distributed with this work for additional information* + * regarding copyright ownership. The ASF licenses this file * + * to you under the Apache License, Version 2.0 (the* + * "License"); you may not use this file except in compliance * + * with the License. You may obtain a copy of the License at * + * * + * http://www.apache.org/licenses/LICENSE-2.0 * + * * + * Unless required by applicable law or agreed to in writing, * + * software distributed under the License is distributed on an * + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * + * KIND, either express or implied. See the License for the* + * specific language governing permissions and limitations * + * under the License. * + / + +package org.apache.james.mailbox.store; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.mail.Flags; +import javax.mail.util.SharedByteArrayInputStream; + +import junit.framework.Assert; + +import org.apache.james.mailbox.MailboxException; +import org.apache.james.mailbox.MessageMetaData; +import org.apache.james.mailbox.MessageRange; +import org.apache.james.mailbox.MessageResult; +import org.apache.james.mailbox.MessageResult.FetchGroup; +import org.apache.james.mailb
[jira] [Resolved] (IMAP-326) Upgrade to mime4j 0.7
[ https://issues.apache.org/jira/browse/IMAP-326?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Norman Maurer resolved IMAP-326. Resolution: Fixed > Upgrade to mime4j 0.7 > - > > Key: IMAP-326 > URL: https://issues.apache.org/jira/browse/IMAP-326 > Project: JAMES Imap > Issue Type: Task >Affects Versions: 0.2.1 >Reporter: Norman Maurer >Assignee: Norman Maurer > Fix For: 0.3 > > -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1152177 - in /james/imap/trunk: ./ processor/ processor/src/main/java/org/apache/james/imap/processor/fetch/
Author: norman Date: Fri Jul 29 11:49:27 2011 New Revision: 1152177 URL: http://svn.apache.org/viewvc?rev=1152177&view=rev Log: Use mime4j 0.7. See IMAP-326 Modified: james/imap/trunk/pom.xml james/imap/trunk/processor/pom.xml james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchResponseBuilder.java james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/MimeDescriptorStructure.java Modified: james/imap/trunk/pom.xml URL: http://svn.apache.org/viewvc/james/imap/trunk/pom.xml?rev=1152177&r1=1152176&r2=1152177&view=diff == --- james/imap/trunk/pom.xml (original) +++ james/imap/trunk/pom.xml Fri Jul 29 11:49:27 2011 @@ -426,7 +426,12 @@ --> org.apache.james -apache-mime4j +apache-mime4j-core +${version.apache-mime4j} + + +org.apache.james +apache-mime4j-dom ${version.apache-mime4j} @@ -583,7 +588,7 @@ UTF-8 2.4 3.2.1 -0.6 +0.7 1.4.3 1.1.1 2.5.1 Modified: james/imap/trunk/processor/pom.xml URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/pom.xml?rev=1152177&r1=1152176&r2=1152177&view=diff == --- james/imap/trunk/processor/pom.xml (original) +++ james/imap/trunk/processor/pom.xml Fri Jul 29 11:49:27 2011 @@ -32,13 +32,17 @@ org.apache.james apache-james-imap-message - -commons-codec -commons-codec - + + commons-codec + commons-codec + + + org.apache.james + apache-mime4j-core + org.apache.james - apache-mime4j + apache-mime4j-dom org.jmock Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java?rev=1152177&r1=1152176&r2=1152177&view=diff == --- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java (original) +++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java Fri Jul 29 11:49:27 2011 @@ -33,13 +33,12 @@ import org.apache.james.mailbox.Headers; import org.apache.james.mailbox.MailboxException; import org.apache.james.mailbox.MessageResult; import org.apache.james.mime4j.codec.EncoderUtil; -import org.apache.james.mime4j.field.address.Address; -import org.apache.james.mime4j.field.address.AddressList; -import org.apache.james.mime4j.field.address.DomainList; -import org.apache.james.mime4j.field.address.Group; -import org.apache.james.mime4j.field.address.MailboxList; -import org.apache.james.mime4j.field.address.parser.ParseException; -import org.apache.james.mime4j.util.MimeUtil; +import org.apache.james.mime4j.dom.address.Address; +import org.apache.james.mime4j.dom.address.AddressList; +import org.apache.james.mime4j.dom.address.DomainList; +import org.apache.james.mime4j.dom.address.Group; +import org.apache.james.mime4j.dom.address.MailboxList; +import org.apache.james.mime4j.field.address.LenientAddressBuilder; import org.slf4j.Logger; public final class EnvelopeBuilder { @@ -131,38 +130,34 @@ public final class EnvelopeBuilder { results = null; } else { -try { -AddressList addressList = AddressList.parse(value); -final int size = addressList.size(); -final List addresses = new ArrayList(size); -for (int i = 0; i < size; i++) { -final Address address = addressList.get(i); -if (address instanceof Group) { -final Group group = (Group) address; -addAddresses(group, addresses); - -} else if (address instanceof org.apache.james.mime4j.field.address.Mailbox) { -final org.apache.james.mime4j.field.address.Mailbox mailbox = (org.apache.james.mime4j.field.address.Mailbox) address; -final FetchResponse.Envelope.Address mailboxAddress = buildMailboxAddress(mailbox); -addresses.add(mailboxAddress); - -} else { -logger.warn("Unknown address type"); -} -} +AddressList addressList = LenientAddressBuil
[jira] [Resolved] (IMAP-327) Better unfolding(..) of Subject in ENVELOPE
[ https://issues.apache.org/jira/browse/IMAP-327?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Norman Maurer resolved IMAP-327. Resolution: Fixed done > Better unfolding(..) of Subject in ENVELOPE > --- > > Key: IMAP-327 > URL: https://issues.apache.org/jira/browse/IMAP-327 > Project: JAMES Imap > Issue Type: Improvement > Components: Protocol >Affects Versions: 0.2.1 >Reporter: Norman Maurer >Assignee: Norman Maurer > Fix For: 0.3 > > > See > https://mailman2.u.washington.edu/mailman/htdig/imap-protocol/2010-July/001271.html -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1152175 - /james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java
Author: norman Date: Fri Jul 29 11:40:34 2011 New Revision: 1152175 URL: http://svn.apache.org/viewvc?rev=1152175&view=rev Log: Better handling of unfold whcih includes the replacement of tabs with spaces. See IMAP-327 Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java?rev=1152175&r1=1152174&r2=1152175&view=diff == --- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java (original) +++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/EnvelopeBuilder.java Fri Jul 29 11:40:34 2011 @@ -25,6 +25,8 @@ package org.apache.james.imap.processor. import java.util.ArrayList; import java.util.List; +import javax.mail.internet.MimeUtility; + import org.apache.james.imap.api.ImapConstants; import org.apache.james.imap.message.response.FetchResponse; import org.apache.james.mailbox.Headers; @@ -76,7 +78,13 @@ public final class EnvelopeBuilder { // ENVELOPE header values must be unfolded // See IMAP-269 -result = MimeUtil.unfold(value); + // + // + // IMAP-Servers are advised to also replace tabs with single spaces while doing the unfolding. This is what javamails + // unfold does. mime4j's unfold does strictly follow the rfc and so preserve them + // + // See IMAP-327 and https://mailman2.u.washington.edu/mailman/htdig/imap-protocol/2010-July/001271.html +result = MimeUtility.unfold(value); } } @@ -112,7 +120,12 @@ public final class EnvelopeBuilder { // We need to unfold the header line. // See https://issues.apache.org/jira/browse/IMAP-154 -String value = MimeUtil.unfold(header.getValue()); + // + // IMAP-Servers are advised to also replace tabs with single spaces while doing the unfolding. This is what javamails + // unfold does. mime4j's unfold does strictly follow the rfc and so preserve them + // + // See IMAP-327 and https://mailman2.u.washington.edu/mailman/htdig/imap-protocol/2010-July/001271.html +String value = MimeUtility.unfold(header.getValue()); if ("".equals(value.trim())) { results = null; - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Created] (IMAP-327) Better unfolding(..) of Subject in ENVELOPE
Better unfolding(..) of Subject in ENVELOPE --- Key: IMAP-327 URL: https://issues.apache.org/jira/browse/IMAP-327 Project: JAMES Imap Issue Type: Improvement Components: Protocol Affects Versions: 0.2.1 Reporter: Norman Maurer Assignee: Norman Maurer Fix For: 0.3 See https://mailman2.u.washington.edu/mailman/htdig/imap-protocol/2010-July/001271.html -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1152161 - in /james/imap/trunk: ./ processor/src/main/java/org/apache/james/imap/processor/ processor/src/main/java/org/apache/james/imap/processor/fetch/
Author: norman Date: Fri Jul 29 10:48:58 2011 New Revision: 1152161 URL: http://svn.apache.org/viewvc?rev=1152161&view=rev Log: Update to latest mailbox SNAPSHOT Modified: james/imap/trunk/pom.xml james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/SearchProcessor.java james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/StoreProcessor.java james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java Modified: james/imap/trunk/pom.xml URL: http://svn.apache.org/viewvc/james/imap/trunk/pom.xml?rev=1152161&r1=1152160&r2=1152161&view=diff == --- james/imap/trunk/pom.xml (original) +++ james/imap/trunk/pom.xml Fri Jul 29 10:48:58 2011 @@ -383,12 +383,12 @@ org.apache.james apache-james-mailbox-api -0.3 +0.4-SNAPSHOT org.apache.james apache-james-mailbox-api -0.3 +0.4-SNAPSHOT test-jar test Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java?rev=1152161&r1=1152160&r2=1152161&view=diff == --- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java (original) +++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractMailboxProcessor.java Fri Jul 29 10:48:58 2011 @@ -56,6 +56,7 @@ import org.apache.james.mailbox.MessageM import org.apache.james.mailbox.MessageRange; import org.apache.james.mailbox.MessageRangeException; import org.apache.james.mailbox.MessageResult; +import org.apache.james.mailbox.MessageResultIterator; import org.apache.james.mailbox.SearchQuery; import org.apache.james.mailbox.MessageManager.MetaData; import org.apache.james.mailbox.MessageManager.MetaData.FetchGroup; @@ -224,7 +225,7 @@ abstract public class AbstractMailboxPro protected void addFlagsResponses(final ImapSession session, final SelectedMailbox selected, final ImapProcessor.Responder responder, boolean useUid, MessageRange messageSet, MessageManager mailbox, MailboxSession mailboxSession) throws MailboxException { -final Iterator it = mailbox.getMessages(messageSet, FetchGroupImpl.MINIMAL, mailboxSession); +final MessageResultIterator it = mailbox.getMessages(messageSet, FetchGroupImpl.MINIMAL, -1, mailboxSession); while (it.hasNext()) { MessageResult mr = it.next(); final long uid = mr.getUid(); Modified: james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java URL: http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java?rev=1152161&r1=1152160&r2=1152161&view=diff == --- james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java (original) +++ james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/AbstractSelectionProcessor.java Fri Jul 29 10:48:58 2011 @@ -53,6 +53,7 @@ import org.apache.james.mailbox.MailboxS import org.apache.james.mailbox.MessageManager; import org.apache.james.mailbox.MessageManager.MetaData.FetchGroup; import org.apache.james.mailbox.MessageRangeException; +import org.apache.james.mailbox.MessageResultIterator; import org.apache.james.mailbox.SearchQuery; import org.apache.james.mailbox.MessageManager.MetaData; import org.apache.james.mailbox.MessageRange; @@ -103,11 +104,7 @@ abstract class AbstractSelectionProcesso } catch (MailboxException e) { session.getLog().debug("Select failed", e); no(command, tag, responder, HumanReadableText.SELECT); -} catch (MessageRangeException e) { -session.getLog().debug("Select failed", e); -no(command, tag, responder, HumanReadableText.SELECT); - -} +} } private void respond(String tag, ImapCommand command, ImapSession session, MailboxPath fullMailboxPath, AbstractMailboxSelectionRequest request, Responder responder) throws MailboxException, MessageRangeException { @@ -419,7 +416,7 @@ abstract class AbstractSelectionProcesso private SelectedMailbox createNewSelectedMailbox(final MessageManager mailbox, final MailboxSession mailboxSession, ImapSession session,
[jira] [Closed] (MAILBOX-114) Handle correctly INBOX deletion for Maildir
[ https://issues.apache.org/jira/browse/MAILBOX-114?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Eric Charles closed MAILBOX-114. Resolution: Fixed Fixed with http://svn.apache.org/viewvc?rev=1152151&view=rev > Handle correctly INBOX deletion for Maildir > --- > > Key: MAILBOX-114 > URL: https://issues.apache.org/jira/browse/MAILBOX-114 > Project: James Mailbox > Issue Type: Bug > Components: maildir mailbox >Affects Versions: 0.4 >Reporter: Eric Charles >Assignee: Norman Maurer > Fix For: 0.4 > > > When we want to delete INBOX folder in Maildir implementation, we only have > to delete the cur, new, tmp folders and the metadata uidlist and uidvalidity > files. > If we delete the complete folder, all other users subfolders will also be > deleted, and this is not what we want (a subfolder path can exist without its > parent path). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
svn commit: r1152151 - /james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java
Author: eric Date: Fri Jul 29 09:23:12 2011 New Revision: 1152151 URL: http://svn.apache.org/viewvc?rev=1152151&view=rev Log: Handle correctly INBOX deletion for Maildir (MAILBOX-114) Modified: james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java Modified: james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java URL: http://svn.apache.org/viewvc/james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java?rev=1152151&r1=1152150&r2=1152151&view=diff == --- james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java (original) +++ james/mailbox/trunk/maildir/src/main/java/org/apache/james/mailbox/maildir/mail/MaildirMailboxMapper.java Fri Jul 29 09:23:12 2011 @@ -65,11 +65,23 @@ public class MaildirMailboxMapper extend * @see org.apache.james.mailbox.store.mail.MailboxMapper#delete(org.apache.james.mailbox.store.mail.model.Mailbox) */ public void delete(Mailbox mailbox) throws MailboxException { + String folderName = maildirStore.getFolderName(mailbox); File folder = new File(folderName); if (folder.isDirectory()) { try { -FileUtils.deleteDirectory(folder); +if (mailbox.getName().equals(MailboxConstants.INBOX)) { +// We must only delete cur, new, tmp and metadata for top INBOX mailbox. +FileUtils.deleteDirectory(new File(folder, MaildirFolder.CUR)); +FileUtils.deleteDirectory(new File(folder, MaildirFolder.NEW)); +FileUtils.deleteDirectory(new File(folder, MaildirFolder.TMP)); +new File(folder, MaildirFolder.UIDLIST_FILE).delete(); +new File(folder, MaildirFolder.VALIDITY_FILE).delete(); +} +else { +// We simply delete all the folder for non INBOX mailboxes. +FileUtils.deleteDirectory(folder); +} } catch (IOException e) { throw new MailboxException("Unable to delete Mailbox " + mailbox, e); } - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org
[jira] [Created] (MAILBOX-114) Handle correctly INBOX deletion for Maildir
Handle correctly INBOX deletion for Maildir --- Key: MAILBOX-114 URL: https://issues.apache.org/jira/browse/MAILBOX-114 Project: James Mailbox Issue Type: Bug Components: maildir mailbox Affects Versions: 0.4 Reporter: Eric Charles Assignee: Norman Maurer Fix For: 0.4 When we want to delete INBOX folder in Maildir implementation, we only have to delete the cur, new, tmp folders and the metadata uidlist and uidvalidity files. If we delete the complete folder, all other users subfolders will also be deleted, and this is not what we want (a subfolder path can exist without its parent path). -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira - To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org