On Sat, Aug 03 2013, Lars Magne Ingebrigtsen wrote: > For one, you have to establish reasonable timeouts, but there are none > that can be used generally. For instance, when you send a DELETE > command to an IMAP server, it may take 20 seconds for it to remove the > message and re-create a big folder. You don't want to wait 20 seconds > in general before saying "ok, we have a timeout and should reconnect". In such a case, the other problem is that the connection is going to block Emacs anyway, even for a good reason. Thinking out loud: I think most IMAP clients uses a pool of several connections in the background to deliver actions based on some sort of queue, like delete something or fetch this. Having this would solve partially the problem since if a connection goes AWOL, you just have to wait for the kernel to kill the TCP connection it at some point (which might takes time), but you can continue to create new (working) connections to fulfil the user requests in the meantime, and then requeue the action that timed-out. -- Julien Danjou ;; Free Software hacker ; freelance consultant ;; http://julien.danjou.info