Subject: Re: bug#54158: 28.0.91; duplicate mail downloads in Gnus (IMAP)

From: Roland Winkler <[email-masked]>
Date: Fri, 18 Mar 2022 12:55:09 -0500

On Fri, Mar 18 2022, Robert Pluim wrote:
> You mean (setq imap-log t)?

YES, thank you!  So finally I can be more specific:

(1) When the message from Imap folder FOO is not properly deleted on the
    server, the log buffer says (Emacs 28)

11 OK UID FETCH completed%d
12 UID STORE 135750,27 +FLAGS (\Deleted)%d
12 OK STORE completed%d
13 CLOSE%d
13 OK CLOSE completed%d

(2) When Emacs 28 does properly delete the message in Imap folder FOO,
    the log buffer says

9 OK UID FETCH completed%d
10 UID STORE 27 +FLAGS (\Deleted)%d
* 1 FETCH (UID 27 FLAGS (\Deleted))%d
10 OK STORE completed%d
11 CLOSE%d
11 OK CLOSE completed%d

The details are interesting:

(1) I got the first snippet when Emacs 28 first downloaded and properly
    deleted a message from INBOX (this message had UID 135750), then
    things failed as shown for the message downloaded from folder FOO.

    It seems the UID of the message from INBOX reappeared when Gnus
    wanted to download the message from FOO.

(2) In the second IMAP session, there was only the message in FOO and
    nothing in INBOX.  Then Emacs 28 properly downloaded and deleted the
    message from folder FOO.