Re: Gnus sometimes fails to see a message that is actually in IMAP

Eric Abrahamsen <[email protected]> Fri, 24 May 2024 08:58:40 -0700
Newsgroups gmane.emacs.gnus.general
Message-ID <[email protected]>
Eric Abrahamsen <[email protected]> writes:

> Greg Troxel <[email protected]> writes:
>
> Wow, this is a ton of information! Thanks for all the background. Kudos
> on using TLS on your own machine, something I have never had the
> patience to set up.
>
>> I have changed the subject, as I am not at all sure that my problem is
>> the same as "reports new messages but not showing them on IMAP server".
>> In my case, it seems to me as if there is a filter between gnus and the
>> IMAP server that redacts a message.

Brief update -- when I started looking further into this, I realized
that I have the same issue with the INBOX of one of my main IMAP
accounts. I'd just not noticed because I have 486 unread messages in
that folder :( Well, 483 according to Gnus.

This account includes a remote Dovecot on the server that actually
receives mail, and two local machines that each have their own local
Dovecot, and Emacs/Gnus. The remote and local Dovecots are synced with
mbsync, and both remote and local report 486 unread messages when
checked with doveadm.

My other local machine is currently not booting, but I'll be very
curious to see if Gnus on that machine is wrong in the same way
(a deterministic bug) or not (space gremlins).

Otherwise, the difference between "g" and "M-g", for IMAP servers that
support qresync, is that "g" goes the qresync route:

EXAMINE <group> (QRESYNC (<uidvalidity> <modseq>))

while "M-g" does a full fetch of flags:

"UID FETCH 1:* FLAGS"

So that's a pretty strong indicator that there's a bug in the qresync
branch of `nnimap-update-qresync-info'. Some have reported bugs that
*weren't* resolved by "M-g", so there will likely be a few things to
fix, but one thing at a time.

I'd originally planned to provide a function people could run after
updating, to see if the numbers had gone out of whack, but now I think I
can do a bit better; maybe a tweaked version of
`nnimap-update-qresync-info' that would do a bit of its own
error-checking.

Eric