GNU bug report logs - #35443
27.0.50; Gnus (nnimap) shows "ghost" messages in summary buffer

Previous Next

Package: emacs;

Reported by: Ulrich Mueller <ulm <at> gentoo.org>

Date: Sat, 27 Apr 2019 06:30:02 UTC

Severity: normal

Found in version 27.0.50

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 35443 in the body.
You can then email your comments to 35443 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sat, 27 Apr 2019 06:30:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Ulrich Mueller <ulm <at> gentoo.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sat, 27 Apr 2019 06:30:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sat, 27 Apr 2019 08:23:03 +0200
In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit)
 of 2019-04-21 built on a1i15
Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
System Description: Gentoo/Linux

When fetching e-mail from a dovecot-2.3.5.1 IMAP server, Gnus/nnimap
gets confused and displays ghost messages with address "nobody" and
subject "(none)" in the summary buffer, like in this example:

*Summary nnimap+dev.gentoo.org:INBOX*
----------------------------------------------------------------------
R. [   1: Ulrich Mueller         ] test 1
 . [   ?: nobody                 ] (none)
 . [   1: Ulrich Mueller         ] test 2
----------------------------------------------------------------------

My gnus-secondary-select-methods looks like this:

      '((nnimap "dev.gentoo.org"
		(nnimap-stream tls)
		(nnimap-user "ulm"))
	;; ... further methods omitted ...
	)

For debugging, I have enabled logging with nnimap-record-commands, and
set debug-on-entry for function nnimap-transform-headers.

I then get the following "*imap log*" buffer:
----------------------------------------------------------------------
07:41:57 [dev.gentoo.org] (inhibited)
07:41:59 [dev.gentoo.org] 10105 CAPABILITY
07:41:59 [dev.gentoo.org] 10106 ENABLE QRESYNC
07:41:59 [dev.gentoo.org] 10107 LIST "" "*"
[... other servers ...]
07:42:00 [dev.gentoo.org] 10147 EXAMINE "INBOX" (QRESYNC (1364468255 63360))
[... other servers ...]
07:42:08 [dev.gentoo.org] 10192 SELECT "INBOX"
07:42:08 [dev.gentoo.org] 10193 SELECT "INBOX"
07:42:08 [dev.gentoo.org] 10194 UID FETCH 32409:32410 (UID RFC822.SIZE BODYSTRUCTURE BODY.PEEK[HEADER.FIELDS (Subject From Date Message-Id References In-Reply-To Xref X-Diary-Time-Zone X-Diary-Dow X-Diary-Year X-Diary-Month X-Diary-Dom X-Diary-Hour X-Diary-Minute To Newsgroups Cc)])
----------------------------------------------------------------------

Buffer " *nnimap dev.gentoo.org nil  *nntpd**" looks like this, upon
entering nnimap-transform-headers:
----------------------------------------------------------------------
* 583 FETCH (UID 32409 RFC822.SIZE 698 BODYSTRUCTURE ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 8 1 NIL NIL NIL NIL) BODY[HEADER.FIELDS (SUBJECT FROM DATE MESSAGE-ID REFERENCES IN-REPLY-TO XREF X-DIARY-TIME-ZONE X-DIARY-DOW X-DIARY-YEAR X-DIARY-MONTH X-DIARY-DOM X-DIARY-HOUR X-DIARY-MINUTE TO NEWSGROUPS CC)] {165}
From: Ulrich Mueller <ulm <at> gentoo.org>
To: ulm <at> gentoo.org
Subject: test 1
Date: Sat, 27 Apr 2019 07:39:56 +0200
Message-ID: <w6gd0l8vwer.fsf <at> kph.uni-mainz.de>

)
* 584 FETCH (UID 32410 RFC822.SIZE 698 BODYSTRUCTURE ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 8 1 NIL NIL NIL NIL) BODY[HEADER.FIELDS (SUBJECT FROM DATE MESSAGE-ID REFERENCES IN-REPLY-TO XREF X-DIARY-TIME-ZONE X-DIARY-DOW X-DIARY-YEAR X-DIARY-MONTH X-DIARY-DOM X-DIARY-HOUR X-DIARY-MINUTE TO NEWSGROUPS CC)] {165}
From: Ulrich Mueller <ulm <at> gentoo.org>
To: ulm <at> gentoo.org
Subject: test 2
Date: Sat, 27 Apr 2019 07:40:15 +0200
Message-ID: <w6g8svwvwe8.fsf <at> kph.uni-mainz.de>

)
* 583 FETCH (UID 32409 MODSEQ (63364) FLAGS ($HasNoAttachment))
* 584 FETCH (UID 32410 MODSEQ (63364) FLAGS ($HasNoAttachment))
10194 OK Fetch completed (0.003 + 0.000 + 0.002 secs).
----------------------------------------------------------------------




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sat, 27 Apr 2019 15:04:01 GMT) Full text and rfc822 format available.

Message #8 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sat, 27 Apr 2019 08:03:29 -0700
Ulrich Mueller <ulm <at> gentoo.org> writes:

> In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit)
>  of 2019-04-21 built on a1i15
> Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
> System Description: Gentoo/Linux
>
> When fetching e-mail from a dovecot-2.3.5.1 IMAP server, Gnus/nnimap
> gets confused and displays ghost messages with address "nobody" and
> subject "(none)" in the summary buffer, like in this example:

Are you able to build an earlier version of Emacs (say, from a couple of
months ago) and test if you see the same thing? I made some fairly deep
changes to Gnus over the past month, and while I don't see any reason
why that would cause this behavior, it would be nice to rule it out.

Thanks,
Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sat, 27 Apr 2019 15:51:02 GMT) Full text and rfc822 format available.

Message #11 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sat, 27 Apr 2019 17:49:17 +0200
>>>>> On Sat, 27 Apr 2019, Eric Abrahamsen wrote:

> Are you able to build an earlier version of Emacs (say, from a couple
> of months ago) and test if you see the same thing? I made some fairly
> deep changes to Gnus over the past month, and while I don't see any
> reason why that would cause this behavior, it would be nice to rule it
> out.

Yes, I had tried with Emacs 26.2 and it has the same problem.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sat, 27 Apr 2019 20:48:01 GMT) Full text and rfc822 format available.

Message #14 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sat, 27 Apr 2019 13:47:18 -0700
Ulrich Mueller <ulm <at> gentoo.org> writes:

>>>>>> On Sat, 27 Apr 2019, Eric Abrahamsen wrote:
>
>> Are you able to build an earlier version of Emacs (say, from a couple
>> of months ago) and test if you see the same thing? I made some fairly
>> deep changes to Gnus over the past month, and while I don't see any
>> reason why that would cause this behavior, it would be nice to rule it
>> out.
>
> Yes, I had tried with Emacs 26.2 and it has the same problem.

Huh. Can you show us the value of gnus-newsgroup-data and
gnus-newsgroup-headers in this group? Does the dummy article always show
up? Only in this group? Is this a newly-added IMAP server, and did it
display this problem right from the beginning?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sun, 28 Apr 2019 03:54:02 GMT) Full text and rfc822 format available.

Message #17 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sun, 28 Apr 2019 05:53:09 +0200
>>>>> On Sat, 27 Apr 2019, Eric Abrahamsen wrote:

> Huh. Can you show us the value of gnus-newsgroup-data and
> gnus-newsgroup-headers in this group?

See below, for the current group, whose summary buffer shows your
article and a dummy article.

> Does the dummy article always show up?

It always shows up when new articles have been fetched. It doesn't
show up when entering a group that doesn't have new mail (i.e., if a
group previously had a dummy article, it will be gone when reentering
that group).

> Only in this group?

All groups for that particular IMAP server. 

> Is this a newly-added IMAP server, and did it display this problem
> right from the beginning?

AFAICS, the problem appeared after dovecot on the server side was
upgraded from version 2.2.34 to 2.3.5.1. But I see it only with Gnus.
I don't have any issues with Mozilla Thunderbird (on GNU/Linux) nor with
K-9 Mail (on Android/Linux).

----------------------------------------------------------------------
gnus-newsgroup-data is a variable defined in ‘gnus-sum.el’.
Its value is shown below.

Documentation:
Not documented as a variable.

Value:
((32415 82 2
	[32415 "Re: bug#35443: 27.0.50; Gnus (nnimap) shows \"ghost\" messages in summary buffer" "Eric Abrahamsen <eric <at> ericabrahamsen.net>" "Sat, 27 Apr 2019 13:47:18 -0700" "<87h8ajjhux.fsf <at> ericabrahamsen.net>" "<w6g1s1ovuew.fsf <at> kph.uni-mainz.de> <87wojfjxry.fsf <at> ericabrahamsen.net> <w6gwojfo3cy.fsf <at> kph.uni-mainz.de>" 2609 16 nil
	       ((Cc . "35443 <at> debbugs.gnu.org")
		(To . "Ulrich Mueller <ulm <at> gentoo.org>"))]
	0)
 (32415 32 116
	[32415 "(none)" "(nobody)" "" "fake+none+nnimap+dev.gentoo.org:INBOX+32415" nil -1 -1 nil nil]
	0))
Local in buffer *Summary nnimap+dev.gentoo.org:INBOX*; global value is the same.
----------------------------------------------------------------------
gnus-newsgroup-headers is a variable defined in ‘gnus-sum.el’.
Its value is
([32415 "Re: bug#35443: 27.0.50; Gnus (nnimap) shows \"ghost\" messages in summary buffer" "Eric Abrahamsen <eric <at> ericabrahamsen.net>" "Sat, 27 Apr 2019 13:47:18 -0700" "<87h8ajjhux.fsf <at> ericabrahamsen.net>" "<w6g1s1ovuew.fsf <at> kph.uni-mainz.de> <87wojfjxry.fsf <at> ericabrahamsen.net> <w6gwojfo3cy.fsf <at> kph.uni-mainz.de>" 2609 16 nil
	((Cc . "35443 <at> debbugs.gnu.org")
	 (To . "Ulrich Mueller <ulm <at> gentoo.org>"))]
 [32415 "(none)" "(nobody)" "" "fake+none+nnimap+dev.gentoo.org:INBOX+32415" nil -1 -1 nil nil])
Local in buffer *Summary nnimap+dev.gentoo.org:INBOX*; global value is nil

Documentation:
List of article headers in the current newsgroup.
----------------------------------------------------------------------




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Mon, 29 Apr 2019 00:44:01 GMT) Full text and rfc822 format available.

Message #20 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sun, 28 Apr 2019 17:43:16 -0700
Ulrich Mueller <ulm <at> gentoo.org> writes:

>>>>>> On Sat, 27 Apr 2019, Eric Abrahamsen wrote:
>
>> Huh. Can you show us the value of gnus-newsgroup-data and
>> gnus-newsgroup-headers in this group?
>
> See below, for the current group, whose summary buffer shows your
> article and a dummy article.
>
>> Does the dummy article always show up?
>
> It always shows up when new articles have been fetched. It doesn't
> show up when entering a group that doesn't have new mail (i.e., if a
> group previously had a dummy article, it will be gone when reentering
> that group).
>
>> Only in this group?
>
> All groups for that particular IMAP server. 
>
>> Is this a newly-added IMAP server, and did it display this problem
>> right from the beginning?
>
> AFAICS, the problem appeared after dovecot on the server side was
> upgraded from version 2.2.34 to 2.3.5.1. But I see it only with Gnus.
> I don't have any issues with Mozilla Thunderbird (on GNU/Linux) nor with
> K-9 Mail (on Android/Linux).

Thanks, this should be enough to make some progress in tracking the
problem down. Give me a couple of days...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Tue, 07 May 2019 20:35:02 GMT) Full text and rfc822 format available.

Message #23 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Tue, 07 May 2019 13:34:24 -0700
Ulrich Mueller <ulm <at> gentoo.org> writes:

> In GNU Emacs 27.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit)
>  of 2019-04-21 built on a1i15
> Windowing system distributor 'The X.Org Foundation', version 11.0.11905000
> System Description: Gentoo/Linux
>
> When fetching e-mail from a dovecot-2.3.5.1 IMAP server, Gnus/nnimap
> gets confused and displays ghost messages with address "nobody" and
> subject "(none)" in the summary buffer, like in this example:
>
> *Summary nnimap+dev.gentoo.org:INBOX*
> ----------------------------------------------------------------------
> R. [   1: Ulrich Mueller         ] test 1
>  . [   ?: nobody                 ] (none)
>  . [   1: Ulrich Mueller         ] test 2
> ----------------------------------------------------------------------

[...]

> Buffer " *nnimap dev.gentoo.org nil *nntpd**" looks like this, upon
> entering nnimap-transform-headers:
>----------------------------------------------------------------------
> * 583 FETCH (UID 32409 RFC822.SIZE 698 BODYSTRUCTURE ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 8 1 NIL NIL NIL NIL) BODY[HEADER.FIELDS (SUBJECT FROM DATE MESSAGE-ID REFERENCES IN-REPLY-TO XREF X-DIARY-TIME-ZONE X-DIARY-DOW X-DIARY-YEAR X-DIARY-MONTH X-DIARY-DOM X-DIARY-HOUR X-DIARY-MINUTE TO NEWSGROUPS CC)] {165}
> From: Ulrich Mueller <ulm <at> gentoo.org>
> To: ulm <at> gentoo.org
> Subject: test 1
> Date: Sat, 27 Apr 2019 07:39:56 +0200
> Message-ID: <w6gd0l8vwer.fsf <at> kph.uni-mainz.de>
>
> )
> * 584 FETCH (UID 32410 RFC822.SIZE 698 BODYSTRUCTURE ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 8 1 NIL NIL NIL NIL) BODY[HEADER.FIELDS (SUBJECT FROM DATE MESSAGE-ID REFERENCES IN-REPLY-TO XREF X-DIARY-TIME-ZONE X-DIARY-DOW X-DIARY-YEAR X-DIARY-MONTH X-DIARY-DOM X-DIARY-HOUR X-DIARY-MINUTE TO NEWSGROUPS CC)] {165}
> From: Ulrich Mueller <ulm <at> gentoo.org>
> To: ulm <at> gentoo.org
> Subject: test 2
> Date: Sat, 27 Apr 2019 07:40:15 +0200
> Message-ID: <w6g8svwvwe8.fsf <at> kph.uni-mainz.de>
>
> )
> * 583 FETCH (UID 32409 MODSEQ (63364) FLAGS ($HasNoAttachment))
> * 584 FETCH (UID 32410 MODSEQ (63364) FLAGS ($HasNoAttachment))
> 10194 OK Fetch completed (0.003 + 0.000 + 0.002 secs).
> ----------------------------------------------------------------------

Okay, I've made a bit of progress on this.

Locally I'm using Dovecot 2.3.6, and it does not output those last two
lines before the OK.

`nnimap-transform-headers' is not expecting those two lines -- it
deletes all but the last, leaving a buffer that looks like:

211 32409 Article retrieved.
Chars: 698
Lines: 1
From: Ulrich Mueller <ulm <at> gentoo.org>
To: ulm <at> gentoo.org
Subject: test 1
Date: Sat, 27 Apr 2019 07:39:56 +0200
Message-ID: <w6gd0l8vwer.fsf <at> kph.uni-mainz.de>

.
211 32410 Article retrieved.
Chars: 698
Lines: 1
From: Ulrich Mueller <ulm <at> gentoo.org>
To: ulm <at> gentoo.org
Subject: test 2
Date: Sat, 27 Apr 2019 07:40:15 +0200
Message-ID: <w6g8svwvwe8.fsf <at> kph.uni-mainz.de>

.
211 32409 Article retrieved.
* 584 FETCH (UID 32410 MODSEQ (63364) FLAGS ($HasNoAttachment))
10194 OK Fetch completed (0.003 + 0.000 + 0.002 secs).
.

Which Gnus then parses as an _extra_ article 32409, but then there's no
header data for it, which is why you get all the "nobody" "none"
nonsense.

Essentially, we're not set up to parse this particular return value.

I guess what I'll do is ask on the dovecot mailing list under what
circumstances/versions we'd get a string like that, and try to help Gnus
parse it correctly.

Thanks for your patience,
Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Tue, 07 May 2019 21:15:02 GMT) Full text and rfc822 format available.

Message #26 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Tue, 07 May 2019 14:14:18 -0700
On 04/28/19 05:53 AM, Ulrich Mueller wrote:
>>>>>> On Sat, 27 Apr 2019, Eric Abrahamsen wrote:
>
>> Huh. Can you show us the value of gnus-newsgroup-data and
>> gnus-newsgroup-headers in this group?
>
> See below, for the current group, whose summary buffer shows your
> article and a dummy article.

Can you also tell me your value for `nnmail-extra-headers'?

Thanks,
Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Wed, 08 May 2019 07:08:02 GMT) Full text and rfc822 format available.

Message #29 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Wed, 08 May 2019 09:07:08 +0200
>>>>> On Tue, 07 May 2019, Eric Abrahamsen wrote:

> Can you also tell me your value for `nnmail-extra-headers'?

(X-Diary-Time-Zone X-Diary-Dow X-Diary-Year X-Diary-Month X-Diary-Dom X-Diary-Hour X-Diary-Minute To Newsgroups Cc)

Not sure where the X-Diary-* ones come from, since I don't have that
variable in my config files.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Wed, 08 May 2019 15:19:01 GMT) Full text and rfc822 format available.

Message #32 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Wed, 08 May 2019 17:18:26 +0200
>>>>> On Tue, 07 May 2019, Eric Abrahamsen wrote:

> Locally I'm using Dovecot 2.3.6, and it does not output those last two
> lines before the OK.

Hm, on the server side here dovecot was upgraded to 2.3.6 today, but
the problem persists. Upon entering nnimap-transform-headers, the
" *nnimap dev.gentoo.org nil  *nntpd**" buffer shows the same pattern
as in my original report:

* 590 FETCH (UID 32471 RFC822.SIZE 694 BODYSTRUCTURE ("text" "plain" ("charset" "us-ascii") NIL NIL "7bit" 6 1 NIL NIL NIL NIL) BODY[HEADER.FIELDS (SUBJECT FROM DATE MESSAGE-ID REFERENCES IN-REPLY-TO XREF X-DIARY-TIME-ZONE X-DIARY-DOW X-DIARY-YEAR X-DIARY-MONTH X-DIARY-DOM X-DIARY-HOUR X-DIARY-MINUTE TO NEWSGROUPS CC)] {163}
From: Ulrich Mueller <ulm <at> gentoo.org>
To: ulm <at> gentoo.org
Subject: test
Date: Wed, 08 May 2019 13:59:32 +0200
Message-ID: <w6gzhnxkvh7.fsf <at> kph.uni-mainz.de>

)
* 590 FETCH (UID 32471 MODSEQ (63547) FLAGS ($HasNoAttachment))
16742 OK Fetch completed (0.003 + 0.000 + 0.002 secs).




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Thu, 09 May 2019 17:28:01 GMT) Full text and rfc822 format available.

Message #35 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Thu, 09 May 2019 10:27:07 -0700
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

--8<---------------cut here---------------start------------->8---
> Ulrich Mueller <ulm <at> gentoo.org> writes:
>
>>>>>>> On Sat, 27 Apr 2019, Eric Abrahamsen wrote:
>>
>>> Huh. Can you show us the value of gnus-newsgroup-data and
>>> gnus-newsgroup-headers in this group?
>>
>> See below, for the current group, whose summary buffer shows your
>> article and a dummy article.
>>
>>> Does the dummy article always show up?
>>
>> It always shows up when new articles have been fetched. It doesn't
>> show up when entering a group that doesn't have new mail (i.e., if a
>> group previously had a dummy article, it will be gone when reentering
>> that group).
>>
>>> Only in this group?
>>
>> All groups for that particular IMAP server.
>>
>>> Is this a newly-added IMAP server, and did it display this problem
>>> right from the beginning?
>>
>> AFAICS, the problem appeared after dovecot on the server side was
>> upgraded from version 2.2.34 to 2.3.5.1. But I see it only with Gnus.
>> I don't have any issues with Mozilla Thunderbird (on GNU/Linux) nor with
>> K-9 Mail (on Android/Linux).
>
> Thanks, this should be enough to make some progress in tracking the
> problem down. Give me a couple of days...

Okay, here's what I was told on irc:

--8<---------------cut here---------------start------------->8---
<tss> looks like it's the new feature that adds $HasAttachment or
      $HasNoAttachment flags to mails. they're actually supposed to be added
      only during mail delivery, and there's a setting needed to enable them:
      mail_attachment_detection_options = add-flags-on-save
<tss> but .. there's an "unintentional feature" :) that they also get added
      during some FETCH commands if they're not already there
<tss> but even without this, imap protocol allows sending FETCH FLAGS updates
      (or any updates really) as a response to any command. and with
      concurrent imap access dovecot does this.
<tss> for example if another client adds a \Seen flag, that same thing could
      happen
<jkt> either way, a client should really be able to process these
      "unexpeceted" FETCH updates, that's what the standard is about
--8<---------------cut here---------------end--------------->8---

Ultimately, the "real" fix would be to teach Gnus to handle all possible
responses from IMAP servers, probably using a proper parser.

But if you have access to the dovecot config in your case, you might try
removing the mail_attachment_detection_options setting above, if it's
set. If it's not set, then you might be getting the "unintentional
feature".

I suppose in the interim I could mess with `nnimap-transform-headers'
and try to add some bookkeeping so that multiple FETCH responses for the
same article UID get merged together. On the other hand, this feature
only seems to relate to has/hasnoattachment flags, which Gnus doesn't
handle anyway -- we could safely drop those lines altogether.

(Though it sure would be nice to handle hasattachment flags, that's
something that users have requested in the past...)

Well, that's where we're at.

Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Thu, 09 May 2019 19:04:01 GMT) Full text and rfc822 format available.

Message #38 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Ulrich Mueller <ulm <at> gentoo.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Thu, 09 May 2019 21:03:38 +0200
>>>>> On Thu, 09 May 2019, Eric Abrahamsen wrote:

> Okay, here's what I was told on irc:

> <tss> looks like it's the new feature that adds $HasAttachment or
>       $HasNoAttachment flags to mails. they're actually supposed to be added
>       only during mail delivery, and there's a setting needed to enable them:
>       mail_attachment_detection_options = add-flags-on-save
> <tss> but .. there's an "unintentional feature" :) that they also get added
>       during some FETCH commands if they're not already there
> <tss> but even without this, imap protocol allows sending FETCH FLAGS updates
>       (or any updates really) as a response to any command. and with
>       concurrent imap access dovecot does this.
> <tss> for example if another client adds a \Seen flag, that same thing could
>       happen
> <jkt> either way, a client should really be able to process these
>       "unexpeceted" FETCH updates, that's what the standard is about
> --8<---------------cut here---------------end--------------->8---

> Ultimately, the "real" fix would be to teach Gnus to handle all possible
> responses from IMAP servers, probably using a proper parser.

> But if you have access to the dovecot config in your case, you might try
> removing the mail_attachment_detection_options setting above, if it's
> set. If it's not set, then you might be getting the "unintentional
> feature".

Thank you very much for your help. Indeed the add-flags-on-save option
was enabled in the config file. Gentoo's infrastructure team has agreed
to disable it for now, which made the problem go away.

> I suppose in the interim I could mess with `nnimap-transform-headers'
> and try to add some bookkeeping so that multiple FETCH responses for
> the same article UID get merged together. On the other hand, this
> feature only seems to relate to has/hasnoattachment flags, which Gnus
> doesn't handle anyway -- we could safely drop those lines altogether.

> (Though it sure would be nice to handle hasattachment flags, that's
> something that users have requested in the past...)

Maybe drop the extra FETCH responses for now, and add proper bookkeeping
later when implementing the requested feature?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Thu, 09 May 2019 20:16:01 GMT) Full text and rfc822 format available.

Message #41 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Ulrich Mueller <ulm <at> gentoo.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Thu, 09 May 2019 13:15:00 -0700
Ulrich Mueller <ulm <at> gentoo.org> writes:

>>>>>> On Thu, 09 May 2019, Eric Abrahamsen wrote:
>
>> Okay, here's what I was told on irc:
>
>> <tss> looks like it's the new feature that adds $HasAttachment or
>>       $HasNoAttachment flags to mails. they're actually supposed to be added
>>       only during mail delivery, and there's a setting needed to enable them:
>>       mail_attachment_detection_options = add-flags-on-save
>> <tss> but .. there's an "unintentional feature" :) that they also get added
>>       during some FETCH commands if they're not already there
>> <tss> but even without this, imap protocol allows sending FETCH FLAGS updates
>>       (or any updates really) as a response to any command. and with
>>       concurrent imap access dovecot does this.
>> <tss> for example if another client adds a \Seen flag, that same thing could
>>       happen
>> <jkt> either way, a client should really be able to process these
>>       "unexpeceted" FETCH updates, that's what the standard is about
>> --8<---------------cut here---------------end--------------->8---
>
>> Ultimately, the "real" fix would be to teach Gnus to handle all possible
>> responses from IMAP servers, probably using a proper parser.
>
>> But if you have access to the dovecot config in your case, you might try
>> removing the mail_attachment_detection_options setting above, if it's
>> set. If it's not set, then you might be getting the "unintentional
>> feature".
>
> Thank you very much for your help. Indeed the add-flags-on-save option
> was enabled in the config file. Gentoo's infrastructure team has agreed
> to disable it for now, which made the problem go away.

Well that was lucky.

>> I suppose in the interim I could mess with `nnimap-transform-headers'
>> and try to add some bookkeeping so that multiple FETCH responses for
>> the same article UID get merged together. On the other hand, this
>> feature only seems to relate to has/hasnoattachment flags, which Gnus
>> doesn't handle anyway -- we could safely drop those lines altogether.
>
>> (Though it sure would be nice to handle hasattachment flags, that's
>> something that users have requested in the past...)
>
> Maybe drop the extra FETCH responses for now, and add proper bookkeeping
> later when implementing the requested feature?

Okay, I'll work something up in the next week that goes halfway with
this.

Glad it's partially fixed.

Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sat, 22 Jun 2019 12:27:01 GMT) Full text and rfc822 format available.

Message #44 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sat, 22 Jun 2019 14:26:04 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

>> Maybe drop the extra FETCH responses for now, and add proper bookkeeping
>> later when implementing the requested feature?
>
> Okay, I'll work something up in the next week that goes halfway with
> this.

Did you get any further in fixing this nnimap parsing bug?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sat, 22 Jun 2019 16:28:02 GMT) Full text and rfc822 format available.

Message #47 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sat, 22 Jun 2019 09:27:10 -0700
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>>> Maybe drop the extra FETCH responses for now, and add proper bookkeeping
>>> later when implementing the requested feature?
>>
>> Okay, I'll work something up in the next week that goes halfway with
>> this.
>
> Did you get any further in fixing this nnimap parsing bug?

No I didn't! I looked at it for a while, had an internal conflict about
just dropping the lines vs actually doing something with them, imagined
all the work that would go into a more fully-featured parser, then got
distracted and forgot about it.

I still hope that in some distant future we could have a real parser
consuming these buffers. So far as I know the only in-emacs options are
in cedet -- wisent and the other one -- but I've never been able to make
them work. And now it sounds like cedet might not even stay in-tree?

Anyway, I'll make a real todo for dropping the lines, though it seems a
shame...

Eric




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sat, 22 Jun 2019 21:37:01 GMT) Full text and rfc822 format available.

Message #50 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sat, 22 Jun 2019 14:36:13 -0700
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>>> Maybe drop the extra FETCH responses for now, and add proper bookkeeping
>>> later when implementing the requested feature?
>>
>> Okay, I'll work something up in the next week that goes halfway with
>> this.
>
> Did you get any further in fixing this nnimap parsing bug?

Here's a whack at it. I tried to make sure that it would handle unwanted
FETCH responses whether they came before or after (or in the middle of)
the wanted FETCH responses, but I'm not in love with checking the header
regexp this way.

Because this IMAP server feature is very closely focused on adding a
flag in case of attachment (and because Gnus never explicitly requests
this flag, though I'd sure like to in the future), another more targeted
approach would be to simply delete any lines containing
$Has\(No\)?Attachment, assuming that these FETCH responses will only
take up one line.

I've configured my local Dovecot with the offending setting, and will
test it out for a bit.

Eric

[imap-header-transform-fix.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sun, 23 Jun 2019 12:14:01 GMT) Full text and rfc822 format available.

Message #53 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sun, 23 Jun 2019 14:13:29 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> No I didn't! I looked at it for a while, had an internal conflict about
> just dropping the lines vs actually doing something with them, imagined
> all the work that would go into a more fully-featured parser, then got
> distracted and forgot about it.

OK, I'll take a look at it...

> I still hope that in some distant future we could have a real parser
> consuming these buffers. So far as I know the only in-emacs options are
> in cedet -- wisent and the other one -- but I've never been able to make
> them work. And now it sounds like cedet might not even stay in-tree?

I had to add a parsing feature to wisent, and that was kinda more
painful than you'd expect.  :-/

But I haven't heard anything about dumping cedet from the tree.  Is that
the plan?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sun, 23 Jun 2019 12:24:01 GMT) Full text and rfc822 format available.

Message #56 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sun, 23 Jun 2019 14:23:50 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

>> Did you get any further in fixing this nnimap parsing bug?
>
> Here's a whack at it. I tried to make sure that it would handle unwanted
> FETCH responses whether they came before or after (or in the middle of)
> the wanted FETCH responses, but I'm not in love with checking the header
> regexp this way.

Well, I think it's OK...

> Because this IMAP server feature is very closely focused on adding a
> flag in case of attachment (and because Gnus never explicitly requests
> this flag, though I'd sure like to in the future), another more targeted
> approach would be to simply delete any lines containing
> $Has\(No\)?Attachment, assuming that these FETCH responses will only
> take up one line.

That sounds a bit brittle -- I'm sure there'll be other extensions like
this in the future to the IMAP protocol.

> I've configured my local Dovecot with the offending setting, and will
> test it out for a bit.

Great!

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sun, 23 Jun 2019 16:57:01 GMT) Full text and rfc822 format available.

Message #59 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sun, 23 Jun 2019 09:55:51 -0700
On 06/23/19 14:13 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> No I didn't! I looked at it for a while, had an internal conflict about
>> just dropping the lines vs actually doing something with them, imagined
>> all the work that would go into a more fully-featured parser, then got
>> distracted and forgot about it.
>
> OK, I'll take a look at it...
>
>> I still hope that in some distant future we could have a real parser
>> consuming these buffers. So far as I know the only in-emacs options are
>> in cedet -- wisent and the other one -- but I've never been able to make
>> them work. And now it sounds like cedet might not even stay in-tree?
>
> I had to add a parsing feature to wisent, and that was kinda more
> painful than you'd expect.  :-/

Oh, I thought that was most of the point of wisent to begin with. No
wonder I couldn't get it to do anything. In theory, do you have any
recommendations in the parsing direction.

> But I haven't heard anything about dumping cedet from the tree. Is that
> the plan?

No, I was skimming your threads about cleaning up the build process and
got the impression that it was unmaintained. I probably misinterpreted.

On 06/23/19 14:23 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>>> Did you get any further in fixing this nnimap parsing bug?
>>
>> Here's a whack at it. I tried to make sure that it would handle unwanted
>> FETCH responses whether they came before or after (or in the middle of)
>> the wanted FETCH responses, but I'm not in love with checking the header
>> regexp this way.
>
> Well, I think it's OK...

Cool.

>> Because this IMAP server feature is very closely focused on adding a
>> flag in case of attachment (and because Gnus never explicitly requests
>> this flag, though I'd sure like to in the future), another more targeted
>> approach would be to simply delete any lines containing
>> $Has\(No\)?Attachment, assuming that these FETCH responses will only
>> take up one line.
>
> That sounds a bit brittle -- I'm sure there'll be other extensions like
> this in the future to the IMAP protocol.

Sure, I'll stick with this.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sun, 23 Jun 2019 16:59:02 GMT) Full text and rfc822 format available.

Message #62 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sun, 23 Jun 2019 18:58:50 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

>> I had to add a parsing feature to wisent, and that was kinda more
>> painful than you'd expect.  :-/
>
> Oh, I thought that was most of the point of wisent to begin with. No
> wonder I couldn't get it to do anything. In theory, do you have any
> recommendations in the parsing direction.

Yes, that's the point of wisent, but as with any lex-like thing I've
dealt with, it's...  painful.  :-)  At least to me.

>> But I haven't heard anything about dumping cedet from the tree. Is that
>> the plan?
>
> No, I was skimming your threads about cleaning up the build process and
> got the impression that it was unmaintained. I probably misinterpreted.

We are all the maintainer of cedet now.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sun, 23 Jun 2019 17:24:03 GMT) Full text and rfc822 format available.

Message #65 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Sun, 23 Jun 2019 10:23:01 -0700
On 06/23/19 18:58 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>>> I had to add a parsing feature to wisent, and that was kinda more
>>> painful than you'd expect.  :-/
>>
>> Oh, I thought that was most of the point of wisent to begin with. No
>> wonder I couldn't get it to do anything. In theory, do you have any
>> recommendations in the parsing direction.
>
> Yes, that's the point of wisent, but as with any lex-like thing I've
> dealt with, it's...  painful.  :-)  At least to me.

Huh. There's a package in the repos called parsec that's pretty easy to
use, but nnimap couldn't rely on that....

>>> But I haven't heard anything about dumping cedet from the tree. Is that
>>> the plan?
>>
>> No, I was skimming your threads about cleaning up the build process and
>> got the impression that it was unmaintained. I probably misinterpreted.
>
> We are all the maintainer of cedet now.  :-)

Ugh.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Thu, 11 Jul 2019 17:39:01 GMT) Full text and rfc822 format available.

Message #68 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50; Gnus (nnimap) shows "ghost" messages in
 summary buffer
Date: Thu, 11 Jul 2019 10:38:38 -0700
On 06/23/19 14:23 PM, Lars Ingebrigtsen wrote:
> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>>> Did you get any further in fixing this nnimap parsing bug?
>>
>> Here's a whack at it. I tried to make sure that it would handle unwanted
>> FETCH responses whether they came before or after (or in the middle of)
>> the wanted FETCH responses, but I'm not in love with checking the header
>> regexp this way.
>
> Well, I think it's OK...
>
>> Because this IMAP server feature is very closely focused on adding a
>> flag in case of attachment (and because Gnus never explicitly requests
>> this flag, though I'd sure like to in the future), another more targeted
>> approach would be to simply delete any lines containing
>> $Has\(No\)?Attachment, assuming that these FETCH responses will only
>> take up one line.
>
> That sounds a bit brittle -- I'm sure there'll be other extensions like
> this in the future to the IMAP protocol.
>
>> I've configured my local Dovecot with the offending setting, and will
>> test it out for a bit.
>
> Great!

(NB This patch is very broken and no one should use it; I'm still
working on it. I want a proper parser!)




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Thu, 11 Jul 2019 20:29:01 GMT) Full text and rfc822 format available.

Message #71 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Thu, 11 Jul 2019 13:28:37 -0700
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> On 06/23/19 14:23 PM, Lars Ingebrigtsen wrote:
>> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>>
>>>> Did you get any further in fixing this nnimap parsing bug?
>>>
>>> Here's a whack at it. I tried to make sure that it would handle unwanted
>>> FETCH responses whether they came before or after (or in the middle of)
>>> the wanted FETCH responses, but I'm not in love with checking the header
>>> regexp this way.
>>
>> Well, I think it's OK...
>>
>>> Because this IMAP server feature is very closely focused on adding a
>>> flag in case of attachment (and because Gnus never explicitly requests
>>> this flag, though I'd sure like to in the future), another more targeted
>>> approach would be to simply delete any lines containing
>>> $Has\(No\)?Attachment, assuming that these FETCH responses will only
>>> take up one line.
>>
>> That sounds a bit brittle -- I'm sure there'll be other extensions like
>> this in the future to the IMAP protocol.
>>
>>> I've configured my local Dovecot with the offending setting, and will
>>> test it out for a bit.
>>
>> Great!
>
> (NB This patch is very broken and no one should use it; I'm still
> working on it. I want a proper parser!)

Turns out the dumb thing was simple: I was testing if the FETCH line was
followed by mail headers by looking for:

"\\(From\\|To\\|Subject\\|Date\\|Message-ID\\)"

Which is obviously insufficient. I've since changed it to:

"\\([A-Z][[:ascii:]-]+: \\)"

Which works better, but also seems susceptible to breakage due to
ignorance. A quick scan doesn't turn up any `mail-header-regexp'
variables or `this-is-a-mail-header-p' functions -- does the above
regexp seem reasonable?





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Fri, 12 Jul 2019 14:19:02 GMT) Full text and rfc822 format available.

Message #74 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Fri, 12 Jul 2019 16:18:02 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> Which is obviously insufficient. I've since changed it to:
>
> "\\([A-Z][[:ascii:]-]+: \\)"
>
> Which works better, but also seems susceptible to breakage due to
> ignorance. A quick scan doesn't turn up any `mail-header-regexp'
> variables or `this-is-a-mail-header-p' functions -- does the above
> regexp seem reasonable?

Headers are case insensitive...  but not all characters in the [:ascii:]
set are allowed; far from it.  [:alnum:] is closer, but with - and...
er...  stuff...  One of the RFCs probably has the definition.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Fri, 12 Jul 2019 15:03:04 GMT) Full text and rfc822 format available.

Message #77 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Fri, 12 Jul 2019 17:02:22 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> (NB This patch is very broken and no one should use it; I'm still
> working on it. I want a proper parser!)

Yes, that would be nice.  But there wasn't any patch attached.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Fri, 12 Jul 2019 16:51:02 GMT) Full text and rfc822 format available.

Message #80 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50; Gnus (nnimap) shows "ghost" messages in
 summary buffer
Date: Fri, 12 Jul 2019 09:50:01 -0700
[Message part 1 (text/plain, inline)]
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> Which is obviously insufficient. I've since changed it to:
>>
>> "\\([A-Z][[:ascii:]-]+: \\)"
>>
>> Which works better, but also seems susceptible to breakage due to
>> ignorance. A quick scan doesn't turn up any `mail-header-regexp'
>> variables or `this-is-a-mail-header-p' functions -- does the above
>> regexp seem reasonable?
>
> Headers are case insensitive...  but not all characters in the [:ascii:]
> set are allowed; far from it.  [:alnum:] is closer, but with - and...
> er...  stuff...  One of the RFCs probably has the definition.  :-)

Oh, good point. RFC2822 says chars 33 to 126, inclusive, minus the
colon. So I guess it's "[!-9,;-~]+: ", unlikely as some of those
characters seem.

Now I'm working with the attached diff.

Eric
[imap-header-transform-fix.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Fri, 12 Jul 2019 17:00:02 GMT) Full text and rfc822 format available.

Message #83 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: bug-gnu-emacs <at> gnu.org
Subject: Re: bug#35443: 27.0.50;
 Gnus (nnimap) shows "ghost" messages in summary buffer
Date: Fri, 12 Jul 2019 09:58:49 -0700
[Message part 1 (text/plain, inline)]
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>>
>>> Which is obviously insufficient. I've since changed it to:
>>>
>>> "\\([A-Z][[:ascii:]-]+: \\)"
>>>
>>> Which works better, but also seems susceptible to breakage due to
>>> ignorance. A quick scan doesn't turn up any `mail-header-regexp'
>>> variables or `this-is-a-mail-header-p' functions -- does the above
>>> regexp seem reasonable?
>>
>> Headers are case insensitive...  but not all characters in the [:ascii:]
>> set are allowed; far from it.  [:alnum:] is closer, but with - and...
>> er...  stuff...  One of the RFCs probably has the definition.  :-)
>
> Oh, good point. RFC2822 says chars 33 to 126, inclusive, minus the
> colon. So I guess it's "[!-9,;-~]+: ", unlikely as some of those
> characters seem.
>
> Now I'm working with the attached diff.

Sorry, this one...

[imap-header-transform-fix.diff (text/x-patch, attachment)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Sun, 14 Jul 2019 16:20:02 GMT) Full text and rfc822 format available.

Message #86 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443 <at> debbugs.gnu.org
Subject: Re: bug#35443: 27.0.50; Gnus (nnimap) shows "ghost" messages in
 summary buffer
Date: Sun, 14 Jul 2019 09:19:31 -0700
On 07/12/19 09:50 AM, Eric Abrahamsen wrote:
> Lars Ingebrigtsen <larsi <at> gnus.org> writes:
>
>> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>>
>>> Which is obviously insufficient. I've since changed it to:
>>>
>>> "\\([A-Z][[:ascii:]-]+: \\)"
>>>
>>> Which works better, but also seems susceptible to breakage due to
>>> ignorance. A quick scan doesn't turn up any `mail-header-regexp'
>>> variables or `this-is-a-mail-header-p' functions -- does the above
>>> regexp seem reasonable?
>>
>> Headers are case insensitive...  but not all characters in the [:ascii:]
>> set are allowed; far from it.  [:alnum:] is closer, but with - and...
>> er...  stuff...  One of the RFCs probably has the definition.  :-)
>
> Oh, good point. RFC2822 says chars 33 to 126, inclusive, minus the
> colon. So I guess it's "[!-9,;-~]+: ", unlikely as some of those
> characters seem.
>
> Now I'm working with the attached diff.

I think this is the one. I'll push in a bit.




Reply sent to Eric Abrahamsen <eric <at> ericabrahamsen.net>:
You have taken responsibility. (Mon, 15 Jul 2019 17:46:03 GMT) Full text and rfc822 format available.

Notification sent to Ulrich Mueller <ulm <at> gentoo.org>:
bug acknowledged by developer. (Mon, 15 Jul 2019 17:46:04 GMT) Full text and rfc822 format available.

Message #91 received at 35443-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 35443-done <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50; Gnus (nnimap) shows "ghost" messages in
 summary buffer
Date: Mon, 15 Jul 2019 10:45:38 -0700
There goes...




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#35443; Package emacs. (Mon, 15 Jul 2019 18:17:01 GMT) Full text and rfc822 format available.

Message #94 received at 35443 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Eric Abrahamsen <eric <at> ericabrahamsen.net>
Cc: 35443 <at> debbugs.gnu.org, Ulrich Mueller <ulm <at> gentoo.org>
Subject: Re: bug#35443: 27.0.50; Gnus (nnimap) shows "ghost" messages in
 summary buffer
Date: Mon, 15 Jul 2019 20:16:00 +0200
Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:

> There goes...

:-)

Works for me.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 13 Aug 2019 11:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 312 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.