From: Gaute B Strokkenes <biggaute@uwc.net>
Subject: Re: Working around IMAP server b0rk3n-ness
Date: Thu, 28 Aug 2003 13:03:03 +0100 [thread overview]
Message-ID: <87lltedm6g.fsf@srcf.ucam.org> (raw)
In-Reply-To: <87adc3cqth.fsf@mit.edu> (David Z. Maze's message of "Fri, 27 Jun 2003 14:34:34 -0400")
On 27 jun 2003, dmaze@mit.edu wrote:
> 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.
You're not alone, if it makes you feel any better. I have a similar
problem every morning when I try to get ~500 new messages. Gnus
constructs a line of ~2000 bytes; the process then hangs indefinitely.
I haven't quite tracked down what's going wrong, but the prime suspect
is uw-imapd not being able to cope with long lines (we all know how
robust c-client and friends are in that respect) with some sort of
openssl / emacs sub-process brokenness as a more distant second.
Usually I just run fetchmail once every morning.
> The "I'm away for a week so it's sure to die, slow and correct is
> better than fast and broken" patch is:
>
> 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))
>
> ...but I don't actually want that all the time.
This may help:
*** mail-source.el.~6.38.~ 1970-01-01 01:00:01.000000000 +0100
--- mail-source.el 2003-08-28 12:42:48.000000000 +0100
***************
*** 1006,1011 ****
--- 1005,1011 ----
(nnheader-ms-strip-cr))
(incf found (mail-source-callback callback server))
(when (and remove fetchflag)
+ (setq remove (nreverse remove))
(imap-message-flags-add
(imap-range-to-message-set (gnus-compress-sequence remove))
fetchflag nil buf))
What's going on here is that remove is a list of message numbers that
should be expunged. The imap-range-to-message-set /
gnus-compress-sequence combo is supposed to create a compact
representation using the imap range syntax (i.e. "1:5" rather than
"1,2,3,4,5"). However, gnus constructs remove by repeatedly pushing
message numbers on to it--and since gnus fetches messages in sequence,
the list of message numbers will be in reverse order, which defeats
gnus-compress-sequence ("5,4,3,2,1").
This won't help you much if the message numbers are not continuous,
but it's a start.
--
Gaute Strokkenes http://www.srcf.ucam.org/~gs234/
I'm DESPONDENT... I hope there's something DEEP-FRIED under this
miniature DOMED STADIUM...
next prev parent reply other threads:[~2003-08-28 12:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-27 18:34 David Z Maze
2003-08-28 12:03 ` Gaute B Strokkenes [this message]
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=87lltedm6g.fsf@srcf.ucam.org \
--to=biggaute@uwc.net \
/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).