IMAPx: No IDLE after extraneous connection reset
Evolution's IMAP IDLE support is unreliable if a server (or someone else) resets TCP connection. Although in such case, Evolution reconnects to the server, but no longer uses the IDLE command. So a user loses their instant notifications of new emails until Evolution is restarted. There are no IDLE commands after an RST packet. However, periodic updates are performed.
To continue idling, a user may restart Evolution or put it to offline mode and
then to online. In later case, imapx_disconnect_sync
and imapx_connect_sync
functions are called, and the idle_mailboxes
hash in camel-imapx-conn-manager.c
is cleaned, so the mailer may use IDLE again. I daresay the hash should be
cleaned after accidental connection loss or just before reinitiating a new one.
To force disconnecting, you may use ss(8) utility. This results in the same state, if a server would reset IMAP connection.
sudo ss -K dst 77.88.21.125 dport = 993 -n
The issue appears at least in 3.34.1 and 3.37.1 versions. This description is based on email thread [Evolution] IMAP IDLE and TCP resetting.