diff options
author | Miles Bader <miles@gnu.org> | 2008-04-07 13:08:33 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2008-04-07 13:08:33 +0000 |
commit | 59429511341a4d2dbec1f8b890f628ad928bfd5c (patch) | |
tree | 245e70521d05baf90de36fd4c14f57815bc5e342 /lisp/net/imap.el | |
parent | fbf57abbfe59545a0b0bb9e6c7288a375f68de94 (diff) | |
download | emacs-59429511341a4d2dbec1f8b890f628ad928bfd5c.tar.gz |
Merge from gnus--devo--0
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1110
Diffstat (limited to 'lisp/net/imap.el')
-rw-r--r-- | lisp/net/imap.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lisp/net/imap.el b/lisp/net/imap.el index 399d5ec8237..9e3d0a966a9 100644 --- a/lisp/net/imap.el +++ b/lisp/net/imap.el @@ -440,6 +440,12 @@ The actual value is really the text on the continuation line.") The function should take two arguments, the first the IMAP tag and the second the status (OK, NO, BAD etc) of the command.") +(defvar imap-enable-exchange-bug-workaround nil + "Send FETCH UID commands as *:* instead of *. +Enabling this appears to be required for some servers (e.g., +Microsoft Exchange) which otherwise would trigger a response 'BAD +The specified message set is invalid.'.") + ;; Utility functions: @@ -1774,7 +1780,8 @@ is non-nil return these properties." (imap-message-data (make-vector 2 0))) (when (imap-mailbox-examine-1 mailbox) (prog1 - (and (imap-fetch "*" "UID") + (and (imap-fetch + (if imap-enable-exchange-bug-workaround "*:*" "*") "UID") (list (imap-mailbox-get-1 'uidvalidity mailbox) (apply 'max (imap-message-map (lambda (uid prop) uid) 'UID)))) @@ -1818,7 +1825,8 @@ first element, rest of list contain the saved articles' UIDs." (imap-message-data (make-vector 2 0))) (when (imap-mailbox-examine-1 mailbox) (prog1 - (and (imap-fetch "*" "UID") + (and (imap-fetch + (if imap-enable-exchange-bug-workaround "*:*" "*") "UID") (list (imap-mailbox-get-1 'uidvalidity mailbox) (apply 'max (imap-message-map (lambda (uid prop) uid) 'UID)))) |