emersion / go-imap

📥 An IMAP library for clients and servers
MIT License
2.07k stars 292 forks source link

client: automatic IDLE #622

Open emersion opened 3 months ago

emersion commented 3 months ago

IMAP was meant to allow servers to send updates at any time, but because clients didn't cope well with that, servers only sent updates when a command is executed, and then IDLE was standardized.

Add a knob to automatically turn on IDLE after a timeout, and stop it right before any other command gets executed. That way clients get more-or-less instant updates for free.