Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <simon@josefsson.org>
To: James Cloos <cloos+math_uh-ding@jhcloos.com>
Cc: ding@gnus.org
Subject: Re: nnimap vs dbmail
Date: Wed, 23 May 2007 16:40:03 +0200	[thread overview]
Message-ID: <87hcq34n98.fsf@mocca.josefsson.org> (raw)
In-Reply-To: <m3ejlfbs5l.fsf@lugabout.jhcloos.org> (James Cloos's message of "Thu\, 17 May 2007 07\:33\:51 -0400")

James Cloos <cloos+math_uh-ding@jhcloos.com> writes:

> I'm looking into converting over to using imap as the backstore for my
> mail and am looking at using dbmail for that.
>
> I'm seeing some buglets in nnimap.  
>
> As an example, the unread article counts in the Group buffer are almost
> always incorrect.  And errors often get printed to the minibuffer.
>
> One issue is that dbmail gives each article a server-unique UID rather
> than a just user-unique or folder-unique.  So they are never contiguous.
> nnimap seems to expect contiguous UIDs and goes searching for them,
> causing IMAP errors.

Actually, it is Gnus that assumes contiguous article numbers.  When
there are "holes" in the ranges, the Group buffer unread article count
estimate (yes, it is documented as an estimate) will be wrong.  This
happens for nntp, nnml etc too.

> ,----< 155 UID FETCH 3665,3667 (UID RFC822.SIZE BODY BODY.PEEK[HEADER.FIELDS (Subject From Date Message-Id References In-Reply-To Xref To Newsgroups)]) >
> | 155 BAD invalid message range specified
> `----
>
> So why fetch 3665 and 3667 if they were not listed in any of the UID
> searches?

They may be UNSEEN DELETED, but I agree that it should be able to figure
out that these do not exist.  I suspect that the reason nnimap asked
about this is that Gnus asked about those articles.  Running Gnus and
nnimap under edebug will help to understand why information about those
articles are requested.

>
> ,----< 156 UID FETCH 3665,3667 (UID RFC822.SIZE BODY BODY.PEEK[HEADER.FIELDS (Subject From Date Message-Id References In-Reply-To Xref To Newsgroups)]) >
> | 156 BAD invalid message range specified
> `----
>
> Twice, even.

Huh, that's weird.  It might indicate that something non-normal (i.e., a
bug) is happening.

> ,----< 157 UID STORE 3665,3667 +FLAGS (\Seen) >
> | 157 BAD invalid message range specified
> `----
>
> And dbmail doesn't like storing flags for non-extant UIDs.

RFC 3501 says:

6.4.8.  UID Command
...
      A non-existent unique identifier is ignored without any error
      message generated.  Thus, it is possible for a UID FETCH command
      to return an OK without any data or a UID COPY or UID STORE to
      return an OK without performing any operations.

I'd say this is a dbmail bug.

> This time the errors did not prevent me from seeing new mail, but that
> isn't always the case.  Some new mail is inaccessible in gnus because of
> such errors.  A test shows that one of those errors is probably due to
> this line in list/imap.el:
>
> ,----[ from gnus/lisp/imap.el (imap-parse-body) ]
> | (assert (eq (char-after) ?\)) nil "In imap-parse-body")
> `----
>
> Are those (assert)s necessary?  They effectively lose mail.

Can you quote the content of the ' *nnimap* foo' buffer when that
happens?  Alternatively, try '(setq imap-log t)' and quote the contents
from *imap-log* related to that parse assertion.

The reason for the assert is that imap.el cannot parse what the server
is sending.  I think there are only two reasons for that happening:
imap.el is buggy or the server is buggy.  The effects of either will be
that it appears as if a message is missing (or even worse consequences).
I'm not sure what could be done to avoid this.

/Simon



  reply	other threads:[~2007-05-23 14:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-17 11:33 James Cloos
2007-05-23 14:40 ` Simon Josefsson [this message]
2007-05-24 19:07   ` James Cloos
2007-05-25 10:12     ` 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=87hcq34n98.fsf@mocca.josefsson.org \
    --to=simon@josefsson.org \
    --cc=cloos+math_uh-ding@jhcloos.com \
    --cc=ding@gnus.org \
    /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).