Issue with idle connections and one question about online/offline status of Evoltion
I've enabled "Listen for server change notifications" feature for all my email accounts because the email servers I'm using support it (Gmail IMAP and Office 365 Exchange EWS). The feature works pretty well but I've noticed that if there's a long idle period and no emails are received or sent (if my computer is turned on but mostly idling over the night for example) the feature stops working for some accounts sometimes. Evolution does not receive or notify me about new mails that have been arrived couple of hours ago (even the icon besides the account is saying that it should be connected and online and the icon in the status bar is showing connected / online status as well). But then if I click and open the account's Inbox folder then it receives the messages for that account immediately.
I think there is some problem with the connection if its idle for too long time and the session or TCP conection has been terminated or timed out but Evolution isn't aware of it and believes everything is fine?
Another question related to this: Is there any way to command Evolution go to offline and to online mode via CLI or using some API/simple program like dbus-send or something similar. I want to create a script which can automatically force a running Evolution instance go to offline or to online without interacting with the GUI (pushing the online/offline icon in the status bar or clicking from the menu File => Work Offline/Online).
I'm using Evolution version pulled from GIT on 2018-10-27 (3.31.2). Linux distribution I'm using is CentOS 7.