From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/66636 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel,gmane.emacs.gnus.general Subject: Re: Exchange 2007 Issues When Copying Between Folders Date: Tue, 01 Apr 2008 16:29:49 +0200 Message-ID: <87r6dpir6q.fsf@mocca.josefsson.org> References: <767ifjymej.fsf@dev-d01.ppllc.com> <868wzypw22.fsf@lifelogs.com> <878wzxr7ny.fsf@mocca.josefsson.org> <76bq4tk6fx.fsf@dev-d01.ppllc.com> <87k5jhpsev.fsf@mocca.josefsson.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207060234 31662 80.91.229.12 (1 Apr 2008 14:30:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Apr 2008 14:30:34 +0000 (UTC) Cc: Ted Zlatanov , "ding@gnus.org" , Emacs developers To: Jake Colman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 01 16:31:05 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JghVY-0003pk-G5 for ged-emacs-devel@m.gmane.org; Tue, 01 Apr 2008 16:30:40 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JghUw-00079H-9S for ged-emacs-devel@m.gmane.org; Tue, 01 Apr 2008 10:30:02 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JghUs-00078v-17 for emacs-devel@gnu.org; Tue, 01 Apr 2008 10:29:58 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JghUr-00078j-MU for emacs-devel@gnu.org; Tue, 01 Apr 2008 10:29:57 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JghUr-00078f-Gv for emacs-devel@gnu.org; Tue, 01 Apr 2008 10:29:57 -0400 Original-Received: from yxa.extundo.com ([83.241.177.38]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1JghUq-0001Xc-V6 for emacs-devel@gnu.org; Tue, 01 Apr 2008 10:29:57 -0400 Original-Received: from mocca.josefsson.org (yxa.extundo.com [83.241.177.38]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id m31ETnjj005835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 1 Apr 2008 16:29:50 +0200 In-Reply-To: <87k5jhpsev.fsf@mocca.josefsson.org> (Simon Josefsson's message of "Tue, 01 Apr 2008 16:21:28 +0200") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) OpenPGP: id=B565716F; url=http://josefsson.org/key.txt Mail-Copies-To: nobody X-Hashcash: 1:22:080401:tzz@lifelogs.com::6Tb4yPBa96Dx0QcE:1edo X-Hashcash: 1:22:080401:emacs-devel@gnu.org::HLV1L/97IICqWy2b:7BBS X-Hashcash: 1:22:080401:colman@ppllc.com::SB0JI+yBHZ5WM0Kn:DGUj X-Hashcash: 1:22:080401:ding@gnus.org::fCDjiRnCqA7st3Oj:bR1Q X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on yxa.extundo.com X-Virus-Status: Clean X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94114 gmane.emacs.gnus.general:66636 Archived-At: Simon Josefsson writes: > Jake Colman 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)))