Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-23 Thread Kevin J. McCarthy
On Mon, Aug 23, 2021 at 10:48:59AM +0200, Oswald Buddenhagen wrote: On Sun, Aug 22, 2021 at 06:35:46AM -0700, Kevin J. McCarthy wrote: I agree the server wasn't behaving nicely. It simply omitted some of the headers. (Probably they were deleted at some point between the "assembly" of the mail

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-23 Thread Oswald Buddenhagen
On Sun, Aug 22, 2021 at 06:35:46AM -0700, Kevin J. McCarthy wrote: I agree the server wasn't behaving nicely. It simply omitted some of the headers. (Probably they were deleted at some point between the "assembly" of the mailbox on its side and sending all the headers - the mailbox was very l

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-23 Thread Oswald Buddenhagen
On Sat, Aug 21, 2021 at 12:50:20PM -0700, Kevin J. McCarthy wrote: On Sat, Aug 21, 2021 at 09:32:11PM +0200, Pieter-Tjerk de Boer via Mutt-dev wrote: Unfortunately I don't think this is the correct fix. There can in fact be holes in the MSN sequence. I'm by no means an IMAP or mutt code expe

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-22 Thread Kevin J. McCarthy
On Sun, Aug 22, 2021 at 12:55:49PM +0200, Pieter-Tjerk de Boer via Mutt-dev wrote: On Sat, Aug 21, 2021 at 12:50:20PM -0700, Kevin J. McCarthy wrote: This was observed in Trac ticket 3942:

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-22 Thread Pieter-Tjerk de Boer via Mutt-dev
On Sat, Aug 21, 2021 at 12:50:20PM -0700, Kevin J. McCarthy wrote: > On Sat, Aug 21, 2021 at 09:32:11PM +0200, Pieter-Tjerk de Boer via Mutt-dev > wrote: > > in RFC3501, > > section 2.3.1.2, the MSN is described as "A relative position from 1 to > > the number of messages in the mailbox". This

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-21 Thread Kevin J. McCarthy
On Sat, Aug 21, 2021 at 07:15:12AM -0700, Kevin J. McCarthy wrote: Thank you - good catch. I'll apply this as a separate patch today. I've pushed up two commits to branch kevin/stable-imap-header-cache-hole on gitlab.

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-21 Thread Kevin J. McCarthy
On Sat, Aug 21, 2021 at 09:32:11PM +0200, Pieter-Tjerk de Boer via Mutt-dev wrote: Unfortunately I don't think this is the correct fix. There can in fact be holes in the MSN sequence. I'm by no means an IMAP or mutt code expert (never touch mutt code, nor studied the IMAP RFCs, until trying t

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-21 Thread Pieter-Tjerk de Boer via Mutt-dev
On Sat, Aug 21, 2021 at 07:15:12AM -0700, Kevin J. McCarthy wrote: > On Sat, Aug 21, 2021 at 11:35:19AM +0200, Pieter-Tjerk de Boer via Mutt-dev wr > > This bug isn't just cosmetic; it can lead to unintended deletion of > > large amounts of mails. > > I'm very sorry to hear about the loss of ema

Re: [PATCH] bugfix for handling incomplete IMAP header cache

2021-08-21 Thread Kevin J. McCarthy
On Sat, Aug 21, 2021 at 11:35:19AM +0200, Pieter-Tjerk de Boer via Mutt-dev wrote: The below patch fixes mutt's IMAP message number handling in case it is started with a header cache in which a mail somewhere "in the middle" is missing (i.e., the cache does contain a mail later than the one that

[PATCH] bugfix for handling incomplete IMAP header cache

2021-08-21 Thread Pieter-Tjerk de Boer via Mutt-dev
The below patch fixes mutt's IMAP message number handling in case it is started with a header cache in which a mail somewhere "in the middle" is missing (i.e., the cache does contain a mail later than the one that is missing). This bug isn't just cosmetic; it can lead to unintended deletion of la