On Wed, 2005-03-30 at 22:21 +0200, Paul J Stevens wrote: > Geo Carncross wrote: > > > DBMail doesn't support IDLE [yet?] > > I've added it to the TODO for 2.1.2 after reading the relevant rfc.
Clients that support IDLE also [tend to] support unsolicited updates to the current mailbox, which is just as good- and actually better if SEARCH is cheap-enough. One way to make it cheap is to have a global flag per mailbox/folder: On login or logout, set the flag. If a SEARCH command is run, clear the flag. If the database is updated, set the flag. If the SEARCH command (the EXACT SAME ONE) occurs again, AND the flag is clear, return the exact same result-line. Some clients try to use IDLE and handle it very wrong [most notably, Outlook Express]. If you DO support IDLE directly, make sure that inactivity timers are TURNED OFF during it, so really broken clients (Lookout!) aren't given strange error messages. It's actually pretty easy: send random junk every 10 seconds (an empty notification, perhaps) so that if a client disappears one of two things will happen: 1. TCP output buffers will eventually fill. 2. We'll receive an RST from the remote. Both cases are detectable. Outlook Express, btw, ignores the IDLE responses even though it [sometimes?] appears to honor unsolicited updates. -- Internet Connection High Quality Web Hosting http://www.internetconnection.net/