all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: Exchange 2007 Issues When Copying Between Folders
       [not found] <767ifjymej.fsf@dev-d01.ppllc.com>
@ 2008-03-31 18:50 ` Ted Zlatanov
  2008-04-01 14:06   ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Ted Zlatanov @ 2008-03-31 18:50 UTC (permalink / raw)
  To: Jake Colman; +Cc: Simon Josefsson, ding, Emacs developers

On Mon, 31 Mar 2008 10:54:12 -0400 Jake Colman <colman@ppllc.com> wrote: 

JC> Ted suggested that I post here as I find more issues with using Gnus
JC> with Exchange 2007.

JC> If I move an email between IMAP folders ('B m'), I get the following messages:

JC> Registry: Registering article 6 with group nnimap+exchange-d01:INBOX/Development/gnu
JC> Registry: Registering article 7 with group nnimap+exchange-d01:INBOX/Development/gnu
JC> Moving to nnimap+exchange-d01:INBOX/Development/CVS: (6)...
JC> nnimap-request-move-article: this is an internal move
JC> The specified message set is invalid.
JC> Couldn't Move article 6: The specified message set is invalid.
JC> nnimap: Updating info for nnimap+exchange-d01:INBOX/Development/gnu...
JC> nnimap: Updating info for nnimap+exchange-d01:INBOX/Development/gnu...done

JC> The message is, in fact, copied between the 'gnu' folder and the 'CVS'
JC> folder but it is not deleted from the 'gnu' folder.

JC> I am attaching the output of the imap-debug buffer showing everything starting
JC> with pressing 'B m'.

The command that caused the problem:

511 UID FETCH * UID

(copying emacs-devel regarding the maintenance issue)

Simon Josefsson hasn't replied to my pings, so I think he may not be
available for imap.el support.  Simon, please let us know if that's not
the case.

I'm willing to dig further and maybe support imap.el if no one else
wants it, but honestly the IMAP RFCs are unpleasant and annoy me, so I
need a better explanation of the protocol.  Google was not helpful.  Can
anyone suggest an IMAP primer I can read?  I'm interested in the actual
protocol, so the more concrete the examples, the better.

Thanks
Ted




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-03-31 18:50 ` Exchange 2007 Issues When Copying Between Folders Ted Zlatanov
@ 2008-04-01 14:06   ` Simon Josefsson
  2008-04-01 14:13     ` Jake Colman
                       ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Simon Josefsson @ 2008-04-01 14:06 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: Jake Colman, ding, Emacs developers

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Mon, 31 Mar 2008 10:54:12 -0400 Jake Colman <colman@ppllc.com> wrote: 
>
> JC> Ted suggested that I post here as I find more issues with using Gnus
> JC> with Exchange 2007.
>
> JC> If I move an email between IMAP folders ('B m'), I get the following messages:
>
> JC> Registry: Registering article 6 with group nnimap+exchange-d01:INBOX/Development/gnu
> JC> Registry: Registering article 7 with group nnimap+exchange-d01:INBOX/Development/gnu
> JC> Moving to nnimap+exchange-d01:INBOX/Development/CVS: (6)...
> JC> nnimap-request-move-article: this is an internal move
> JC> The specified message set is invalid.
> JC> Couldn't Move article 6: The specified message set is invalid.
> JC> nnimap: Updating info for nnimap+exchange-d01:INBOX/Development/gnu...
> JC> nnimap: Updating info for nnimap+exchange-d01:INBOX/Development/gnu...done
>
> JC> The message is, in fact, copied between the 'gnu' folder and the 'CVS'
> JC> folder but it is not deleted from the 'gnu' folder.
>
> JC> I am attaching the output of the imap-debug buffer showing everything starting
> JC> with pressing 'B m'.
>
> The command that caused the problem:
>
> 511 UID FETCH * UID
>
> (copying emacs-devel regarding the maintenance issue)
>
> Simon Josefsson hasn't replied to my pings, so I think he may not be
> available for imap.el support.  Simon, please let us know if that's not
> the case.

Hi!  Sorry for not responding, I have been busy with other things, and I
don't have much time to work on (nn)imap.el any more.  I have time to
review concrete patches, but little time to help debug problems with
some servers.

However, the recently installed patch for Gnus is definitely the wrong
thing:

-	  (imap-fetch "1,*" "UID" nil 'nouidfetch)
+	  (imap-fetch "1:*" "UID" nil 'nouidfetch)

This generates thousands and thousands of unnecessary lines of output,
such as:

669 FETCH 1:* UID
* 1 FETCH (UID 53159)
* 2 FETCH (UID 53160)
* 3 FETCH (UID 53161)
...
* 103915 FETCH (UID 157074)
* 103916 FETCH (UID 157075)
* 103917 FETCH (UID 157076)
669 OK Completed

That's about 2-3MB of output, and that was getting information for one
of my folders (I subscribe to maybe 100-150 folders..).

This slows down pressing 'g' on my server from sub-seconds to a very
long time (I pressed C-g after half a minute).

This is how the output should look like:

698 FETCH 1,* UID
* 1 FETCH (UID 53159)
* 103918 FETCH (UID 157077)
698 OK Completed

That's 89 bytes and takes ms's to transfer.

If you want this bug workaround in the code, please make it conditional
on some variable that is disabled by default.  I suggest documenting
that this may slow down things considerably.

> I'm willing to dig further and maybe support imap.el if no one else
> wants it, but honestly the IMAP RFCs are unpleasant and annoy me, so I
> need a better explanation of the protocol.  Google was not helpful.  Can
> anyone suggest an IMAP primer I can read?  I'm interested in the actual
> protocol, so the more concrete the examples, the better.

I'm not aware of any, and I would agree that the RFC is unfriendly...
if you can't find any primer, just toggle imap-log and try to understand
the commands send by Gnus for each operation that is needed.  Read the
RFC for full explanations of some things.

/Simon




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:06   ` Simon Josefsson
@ 2008-04-01 14:13     ` Jake Colman
  2008-04-01 14:14     ` Jake Colman
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 13+ messages in thread
From: Jake Colman @ 2008-04-01 14:13 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: Ted Zlatanov, ding@gnus.org, Emacs developers

>>>>> "SJ" == Simon Josefsson <simon@josefsson.org> writes:

   SJ> Ted Zlatanov <tzz@lifelogs.com> writes:
   >> On Mon, 31 Mar 2008 10:54:12 -0400 Jake Colman <colman@ppllc.com> wrote:
   >> 
   JC> Ted suggested that I post here as I find more issues with using Gnus
   JC> with Exchange 2007.
   >> 
   JC> If I move an email between IMAP folders ('B m'), I get the following
   SJ> messages:
   >> 
   JC> Registry: Registering article 6 with group
   SJ> nnimap+exchange-d01:INBOX/Development/gnu
   JC> Registry: Registering article 7 with group
   SJ> nnimap+exchange-d01:INBOX/Development/gnu
   JC> Moving to nnimap+exchange-d01:INBOX/Development/CVS: (6)...
   JC> nnimap-request-move-article: this is an internal move
   JC> The specified message set is invalid.
   JC> Couldn't Move article 6: The specified message set is invalid.
   JC> nnimap: Updating info for nnimap+exchange-d01:INBOX/Development/gnu...
   JC> nnimap: Updating info for
   SJ> nnimap+exchange-d01:INBOX/Development/gnu...done
   >> 
   JC> The message is, in fact, copied between the 'gnu' folder and the 'CVS'
   JC> folder but it is not deleted from the 'gnu' folder.
   >> 
   JC> I am attaching the output of the imap-debug buffer showing everything
   SJ> starting
   JC> with pressing 'B m'.
   >> 
   >> The command that caused the problem:
   >> 
   >> 511 UID FETCH * UID
   >> 
   >> (copying emacs-devel regarding the maintenance issue)
   >> 
   >> Simon Josefsson hasn't replied to my pings, so I think he may not be
   >> available for imap.el support.  Simon, please let us know if that's not
   >> the case.

   SJ> Hi!  Sorry for not responding, I have been busy with other things, and I
   SJ> don't have much time to work on (nn)imap.el any more.  I have time to
   SJ> review concrete patches, but little time to help debug problems with
   SJ> some servers.

   SJ> However, the recently installed patch for Gnus is definitely the wrong
   SJ> thing:

   SJ> -         (imap-fetch "1,*" "UID" nil 'nouidfetch)
   SJ> +         (imap-fetch "1:*" "UID" nil 'nouidfetch)

   SJ> This generates thousands and thousands of unnecessary lines of output,
   SJ> such as:

   SJ> 669 FETCH 1:* UID
   SJ> * 1 FETCH (UID 53159)
   SJ> * 2 FETCH (UID 53160)
   SJ> * 3 FETCH (UID 53161)
   SJ> ...
   SJ> * 103915 FETCH (UID 157074)
   SJ> * 103916 FETCH (UID 157075)
   SJ> * 103917 FETCH (UID 157076)
   SJ> 669 OK Completed

   SJ> That's about 2-3MB of output, and that was getting information for one
   SJ> of my folders (I subscribe to maybe 100-150 folders..).

   SJ> This slows down pressing 'g' on my server from sub-seconds to a very
   SJ> long time (I pressed C-g after half a minute).

   SJ> This is how the output should look like:

   SJ> 698 FETCH 1,* UID
   SJ> * 1 FETCH (UID 53159)
   SJ> * 103918 FETCH (UID 157077)
   SJ> 698 OK Completed

   SJ> That's 89 bytes and takes ms's to transfer.

   SJ> If you want this bug workaround in the code, please make it conditional
   SJ> on some variable that is disabled by default.  I suggest documenting
   SJ> that this may slow down things considerably.


Simon,

Can you suggest something better to fix this problem?  I'm sure that I'm
not the only user who will want to use Gnus with Exchange 2007.  This
fix, incorrect though it may be, does work.  Is there something other
IMAP command that will get data in the way Gnus needs to see it?

...Jake

-- 
Jake Colman
Director of Software Development
Principia Partners LLC
101 West Elm Street
Suite 620
Conshohocken, PA  19428
+1 (610) 755-9786
www.principiapartners.com



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:06   ` Simon Josefsson
  2008-04-01 14:13     ` Jake Colman
@ 2008-04-01 14:14     ` Jake Colman
  2008-04-01 14:21       ` Simon Josefsson
  2008-04-01 22:00     ` Gaute Strokkenes
  2008-04-02 14:19     ` Ted Zlatanov
  3 siblings, 1 reply; 13+ messages in thread
From: Jake Colman @ 2008-04-01 14:14 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: Ted Zlatanov, ding@gnus.org, Emacs developers

>>>>> "SJ" == Simon Josefsson <simon@josefsson.org> writes:

   SJ> Ted Zlatanov <tzz@lifelogs.com> writes:
   >> On Mon, 31 Mar 2008 10:54:12 -0400 Jake Colman <colman@ppllc.com> wrote:
   >> 
   JC> Ted suggested that I post here as I find more issues with using Gnus
   JC> with Exchange 2007.
   >> 
   JC> If I move an email between IMAP folders ('B m'), I get the following
   SJ> messages:
   >> 
   JC> Registry: Registering article 6 with group
   SJ> nnimap+exchange-d01:INBOX/Development/gnu
   JC> Registry: Registering article 7 with group
   SJ> nnimap+exchange-d01:INBOX/Development/gnu
   JC> Moving to nnimap+exchange-d01:INBOX/Development/CVS: (6)...
   JC> nnimap-request-move-article: this is an internal move
   JC> The specified message set is invalid.
   JC> Couldn't Move article 6: The specified message set is invalid.
   JC> nnimap: Updating info for nnimap+exchange-d01:INBOX/Development/gnu...
   JC> nnimap: Updating info for
   SJ> nnimap+exchange-d01:INBOX/Development/gnu...done
   >> 
   JC> The message is, in fact, copied between the 'gnu' folder and the 'CVS'
   JC> folder but it is not deleted from the 'gnu' folder.
   >> 
   JC> I am attaching the output of the imap-debug buffer showing everything
   SJ> starting
   JC> with pressing 'B m'.
   >> 
   >> The command that caused the problem:
   >> 
   >> 511 UID FETCH * UID
   >> 
   >> (copying emacs-devel regarding the maintenance issue)
   >> 
   >> Simon Josefsson hasn't replied to my pings, so I think he may not be
   >> available for imap.el support.  Simon, please let us know if that's not
   >> the case.

   SJ> Hi!  Sorry for not responding, I have been busy with other things, and I
   SJ> don't have much time to work on (nn)imap.el any more.  I have time to
   SJ> review concrete patches, but little time to help debug problems with
   SJ> some servers.

   SJ> However, the recently installed patch for Gnus is definitely the wrong
   SJ> thing:

   SJ> -         (imap-fetch "1,*" "UID" nil 'nouidfetch)
   SJ> +         (imap-fetch "1:*" "UID" nil 'nouidfetch)

   SJ> This generates thousands and thousands of unnecessary lines of output,
   SJ> such as:

   SJ> 669 FETCH 1:* UID
   SJ> * 1 FETCH (UID 53159)
   SJ> * 2 FETCH (UID 53160)
   SJ> * 3 FETCH (UID 53161)
   SJ> ...
   SJ> * 103915 FETCH (UID 157074)
   SJ> * 103916 FETCH (UID 157075)
   SJ> * 103917 FETCH (UID 157076)
   SJ> 669 OK Completed

   SJ> That's about 2-3MB of output, and that was getting information for one
   SJ> of my folders (I subscribe to maybe 100-150 folders..).

   SJ> This slows down pressing 'g' on my server from sub-seconds to a very
   SJ> long time (I pressed C-g after half a minute).

   SJ> This is how the output should look like:

   SJ> 698 FETCH 1,* UID
   SJ> * 1 FETCH (UID 53159)
   SJ> * 103918 FETCH (UID 157077)
   SJ> 698 OK Completed

   SJ> That's 89 bytes and takes ms's to transfer.

   SJ> If you want this bug workaround in the code, please make it conditional
   SJ> on some variable that is disabled by default.  I suggest documenting
   SJ> that this may slow down things considerably.


Simon,

Can you suggest something better to fix this problem?  I'm sure that I'm
not the only user who will want to use Gnus with Exchange 2007.  This
fix, incorrect though it may be, does work.  Is there something other
IMAP command that will get data in the way Gnus needs to see it?

...Jake

-- 
Jake Colman
Director of Software Development
Principia Partners LLC
101 West Elm Street
Suite 620
Conshohocken, PA  19428
+1 (610) 755-9786
www.principiapartners.com




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:14     ` Jake Colman
@ 2008-04-01 14:21       ` Simon Josefsson
  2008-04-01 14:29         ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2008-04-01 14:21 UTC (permalink / raw)
  To: Jake Colman; +Cc: Ted Zlatanov, ding@gnus.org, Emacs developers

Jake Colman <colman@ppllc.com> writes:

> Simon,
>
> Can you suggest something better to fix this problem?  I'm sure that I'm
> not the only user who will want to use Gnus with Exchange 2007.  This
> fix, incorrect though it may be, does work.  Is there something other
> IMAP command that will get data in the way Gnus needs to see it?

Does the fix work?  In another post you said it didn't help.

We can introduce a variable nnimap-enable-exchange-bug-workaround that
toggles the way the code works.  You can set that variable, if it indeed
solves your problem, and others can leave it at its disabled default
value.

Note that using the 1:* command over the 1,* command will generate
excessive traffic.  (For me, checking new mail jumped from a few kb's to
>10MB.)

/Simon



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:21       ` Simon Josefsson
@ 2008-04-01 14:29         ` Simon Josefsson
  2008-04-01 14:34           ` Jake Colman
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2008-04-01 14:29 UTC (permalink / raw)
  To: Jake Colman; +Cc: Ted Zlatanov, ding@gnus.org, Emacs developers

Simon Josefsson <simon@josefsson.org> writes:

> Jake Colman <colman@ppllc.com> writes:
>
>> Simon,
>>
>> Can you suggest something better to fix this problem?  I'm sure that I'm
>> not the only user who will want to use Gnus with Exchange 2007.  This
>> fix, incorrect though it may be, does work.  Is there something other
>> IMAP command that will get data in the way Gnus needs to see it?
>
> Does the fix work?  In another post you said it didn't help.
>
> We can introduce a variable nnimap-enable-exchange-bug-workaround that
> toggles the way the code works.  You can set that variable, if it indeed
> solves your problem, and others can leave it at its disabled default
> value.

Here is what I propose, if 1:* really solves the problem.  Please test
it, apply the patch and customize nnimap-enable-minmax-bug-workaround to
a non-nil value.

/Simon

--- nnimap.el	01 Apr 2008 16:03:24 +0200	7.44
+++ nnimap.el	01 Apr 2008 16:27:27 +0200	
@@ -219,6 +219,19 @@
 
 ;; Performance / bug workaround variables
 
+(defcustom nnimap-enable-minmax-bug-workaround nil
+  "Send UID FETCH UID commands as 1:* instead of 1,*.
+Enabling this appears to be required for some servers (e.g.,
+Exchange) which otherwise would trigger a response 'BAD The
+specified message set is invalid.'.
+Note that enabling this work around may cause significant
+performance penalties if you have large mailboxes.  It makes the
+code transfer one line of data for each message in a
+mailbox (i.e., O(n)) compared to transfering only two
+lines (i.e., O(1))."
+  :type 'boolean
+  :group 'nnimap)
+
 (defcustom nnimap-close-asynchronous t
   "Close mailboxes asynchronously in `nnimap-close-group'.
 This means that errors caught by nnimap when closing the mailbox will
@@ -555,7 +568,8 @@
 	      (imap-mailbox-select group examine))
       (let (minuid maxuid)
 	(when (> (imap-mailbox-get 'exists) 0)
-	  (imap-fetch "1,*" "UID" nil 'nouidfetch)
+	  (imap-fetch (if nnimap-enable-minmax-bug-workaround "1:*" "1,*")
+		      "UID" nil 'nouidfetch)
 	  (imap-message-map (lambda (uid Uid)
 			      (setq minuid (if minuid (min minuid uid) uid)
 				    maxuid (if maxuid (max maxuid uid) uid)))




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:29         ` Simon Josefsson
@ 2008-04-01 14:34           ` Jake Colman
  2008-04-01 14:49             ` Simon Josefsson
  0 siblings, 1 reply; 13+ messages in thread
From: Jake Colman @ 2008-04-01 14:34 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: Ted Zlatanov, ding@gnus.org, Emacs developers

>>>>> "SJ" == Simon Josefsson <simon@josefsson.org> writes:

   SJ> Simon Josefsson <simon@josefsson.org> writes:
   >> Jake Colman <colman@ppllc.com> writes:
   >> 
   >>> Simon,
   >>> 
   >>> Can you suggest something better to fix this problem?  I'm sure that I'm
   >>> not the only user who will want to use Gnus with Exchange 2007.  This
   >>> fix, incorrect though it may be, does work.  Is there something other
   >>> IMAP command that will get data in the way Gnus needs to see it?
   >> 
   >> Does the fix work?  In another post you said it didn't help.
   >> 
   >> We can introduce a variable nnimap-enable-exchange-bug-workaround that
   >> toggles the way the code works.  You can set that variable, if it indeed
   >> solves your problem, and others can leave it at its disabled default
   >> value.

   SJ> Here is what I propose, if 1:* really solves the problem.  Please test
   SJ> it, apply the patch and customize nnimap-enable-minmax-bug-workaround to
   SJ> a non-nil value.

Simon,

I probably thought it wasn't working because of the performance issue
sue to the amount of data being transferred.  Yes, the bug fix _does_
work and I _am_ able get data from my Exchange server.  Unfortunately,
it is quite slow and, has some other bugs with moving  email betweeen
folders.

...Jake

-- 
Jake Colman
Director of Software Development
Principia Partners LLC
101 West Elm Street
Suite 620
Conshohocken, PA  19428
+1 (610) 755-9786
www.principiapartners.com



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:34           ` Jake Colman
@ 2008-04-01 14:49             ` Simon Josefsson
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Josefsson @ 2008-04-01 14:49 UTC (permalink / raw)
  To: Jake Colman; +Cc: Ted Zlatanov, ding@gnus.org, Emacs developers

Jake Colman <colman@ppllc.com> writes:

>>>>>> "SJ" == Simon Josefsson <simon@josefsson.org> writes:
>
>    SJ> Simon Josefsson <simon@josefsson.org> writes:
>    >> Jake Colman <colman@ppllc.com> writes:
>    >> 
>    >>> Simon,
>    >>> 
>    >>> Can you suggest something better to fix this problem?  I'm sure that I'm
>    >>> not the only user who will want to use Gnus with Exchange 2007.  This
>    >>> fix, incorrect though it may be, does work.  Is there something other
>    >>> IMAP command that will get data in the way Gnus needs to see it?
>    >> 
>    >> Does the fix work?  In another post you said it didn't help.
>    >> 
>    >> We can introduce a variable nnimap-enable-exchange-bug-workaround that
>    >> toggles the way the code works.  You can set that variable, if it indeed
>    >> solves your problem, and others can leave it at its disabled default
>    >> value.
>
>    SJ> Here is what I propose, if 1:* really solves the problem.  Please test
>    SJ> it, apply the patch and customize nnimap-enable-minmax-bug-workaround to
>    SJ> a non-nil value.
>
> Simon,
>
> I probably thought it wasn't working because of the performance issue
> sue to the amount of data being transferred.  Yes, the bug fix _does_
> work and I _am_ able get data from my Exchange server.  Unfortunately,
> it is quite slow and, has some other bugs with moving  email betweeen
> folders.

Ok, I have installed my proposed patch in gnus cvs.

You need to customize and enable nnimap-enable-minmax-bug-workaround to
use the slow behavior.

/Simon




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:06   ` Simon Josefsson
  2008-04-01 14:13     ` Jake Colman
  2008-04-01 14:14     ` Jake Colman
@ 2008-04-01 22:00     ` Gaute Strokkenes
  2008-04-01 22:08       ` Simon Josefsson
  2008-04-02 14:19     ` Ted Zlatanov
  3 siblings, 1 reply; 13+ messages in thread
From: Gaute Strokkenes @ 2008-04-01 22:00 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: Ted Zlatanov, Jake Colman, ding, Emacs developers

On  1 april 2008, simon@josefsson.org wrote:

[snip]
> However, the recently installed patch for Gnus is definitely the wrong
> thing:
>
> -	  (imap-fetch "1,*" "UID" nil 'nouidfetch)
> +	  (imap-fetch "1:*" "UID" nil 'nouidfetch)
>
> This generates thousands and thousands of unnecessary lines of output,
> such as:
>
> 669 FETCH 1:* UID
> * 1 FETCH (UID 53159)
> * 2 FETCH (UID 53160)
> * 3 FETCH (UID 53161)
> ...
> * 103915 FETCH (UID 157074)
> * 103916 FETCH (UID 157075)
> * 103917 FETCH (UID 157076)
> 669 OK Completed
>
> That's about 2-3MB of output, and that was getting information for one
> of my folders (I subscribe to maybe 100-150 folders..).
>
> This slows down pressing 'g' on my server from sub-seconds to a very
> long time (I pressed C-g after half a minute).
>
> This is how the output should look like:
>
> 698 FETCH 1,* UID
> * 1 FETCH (UID 53159)
> * 103918 FETCH (UID 157077)
> 698 OK Completed
>
> That's 89 bytes and takes ms's to transfer.

If I understand correctly, what this command is intended to do is to
retrieve the UID of the last and first messags in the mailbox.  If so,
would it not be possible to use a pair of FETCH commands instead?

-- 
Gaute Strokkenes



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 22:00     ` Gaute Strokkenes
@ 2008-04-01 22:08       ` Simon Josefsson
  0 siblings, 0 replies; 13+ messages in thread
From: Simon Josefsson @ 2008-04-01 22:08 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: Jake Colman, ding, Emacs developers

Gaute Strokkenes <gs234@srcf.ucam.org> writes:

> On  1 april 2008, simon@josefsson.org wrote:
>
> [snip]
>> However, the recently installed patch for Gnus is definitely the wrong
>> thing:
>>
>> -	  (imap-fetch "1,*" "UID" nil 'nouidfetch)
>> +	  (imap-fetch "1:*" "UID" nil 'nouidfetch)
>>
>> This generates thousands and thousands of unnecessary lines of output,
>> such as:
>>
>> 669 FETCH 1:* UID
>> * 1 FETCH (UID 53159)
>> * 2 FETCH (UID 53160)
>> * 3 FETCH (UID 53161)
>> ...
>> * 103915 FETCH (UID 157074)
>> * 103916 FETCH (UID 157075)
>> * 103917 FETCH (UID 157076)
>> 669 OK Completed
>>
>> That's about 2-3MB of output, and that was getting information for one
>> of my folders (I subscribe to maybe 100-150 folders..).
>>
>> This slows down pressing 'g' on my server from sub-seconds to a very
>> long time (I pressed C-g after half a minute).
>>
>> This is how the output should look like:
>>
>> 698 FETCH 1,* UID
>> * 1 FETCH (UID 53159)
>> * 103918 FETCH (UID 157077)
>> 698 OK Completed
>>
>> That's 89 bytes and takes ms's to transfer.
>
> If I understand correctly, what this command is intended to do is to
> retrieve the UID of the last and first messags in the mailbox.

Yes.

> If so, would it not be possible to use a pair of FETCH commands
> instead?

Perhaps, those with exchange servers could test this.  The patch would
then be.  Jake, does this patch (against latest CVS) also work for you?
If it works, it should definitely be faster than 1:* queries.

--- nnimap.el	01 Apr 2008 16:27:27 +0200	7.45
+++ nnimap.el	02 Apr 2008 00:07:39 +0200	
@@ -568,8 +568,10 @@
 	      (imap-mailbox-select group examine))
       (let (minuid maxuid)
 	(when (> (imap-mailbox-get 'exists) 0)
-	  (imap-fetch (if nnimap-enable-minmax-bug-workaround "1:*" "1,*")
-		      "UID" nil 'nouidfetch)
+	  (if (not nnimap-enable-minmax-bug-workaround)
+	      (imap-fetch "1,*" "UID" nil 'nouidfetch)
+	    (imap-fetch "1" "UID" nil 'nouidfetch)
+	    (imap-fetch "*" "UID" nil 'nouidfetch))
 	  (imap-message-map (lambda (uid Uid)
 			      (setq minuid (if minuid (min minuid uid) uid)
 				    maxuid (if maxuid (max maxuid uid) uid)))

/Simon



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-01 14:06   ` Simon Josefsson
                       ` (2 preceding siblings ...)
  2008-04-01 22:00     ` Gaute Strokkenes
@ 2008-04-02 14:19     ` Ted Zlatanov
  2008-04-02 14:33       ` Simon Josefsson
  3 siblings, 1 reply; 13+ messages in thread
From: Ted Zlatanov @ 2008-04-02 14:19 UTC (permalink / raw)
  To: Simon Josefsson; +Cc: ding, Emacs developers

On Tue, 01 Apr 2008 16:06:41 +0200 Simon Josefsson <simon@josefsson.org> wrote: 

SJ> Hi!  Sorry for not responding, I have been busy with other things,
SJ> and I don't have much time to work on (nn)imap.el any more.  I have
SJ> time to review concrete patches, but little time to help debug
SJ> problems with some servers.

Understood.

> Ted Z wrote:
>> I'm willing to dig further and maybe support imap.el if no one else
>> wants it, but honestly the IMAP RFCs are unpleasant and annoy me, so I
>> need a better explanation of the protocol.  Google was not helpful.  Can
>> anyone suggest an IMAP primer I can read?  I'm interested in the actual
>> protocol, so the more concrete the examples, the better.

SJ> I'm not aware of any, and I would agree that the RFC is unfriendly...
SJ> if you can't find any primer, just toggle imap-log and try to understand
SJ> the commands send by Gnus for each operation that is needed.  Read the
SJ> RFC for full explanations of some things.

OK, I will try that.  I can take over imap.el and nnimap.el if no one
else wants to do it and Simon is OK with it, though I'm no IMAP expert.

Ted




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-02 14:19     ` Ted Zlatanov
@ 2008-04-02 14:33       ` Simon Josefsson
  2008-04-03 13:09         ` Ted Zlatanov
  0 siblings, 1 reply; 13+ messages in thread
From: Simon Josefsson @ 2008-04-02 14:33 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding, Emacs developers

Ted Zlatanov <tzz@lifelogs.com> writes:

> On Tue, 01 Apr 2008 16:06:41 +0200 Simon Josefsson <simon@josefsson.org> wrote: 
>
> SJ> Hi!  Sorry for not responding, I have been busy with other things,
> SJ> and I don't have much time to work on (nn)imap.el any more.  I have
> SJ> time to review concrete patches, but little time to help debug
> SJ> problems with some servers.
>
> Understood.
>
>> Ted Z wrote:
>>> I'm willing to dig further and maybe support imap.el if no one else
>>> wants it, but honestly the IMAP RFCs are unpleasant and annoy me, so I
>>> need a better explanation of the protocol.  Google was not helpful.  Can
>>> anyone suggest an IMAP primer I can read?  I'm interested in the actual
>>> protocol, so the more concrete the examples, the better.
>
> SJ> I'm not aware of any, and I would agree that the RFC is unfriendly...
> SJ> if you can't find any primer, just toggle imap-log and try to understand
> SJ> the commands send by Gnus for each operation that is needed.  Read the
> SJ> RFC for full explanations of some things.
>
> OK, I will try that.  I can take over imap.el and nnimap.el if no one
> else wants to do it and Simon is OK with it, though I'm no IMAP expert.

Perhaps we can co-maintain it, I'm still around for reviewing any
patches although I usually do not have time to help debug user problems.

/Simon




^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Exchange 2007 Issues When Copying Between Folders
  2008-04-02 14:33       ` Simon Josefsson
@ 2008-04-03 13:09         ` Ted Zlatanov
  0 siblings, 0 replies; 13+ messages in thread
From: Ted Zlatanov @ 2008-04-03 13:09 UTC (permalink / raw)
  To: ding; +Cc: Emacs developers

On Wed, 02 Apr 2008 16:33:54 +0200 Simon Josefsson <simon@josefsson.org> wrote: 

SJ> Ted Zlatanov <tzz@lifelogs.com> writes:
>> OK, I will try that.  I can take over imap.el and nnimap.el if no one
>> else wants to do it and Simon is OK with it, though I'm no IMAP expert.

SJ> Perhaps we can co-maintain it, I'm still around for reviewing any
SJ> patches although I usually do not have time to help debug user problems.

Sounds good.  You provide the knowledge, I'll do the grunt work.  Please
note it (in any way you like) in the *imap.el files so users know.

Ted




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-04-03 13:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <767ifjymej.fsf@dev-d01.ppllc.com>
2008-03-31 18:50 ` Exchange 2007 Issues When Copying Between Folders Ted Zlatanov
2008-04-01 14:06   ` Simon Josefsson
2008-04-01 14:13     ` Jake Colman
2008-04-01 14:14     ` Jake Colman
2008-04-01 14:21       ` Simon Josefsson
2008-04-01 14:29         ` Simon Josefsson
2008-04-01 14:34           ` Jake Colman
2008-04-01 14:49             ` Simon Josefsson
2008-04-01 22:00     ` Gaute Strokkenes
2008-04-01 22:08       ` Simon Josefsson
2008-04-02 14:19     ` Ted Zlatanov
2008-04-02 14:33       ` Simon Josefsson
2008-04-03 13:09         ` Ted Zlatanov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.