From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/65855 Path: news.gmane.org!not-for-mail From: nathanw@MIT.EDU (Nathan J. Williams) Newsgroups: gmane.emacs.gnus.general Subject: Re: problem in connecting to Exchange 2007 - possible solution? Date: Mon, 03 Dec 2007 12:04:47 -0500 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1196701644 20436 80.91.229.12 (3 Dec 2007 17:07:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2007 17:07:24 +0000 (UTC) Cc: simon@josefsson.org To: ding@gnus.org Original-X-From: ding-owner+M14350@lists.math.uh.edu Mon Dec 03 18:07:33 2007 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.50) id 1IzEkt-0003Z1-Sa for ding-account@gmane.org; Mon, 03 Dec 2007 18:06:52 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1IzEjc-00080r-9d; Mon, 03 Dec 2007 11:05:32 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1IzEja-00080Y-EH for ding@lists.math.uh.edu; Mon, 03 Dec 2007 11:05:30 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.67) (envelope-from ) id 1IzEjU-0005Tc-4P for ding@lists.math.uh.edu; Mon, 03 Dec 2007 11:05:30 -0600 Original-Received: from biscayne-one-station.mit.edu ([18.7.7.80]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1IzEjQ-0005Mq-00 for ; Mon, 03 Dec 2007 18:05:20 +0100 Original-Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id lB3H4n8B013547; Mon, 3 Dec 2007 12:04:50 -0500 (EST) Original-Received: from contents-vnder-pressvre.mit.edu (CONTENTS-VNDER-PRESSVRE.MIT.EDU [18.7.18.65]) (authenticated bits=56) (User authenticated as nathanw@ATHENA.MIT.EDU) by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id lB3H4mR9029369 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Mon, 3 Dec 2007 12:04:49 -0500 (EST) Original-Received: (from nathanw@localhost) by contents-vnder-pressvre.mit.edu (8.12.9.20060308) id lB3H4llZ019174; Mon, 3 Dec 2007 12:04:47 -0500 (EST) In-Reply-To: (Nathan J. Williams's message of "Thu\, 29 Nov 2007 18\:58\:51 -0500") X-Scanned-By: MIMEDefang 2.42 X-Spam-Flag: NO X-Spam-Score: 0.00 X-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:65855 Archived-At: nathanw@MIT.EDU (Nathan J. Williams) writes: > Hi. My company's mail server was just moved to MS Exchange 2007, and I > quickly ran into the IMAP problem described here: > > http://article.gmane.org/gmane.emacs.gnus.general/64775 > > which is that "FETCH 1,* UID" isn't supported by this server, and it > returns with "BAD The specified message set is invalid" > > Some experimenting later, I found that "FETCH 1 UID" and "FETCH *:* > UID" work individually to get the lowest and highest number; "FETCH > 1,*:* UID" seems to do the same job as "FETCH 1,* UID". A quick patch > followed: I found two other places where a "FETCH *" needed to be replaced by "FETCH *:*" to get things working properly. Patch follows. - Nathan Index: imap.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/imap.el,v retrieving revision 7.34 diff -u -r7.34 imap.el --- imap.el 25 Oct 2007 08:17:54 -0000 7.34 +++ imap.el 3 Dec 2007 16:59:24 -0000 @@ -1735,7 +1736,7 @@ (imap-message-data (make-vector 2 0))) (when (imap-mailbox-examine-1 mailbox) (prog1 - (and (imap-fetch "*" "UID") + (and (imap-fetch "*:*" "UID") (list (imap-mailbox-get-1 'uidvalidity mailbox) (apply 'max (imap-message-map (lambda (uid prop) uid) 'UID)))) @@ -1779,7 +1780,7 @@ (imap-message-data (make-vector 2 0))) (when (imap-mailbox-examine-1 mailbox) (prog1 - (and (imap-fetch "*" "UID") + (and (imap-fetch "*:*" "UID") (list (imap-mailbox-get-1 'uidvalidity mailbox) (apply 'max (imap-message-map (lambda (uid prop) uid) 'UID)))) Index: nnimap.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/nnimap.el,v retrieving revision 7.39 diff -u -r7.39 nnimap.el --- nnimap.el 25 Oct 2007 08:17:54 -0000 7.39 +++ nnimap.el 3 Dec 2007 16:59:25 -0000 @@ -555,7 +555,7 @@ (imap-mailbox-select group examine)) (let (minuid maxuid) (when (> (imap-mailbox-get 'exists) 0) - (imap-fetch "1,*" "UID" nil 'nouidfetch) + (imap-fetch "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)))