How do I change the IMAP connection timeout?
System Info: Thunderbird Version 68.6.0 (32 bit) running on Windows 10 Pro Version 1903 (OS Build 18362.719). 48GB of RAM 561GB of disk space remaining on system partition where Thunderbird and data files are installed.
I'm trying to move 5000+ email messages from a local folder to an IMAP service. Managing the potential risk of losing messages, I decided I would copy the emails from the local folder to a new folder on the destination IMAP email account.
At first, I tried Apple iCloud. Based on my second experience (see below), it appears Apple iCloud server side has a very very short timeout value. I get to around 10-11 messages and then Thunderbird reports back that the connection timed out.
Next, I tried Microsoft Outlook Live (or hotmail.com). I always get to around 227 email messages before the copy operation also times out. Researching the issue a little more, I find that timeouts normally occur when copying large messages. Microsoft's IMAP migration tips also indicate that the largest email message they will happily accept is 35Mb. See https://docs.microsoft.com/en-us/exchange/mailbox-migration/migrating-imap-mailboxes/migrating-imap-mailboxes
So I sort my local folder by size and noticing that Thunderbird is reporting the largest email message I have is 27Mb, I started experimenting by copying a single large email message first. This single email message copy operation timed out.
Once upon a time in a very early iteration of Thunderbird, the IMAP connection timeout was configurable. See https://www.ecenica.com/support/answer/how-to-fix-connection-to-server-timeout-error-in-thunderbird/
After a few minutes, I also notice that the single large email message eventually makes its way to Outlook Live because I can eventually see the email message and even download the large attachments from it. This would suggest that Outlook Live is not timing me out as the server is still taking in the large email message. Instead, Thunderbird is timing me out.
Is there a way for me to get to this setting in the current version of Thunderbird?
Gewysig op
Gekose oplossing
In Tools/Options/Advanced/General/Config. editor, you can try changing mailnews.tcptimeout, but the main problem is that IMAP is not suited for large-scale uploading to the mail server. Besides timeouts, you may be subject to upload bandwidth limits, as e.g. with gmail.
Lees dié antwoord in konteks 👍 1All Replies (7)
Gekose oplossing
In Tools/Options/Advanced/General/Config. editor, you can try changing mailnews.tcptimeout, but the main problem is that IMAP is not suited for large-scale uploading to the mail server. Besides timeouts, you may be subject to upload bandwidth limits, as e.g. with gmail.
Thanks sfhowes.
I bumped it up from its current 100 setting to 250 and it was able to handle 5Mb emails when previously, it had trouble handling >3.5Mb emails.
You're also right about the large scale uploading point of view. Its extremely inefficient. Is there an alternate way I should get my emails onto an mail server instead?
If the reason to upload mail to the IMAP server is to make it available on other computers, it may be easier to just manually copy the mail to Local Folders on the other computers. If you don't have access to the other computers, you could save the folders as mbox files, upload them to a file storage site, then download to a computer and copy into Mail/Local Folders in the profile folder.
There are several recent comments worth reading here:
Thanks @sfhowes. I need to move email messages people have on their local machines to the mail server so they are backed up.
The recent bugzilla thread you referenced is exactly what I expect mailnews.tcptimeout to behave. It is highly dependent on what the LAN and WAN latencies are, the slowest network transfer speed between the two points of transfer and traffic. Todd probably would get better results if he tries to migrate customer data overnight during the graveyard shift when traffic is minimised.
I was curious as to what the boundaries were for the value of mailnews.tcptimeout. I see Todd bumped it up to 1000 but not sure if Thunderbird simply ignores values outside its bounds and falls back to a default.
Gene Smith created a IMAP APPEND bug associated with that thread.
He seems to be suggesting that another parameter be created called mailnews.tcptimeout_append but this is just another static timer which I feel won't resolve issues for users because every user's environment is different. i.e. The path from the user's computer where Thunderbird is running can traverse firewalls, proxies, routers, switches and other appliances before it even gets to the destination IMAP server.
What he should do is if the user attempts to transfer a message greater than 3Mb or if a number of messages are concerned, where at least one of them is greater than 3Mb, before the copy/move of large message(s), Thunderbird should test the transfer with a large message or a 1024Kbyte IMAP payload and measure the time it takes to get that across without a timeout. Once Thunderbird gets a feel for how long it might take, Thunderbird can then simply adjust mailnews.tcptimeout or mailnews.tcptimeout_append if there is a good reason to have a second parameter (I like to keep things simple).
That is an interesting approach, and while large manual uploads to IMAP servers are not too common, uploading draft messages with attachments to an IMAP Drafts folder happens frequently unless drafts are directed to Local Folders, which avoids some issues.
laugher said
Gene Smith created a IMAP APPEND bug associated with that thread.
I was experiencing the same thing you were, and I found that above bug (and this subsequent bug https://bugzilla.mozilla.org/show_bug.cgi?id=1618455) extremely helpful.
If APPEND acknowledgement takes more than 20 seconds, TB will fail the transfer. It appears that even short/small emails might timeout to gmail. I had 20 kB emails taking more than 20 seconds that were in deep nested folders or multiple folders. I'm guessing gmail is doing some indexing before actually appending them in to the correct folder(s), which might take more than 20 seconds.
The annoying part is that the 20 second timeout is not editable anywhere and independent of all other timeouts, so having a separate setting might be needed.
Gewysig op