Gnus development mailing list
 help / color / mirror / Atom feed
* Working around IMAP server b0rk3n-ness
@ 2003-06-27 18:34 David Z Maze
  2003-08-28 12:03 ` Gaute B Strokkenes
  0 siblings, 1 reply; 9+ messages in thread
From: David Z Maze @ 2003-06-27 18:34 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 694 bytes --]

When using Gnus with an IMAP mail-source, it goes through, reads one
message at a time, sorts them away, and then tries to do a bulk delete
of all of the messages it's read.  This is all fine and within the
bounds of the IMAP spec; unfortunately, not all software is.  I
somewhat regularly wind up using an imtest binary with a 500-byte line
limit, and if I get around that, the local server has a 16K line
limit, which I do run into with enough mail.

It'd be nice if there was a switch or fallback mode or something such
that Gnus didn't always lose in exciting ways when it hit this.  The
"I'm away for a week so it's sure to die, slow and correct is better
than fast and broken" patch is:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 911 bytes --]

Index: mail-source.el
===================================================================
RCS file: /usr/local/cvsroot/gnus/lisp/mail-source.el,v
retrieving revision 6.36
diff -u -r6.36 mail-source.el
--- mail-source.el      13 May 2003 22:58:29 -0000      6.36
+++ mail-source.el      27 Jun 2003 18:29:58 -0000
@@ -1005,9 +1005,10 @@
              (nnheader-ms-strip-cr))
            (incf found (mail-source-callback callback server))
            (when (and remove fetchflag)
-             (imap-message-flags-add
-              (imap-range-to-message-set (gnus-compress-sequence remove))
-              fetchflag nil buf))
+             (dolist (uid remove)
+               (imap-message-flags-add
+                (imap-list-to-message-set (list uid))
+                fetchflag nil buf)))
            (if dontexpunge
                (imap-mailbox-unselect buf)
              (imap-mailbox-close nil buf))

[-- Attachment #3: Type: text/plain, Size: 216 bytes --]


...but I don't actually want that all the time.

-- 
David Maze             dmaze@mit.edu          http://www.mit.edu/~dmaze/
"Theoretical politics is interesting.  Politicking should be illegal."
	-- Abra Mitchell

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

end of thread, other threads:[~2003-08-31  7:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-27 18:34 Working around IMAP server b0rk3n-ness David Z Maze
2003-08-28 12:03 ` Gaute B Strokkenes
2003-08-29  2:47   ` PATCH: Make IMAP mail sources more robust, was :Re: " Gaute B Strokkenes
2003-08-30 12:20     ` PATCH: Make IMAP mail sources more robust, was :Re: Working Gaute B Strokkenes
2003-08-30 14:05       ` Simon Josefsson
2003-08-31  6:00         ` Gaute B Strokkenes
2003-08-31  6:55           ` Simon Josefsson
2003-08-31  7:00             ` Gaute B Strokkenes
2003-08-31  7:25               ` Simon Josefsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).