Gnus development mailing list
 help / color / mirror / Atom feed
From: David Z Maze <dmaze@MIT.EDU>
Subject: Working around IMAP server b0rk3n-ness
Date: Fri, 27 Jun 2003 14:34:34 -0400	[thread overview]
Message-ID: <87adc3cqth.fsf@mit.edu> (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

             reply	other threads:[~2003-06-27 18:34 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-27 18:34 David Z Maze [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87adc3cqth.fsf@mit.edu \
    --to=dmaze@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).