Bug 432973 - Expunging a lot of messages is aborted with an error message because of NOOP
Summary: Expunging a lot of messages is aborted with an error message because of NOOP
Status: RESOLVED NOT A BUG
Alias: None
Product: trojita
Classification: Applications
Component: IMAP (other bugs)
Version First Reported In: 0.7
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Trojita default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-15 14:55 UTC by Hubert Kario
Modified: 2021-02-15 15:23 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hubert Kario 2021-02-15 14:55:13 UTC
SUMMARY
When I was cleaning a large mailbox on the server, the connection was aborted after invoking the EXPUNGE command

STEPS TO REPRODUCE
1. mark for deletion a lot of messages (few thousand)
2. invoke EXPUNGE (Ctrl+E) on the mailbox

OBSERVED RESULT
15:44:17.781 conn Mailbox opened.
15:44:17.781 Imap::Mailbox::FetchMsgPartTask bugzilla: parts BINARY.PEEK[1] for UIDs 447987 Completed
15:44:17.781 Imap::Mailbox::FetchMsgPartTask bugzilla: parts BINARY.PEEK[1] for UIDs 447987 Fetched part BINARY.PEEK[1] for UID 447987
15:44:18.949 Imap::Mailbox::ExpungeMailboxTask Activated
15:44:18.950 >>> y53 EXPUNGE␍␊
15:44:34.163 <<< * NOOP␍␊
15:44:34.163 UnrecognizedResponseKind NOOP␊* NOOP␍␊␊      ^ here
15:44:34.163 Imap::Mailbox::ExpungeMailboxTask Failed: Going offline
15:44:34.163 conn Logged out.
15:44:34.164 *** Connection killed.

EXPECTED RESULT
the NOOP is most likely used by the server as a "keep-alive" message, to ensure that the connection isn't dropped; Trojita should handle them and ignore

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Fedora 32; trojita-0.7.0.1-0.5.20191104git36b0587.fc32.x86_64
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.75.0
Qt Version: 5.14.2

ADDITIONAL INFORMATION
Upon reconnecting, all the messages marked for deletion are actually deleted, despite the unorderly closure of the connection.

Server is Zimbra identifying itself as VERSION "8.0.6_GA_5922"
Comment 1 Jan Kundrát 2021-02-15 15:09:02 UTC
Hi
this is a server bug, please report it to the Zimbra upstream.

In the IMAP protocol, there's the NOOP command (not a response), and there are various untagged reponses ("* OK", "* NO", "* BAD"), but a "* NOOP" response is not defined anywhere. The server should probably use something like "* OK noop\r\n" if it wants to send a protcol-level keepalive.

Trojita is an IMAP mail client which focuses on offloading as much as possible to the server side. I do not think you'll have an experience that you're going to like with a combination of Zimbra + Trojita :(.

With kind regards,
Jan
Comment 2 Hubert Kario 2021-02-15 15:23:14 UTC
Well, my experience with Zimbra+Trojita is much better than combination of Zimbra+Kontact, so I'll just press the Ctrl+E a bit more often.

Would prefer a workaround on Trojita level, but I totally understand not wanting to have bug workarounds.