IMAP IDLE does not reconnect after a server timeout drops the connection. TB stops getting new messages because new mail notification via IDLE won't come from server
Categories
(MailNews Core :: Networking: IMAP, defect)
Tracking
(Not tracked)
People
(Reporter: azverkan, Assigned: gds)
References
Details
(Whiteboard: [set small mail.server.server#.timeout if frequent connection loss])
Attachments
(1 file, 1 obsolete file)
|
27.50 KB,
patch
|
Details | Diff | Splinter Review |
Comment 1•17 years ago
|
||
Comment 2•17 years ago
|
||
Comment 3•17 years ago
|
||
Comment 4•17 years ago
|
||
Updated•17 years ago
|
Updated•17 years ago
|
Comment 5•17 years ago
|
||
Comment 6•16 years ago
|
||
Comment 7•16 years ago
|
||
Comment 8•15 years ago
|
||
Comment 9•15 years ago
|
||
Updated•15 years ago
|
Comment 10•15 years ago
|
||
Comment 11•15 years ago
|
||
Comment 12•15 years ago
|
||
Comment 13•15 years ago
|
||
Comment 14•15 years ago
|
||
Comment 15•15 years ago
|
||
Comment 16•15 years ago
|
||
Comment 17•15 years ago
|
||
Comment 18•15 years ago
|
||
Comment 19•15 years ago
|
||
Comment 20•14 years ago
|
||
Comment 21•13 years ago
|
||
Comment 22•13 years ago
|
||
Comment 23•13 years ago
|
||
Comment 24•13 years ago
|
||
Comment 25•13 years ago
|
||
Comment 26•13 years ago
|
||
Comment 27•13 years ago
|
||
Comment 28•13 years ago
|
||
Updated•13 years ago
|
Comment 29•13 years ago
|
||
Comment 30•12 years ago
|
||
Updated•12 years ago
|
Comment 31•12 years ago
|
||
Comment 32•12 years ago
|
||
Updated•12 years ago
|
Comment 33•10 years ago
|
||
Comment 34•9 years ago
|
||
| Assignee | ||
Comment 35•8 years ago
|
||
| Assignee | ||
Comment 36•8 years ago
|
||
Comment 37•8 years ago
|
||
| Assignee | ||
Updated•7 years ago
|
Updated•4 years ago
|
Comment 38•3 years ago
|
||
bug 344205 has since been closed, fixed by Gene in 2018-11-09. But Christian seems gone.
Gene, Is this patch still worth persuing as a general solution?
Comment 40•3 years ago
|
||
Bugs with sleep, wake, hibernate in summary - https://mzl.la/3Wpo405
| Assignee | ||
Comment 41•3 years ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #38)
bug 344205 has since been closed, fixed by Gene in 2018-11-09. But Christian seems gone.
Gene, Is this patch still worth persuing as a general solution?
I tried testing this again with what I think is the worst case server for this (yahoo) which drops inactive connection after 5 minutes even though the rfc says it should hold the connection for 30m. Anyhow, if I redo yahoo's idle every 4 minutes to avoid yahoo's drop, it works for exactly 60 minutes but then yahoo still shuts down the connection . So the algorithm I originally propose for this bug (comment 36) doesn't fix the problem completely for yahoo since it still stops idle by dropping the connection after 60 minutes if nothing received. This is with no biff time enabled.
But if I set the biff time to 60m and redo yahoo's idle every 4 minutes, this revives the connection to Inbox and continues on and the idle redo works for another hour then yahoo drops the connection and biff re-establishes it, etc.
After a lot of testing and waiting (it takes an hour for yahoo to flag an error) I did get it to come back with biff disabled as long as I don't sleep the computer for more than 5 minutes (yahoo's timeout). If I sleep or hibernate more than 5 minutes, there is nothing to automatically cause the connection to inbox to come back without a biff event like a folderstatus URL -- an automatic re- connect to inbox doesn't occur without biff after wakeup. Autosync can cause a re-connect to inbox (if it has new mail and if you've been sleeping for at least the biff time) but unless you are using offline store autosync won't occur either. If after wakeup you select another folder and then go back to Inbox it will re-connect to inbox; also "get mail" button will. So some maybe non-intuitive user actions are needed to restore idle after wakeup without a fairly short biff time set. But imap idle is not really intended to eliminate or replace biff so I suppose this is useful and fills in a gap in the TB imap design.
I'll submit a new formal patch shortly.
I need to re-test this but probably just setting the diff time to 4 minutes would do the same thing with maybe a bit less network activity (and no code changes).
I haven't tested this with a 30m timeout server like dovecot, but for those servers just setting the biff time to 29 minutes would probably solve the problem too, at least for Inbox. But if user wants to check other folders for new mail using biff, the 29 minute setting might be unacceptably long since IDLE isn't automatically enabled for them, only for Inbox.
| Assignee | ||
Comment 42•3 years ago
|
||
Here's a completed possible change to support the timed idle reissue. I added a new advanced server setting for the reissue timer defaulting to 29 seconds as specified in the RFC which sets the value of the currently existing preference mail.server.serverX.timeout. The allowed range on the parameter is 0 to 1440 minutes (where 1440 minutes is 24 hours). A value of zero disables the idle reissue and for new account setups it defaults to 29 minutes.
For change to the parameter to take effect an IMAP url must occur for the account such as a user click of Get Messages button or opening a new message. A TB restart will also cause a new idle reissue time setting to take effect.
As I mentioned before, yahoo (with it's very short 5 minute connection timeout) requires that the idle reissue time be set to 4 minutes. This keeps the connection alive for 1 hour but then yahoo still disconnects. Then the connection is re-established and the reissues continue.
Other servers like dovecot keep the connection for 30 minutes as required by the RFC. So the default idle reissue parameter of 29 minutes keeps the connection alive.
However, in both cases it appears that the biff timer can have the same effect.
In the case of short timeout yahoo, with idle reissue disabled and biff timer set to 4 minutes, you have basically the same result. In that case idle is stopped and a noop is sent and then idle is reissued. So the only real advantage of using the proposed idle reissue timer is that the noop is not sent.
In the case of servers that follow the RFC and keep the connection for at least 30 minutes, setting the biff timer to 29 minutes has the same effect except for the added noop. The connection is maintained indefinitely.
This proposed feature seems to me to only possibly be useful to user that prefer to not set a biff time and rely on imap IDLE or the "Get Mail" button to bring in new mail. So for that small set of users, I would say just set your biff timer to the longest possible server-dependent value to keep the idling connection alive.
For now, I'm just attaching/archiving my work on this rather than submitting a formal patch. (Maybe I'm missing something here and this really is useful?)
| Assignee | ||
Comment 43•3 years ago
|
||
Going ahead and closing this as WONTFIX.
Description
•