svn commit: r1147302 - /james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java

2011-07-15 Thread norman
Author: norman
Date: Fri Jul 15 20:17:45 2011
New Revision: 1147302

URL: http://svn.apache.org/viewvc?rev=1147302&view=rev
Log:
Don't send HIGHESTMODSEQ in when send OK to the CLOSE command. This was stated 
in the errata of QRESYNC. See IMAP-307

Modified:

james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java

Modified: 
james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
URL: 
http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java?rev=1147302&r1=1147301&r2=1147302&view=diff
==
--- 
james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
 (original)
+++ 
james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/CloseProcessor.java
 Fri Jul 15 20:17:45 2011
@@ -19,14 +19,10 @@
 
 package org.apache.james.imap.processor;
 
-import java.util.Iterator;
-
 import org.apache.james.imap.api.ImapCommand;
-import org.apache.james.imap.api.ImapConstants;
 import org.apache.james.imap.api.ImapSessionUtils;
 import org.apache.james.imap.api.display.HumanReadableText;
 import org.apache.james.imap.api.message.response.StatusResponseFactory;
-import org.apache.james.imap.api.message.response.StatusResponse.ResponseCode;
 import org.apache.james.imap.api.process.ImapProcessor;
 import org.apache.james.imap.api.process.ImapSession;
 import org.apache.james.imap.message.request.CloseRequest;
@@ -35,8 +31,6 @@ import org.apache.james.mailbox.MailboxM
 import org.apache.james.mailbox.MailboxSession;
 import org.apache.james.mailbox.MessageManager;
 import org.apache.james.mailbox.MessageRange;
-import org.apache.james.mailbox.MessageManager.MetaData;
-import org.apache.james.mailbox.MessageManager.MetaData.FetchGroup;
 
 public class CloseProcessor extends AbstractMailboxProcessor {
 
@@ -50,18 +44,14 @@ public class CloseProcessor extends Abst
 final MailboxSession mailboxSession = 
ImapSessionUtils.getMailboxSession(session);
 if (mailbox.isWriteable(mailboxSession)) {
 
-Iterator expunged = mailbox.expunge(MessageRange.all(), 
mailboxSession);
+mailbox.expunge(MessageRange.all(), mailboxSession);
 session.deselect();
-
-// Check if some messages was expunged and if QRESYNC was 
enabled. If so we need to respond with an OK response that contain the 
HIGHESTMODSEQ
+
+// Don't send HIGHESTMODSEQ when close. Like correct in the 
ERRATA of RFC5162
 //
-// See RFC5162 3.4. CLOSE Command
-if (expunged.hasNext() && 
EnableProcessor.getEnabledCapabilities(session).contains(ImapConstants.SUPPORTS_QRESYNC))
 {
-MetaData mdata = mailbox.getMetaData(false, 
mailboxSession, FetchGroup.NO_COUNT);
-okComplete(command, tag, 
ResponseCode.highestModSeq(mdata.getHighestModSeq()), responder);
-} else {
-okComplete(command, tag, responder);
-}
+// See http://www.rfc-editor.org/errata_search.php?rfc=5162
+okComplete(command, tag, responder);
+   
 }
 
 } catch (MailboxException e) {



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



svn commit: r1147289 - /james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java

2011-07-15 Thread norman
Author: norman
Date: Fri Jul 15 19:21:39 2011
New Revision: 1147289

URL: http://svn.apache.org/viewvc?rev=1147289&view=rev
Log:
Send the UID in the FetchResponse if QRESYNC is enabled. See IMAP-307

Modified:

james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java

Modified: 
james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
URL: 
http://svn.apache.org/viewvc/james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java?rev=1147289&r1=1147288&r2=1147289&view=diff
==
--- 
james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
 (original)
+++ 
james/imap/trunk/processor/src/main/java/org/apache/james/imap/processor/fetch/FetchProcessor.java
 Fri Jul 15 19:21:39 2011
@@ -111,6 +111,10 @@ public class FetchProcessor extends Abst
 //   If we do so we could prolly save one mailbox access 
which should give use some more speed up
 respondVanished(mailboxSession, mailbox, ranges, changedSince, 
mailbox.getMetaData(false, mailboxSession, 
org.apache.james.mailbox.MessageManager.MetaData.FetchGroup.NO_COUNT), 
responder);
 }
+// if QRESYNC is enable its necessary to also return the UID in 
all cases
+if 
(EnableProcessor.getEnabledCapabilities(session).contains(ImapConstants.SUPPORTS_QRESYNC))
 {
+fetch.setUid(true);
+}
 processMessageRanges(session, mailbox, ranges, fetch, useUids, 
mailboxSession, responder);
 
 



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



[jira] [Resolved] (IMAP-323) EnableResponseEncoder responds with "ENABLE" but MUST BE "ENABLED"

2011-07-15 Thread Norman Maurer (JIRA)

 [ 
https://issues.apache.org/jira/browse/IMAP-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Norman Maurer resolved IMAP-323.


Resolution: Fixed

fixed

> EnableResponseEncoder responds with "ENABLE" but MUST BE "ENABLED" 
> ---
>
> Key: IMAP-323
> URL: https://issues.apache.org/jira/browse/IMAP-323
> Project: JAMES Imap
>  Issue Type: Bug
>  Components: Protocol
>Affects Versions: 0.2.1
>Reporter: Norman Maurer
>Assignee: Norman Maurer
> Fix For: 0.3
>
>
> When a client use :
> a ENABLE CONDSTORE
> The Server respond with:
> * ENABLE CONDSTORE
> a OK Enable
> This must be 
> * ENABLED CONDSTORE
> a OK Enable

--
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-323) EnableResponseEncoder responds with "ENABLE" but MUST BE "ENABLED"

2011-07-15 Thread Norman Maurer (JIRA)
EnableResponseEncoder responds with "ENABLE" but MUST BE "ENABLED" 
---

 Key: IMAP-323
 URL: https://issues.apache.org/jira/browse/IMAP-323
 Project: JAMES Imap
  Issue Type: Bug
  Components: Protocol
Affects Versions: 0.2.1
Reporter: Norman Maurer
Assignee: Norman Maurer
 Fix For: 0.3


When a client use :
a ENABLE CONDSTORE

The Server respond with:
* ENABLE CONDSTORE
a OK Enable

This must be 
* ENABLED CONDSTORE
a OK Enable

--
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: r1147191 - /james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/EnableResponseEncoder.java

2011-07-15 Thread norman
Author: norman
Date: Fri Jul 15 15:26:36 2011
New Revision: 1147191

URL: http://svn.apache.org/viewvc?rev=1147191&view=rev
Log:
Make sure we use the right response if a client issue the ENABLE command. See 
IMAP-323

Modified:

james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/EnableResponseEncoder.java

Modified: 
james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/EnableResponseEncoder.java
URL: 
http://svn.apache.org/viewvc/james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/EnableResponseEncoder.java?rev=1147191&r1=1147190&r2=1147191&view=diff
==
--- 
james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/EnableResponseEncoder.java
 (original)
+++ 
james/imap/trunk/message/src/main/java/org/apache/james/imap/encode/EnableResponseEncoder.java
 Fri Jul 15 15:26:36 2011
@@ -19,9 +19,8 @@
 package org.apache.james.imap.encode;
 
 import java.io.IOException;
-import java.util.List;
+import java.util.Set;
 
-import org.apache.james.imap.api.ImapConstants;
 import org.apache.james.imap.api.ImapMessage;
 import org.apache.james.imap.api.process.ImapSession;
 import org.apache.james.imap.encode.base.AbstractChainedImapEncoder;
@@ -47,9 +46,10 @@ public class EnableResponseEncoder exten
  */
 protected void doEncode(ImapMessage acceptableMessage, 
ImapResponseComposer composer, ImapSession session) throws IOException {
 final EnableResponse response = (EnableResponse) acceptableMessage;
-List capabilities = response.getCapabilities();
+Set capabilities = response.getCapabilities();
 composer.untagged();
-composer.message(ImapConstants.ENABLE_COMMAND_NAME);
+// Return ENABLED capabilities. See IMAP-323
+composer.message("ENABLED");
 for (String capability : capabilities) {
 composer.message(capability);
 }



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



Re: [VOTE] Release Apache James Server 3.0-beta3

2011-07-15 Thread Dhrubo
+1

On Fri, Jul 15, 2011 at 4:54 PM, Robert Burrell Donkin <
robertburrelldon...@gmail.com> wrote:

> On Thu, Jul 14, 2011 at 7:43 PM, Robert Burrell Donkin
>  wrote:
> > On Thu, Jul 14, 2011 at 6:40 PM, Norman Maurer
> >  wrote:
> >> Hi there,
> >>
> >> I think we are now finaly ok after a few problems with the last
> >> snapshots which was uploaded for release.
> >
> > For those who want to run the application built from these server
> > components, see http://people.apache.org/~rdonkin/james/
> >
> > Source is in
> https://repository.apache.org/content/repositories/orgapachejames-026/org/apache/james/james-server/3.0-beta3/
> >
> > For anyone who wants some help reviewing these components and has
> > Python and wget (only checked on Linux, I'm afraid) then in a suitable
> > empty directory
>
> 
>
> > $ PYTHONPATH=eye python eye/apache-rat-eye-meta-inf.py
>
> This should be
>
> $ PYTHONPATH=eye python eye/apache-rat-eye-meta-inf.py
> repository.apache.org
>
> Robert
>
> -
> To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
> For additional commands, e-mail: server-dev-h...@james.apache.org
>
>


-- 
Kind Regards... Dhrubo
My Book - http://www.apress.com/book/view/1430210095

My Blog -
http://open-garage.blogspot.com

LinkedIn - http://www.linkedin.com/in/dhrubo


Re: [VOTE] Release Apache James Server 3.0-beta3

2011-07-15 Thread Eric Charles

[x] +1 Yes, please release

because of:

wget 
https://repository.apache.org/content/repositories/orgapachejames-026/org/apache/james/james-server/3.0-beta3/james-server-3.0-beta3-source-release.tar.gz


tar xvfz james-server-3.0-beta3-source-release.tar.gz
cd james-sever-3.0-beta3
mvn install
--> OK (tests...)

upgrade app pom with parent=3.0-beta3
'cd app' and 'mvn install'
test the generated assembly tar.gz.
Server starts and basic end user tests (smtp/imap/pop3 are OK).


On 14/07/11 19:40, Norman Maurer wrote:

Hi there,

I think we are now finaly ok after a few problems with the last
snapshots which was uploaded for release.

So please review the artifacts and cast your vote:

https://repository.apache.org/content/repositories/orgapachejames-026/

[ ] +1 Yes, please release
[ ] +0 No time to review
[ ] -1 Something wrong

Ps: The parent pom and the source seems to be there now

-
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



Re: [VOTE] Release Apache James Server 3.0-beta3

2011-07-15 Thread Robert Burrell Donkin
On Thu, Jul 14, 2011 at 7:43 PM, Robert Burrell Donkin
 wrote:
> On Thu, Jul 14, 2011 at 6:40 PM, Norman Maurer
>  wrote:
>> Hi there,
>>
>> I think we are now finaly ok after a few problems with the last
>> snapshots which was uploaded for release.
>
> For those who want to run the application built from these server
> components, see http://people.apache.org/~rdonkin/james/
>
> Source is in 
> https://repository.apache.org/content/repositories/orgapachejames-026/org/apache/james/james-server/3.0-beta3/
>
> For anyone who wants some help reviewing these components and has
> Python and wget (only checked on Linux, I'm afraid) then in a suitable
> empty directory



> $ PYTHONPATH=eye python eye/apache-rat-eye-meta-inf.py

This should be

$ PYTHONPATH=eye python eye/apache-rat-eye-meta-inf.py repository.apache.org

Robert

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



[jira] [Created] (IMAP-322) Allow to enable/disable CAPABILITIES from config

2011-07-15 Thread Norman Maurer (JIRA)
Allow to enable/disable CAPABILITIES from config


 Key: IMAP-322
 URL: https://issues.apache.org/jira/browse/IMAP-322
 Project: JAMES Imap
  Issue Type: New Feature
Reporter: Norman Maurer
Priority: Minor


At the moment we don't allow to enable/disable CAPABILTIES in any way. 
Sometimes it would be nice to for example disable UIDPLUS handling at all. We 
should expose some API todo so.

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