Closed Bug 1302228 Opened 9 years ago Closed 4 years ago

Enhancement: Keep/Store IMAP message body and attachment that are downloaded locally in cache, although folder is not configured for offline use

Categories

(MailNews Core :: Networking: IMAP, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kripper3, Unassigned)

References

(Depends on 1 open bug)

Details

(Whiteboard: [dupme?])

User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.101 Safari/537.36 Steps to reproduce: I'm using a IMAP account with "Keep messages for this account on this computer" option, because I want the downloaded content to be available for offline use. Actual results: When sync'ing folders, headers + body + attachments are downloaded, but I only want to download headers. Expected results: I want to only sync headers, because I'm using a Satellite Internet connection (slow and expensive). If I uncheck "Keep messages for this account on this computer" only headers are downloaded (which is fine), but if I open a message and download body + attachments, this content is not available after I go offline. Thus I have to go online and download it again, which is what we want to avoid. I'm not sure if I'm missing some option or requirement, but I didn't find a way to: 1) Only download headers and 2) Store the downloaded content for offline use. Please confirm, since this seems to be a basic requirement.
I disabled the "Enable adaptive Junk..." setting and messages are now fetched as only headers. I also found out that messages are only stored for offline use if the folder is marked as "Download" for in "Synchronization & Storage" > "Advanced..." options, so I'm done. BTW, It's a little confusing that messages are stored for offline use even when the Adaptive Junk settings are enabled and the folder *IS NOT MARKED* as "Download". IMO, the fact that Junk settings are overwriting the behavior of the "Download" option is an inconsistency. The correct behavior should be: only store content for offline use if folder is marked as "Download" (no matter the junk settings).
Nope. I just found out that marking folders as "Download" makes TB automatically download the whole messages with all attachments which is unaffordable for Satellite Internet connections, so I had to uncheck the "Download" option. Conclusion: Disabling junk settings makes it possible to only fetch message headers, but then the content is not stored for offline mode and must be downloaded again each time, which is also unaffordable for Satellite Internet connections. How to reproduce: - Send a mail with 1 MB attachment from external webmail to a TB account with "Keep messages for this account on this computer" option enabled and junk settings disabled. - Mail is received, and only headers are fetched (OK). - Without clicking the message, go offline. - Click the message. TB says "The body of this message has not been downloaded" (OK). - Go online. - Click the message. Content is downloaded and shown (OK). - Go offline again. - Click the message. TB says "The body of this message has not been downloaded" (WRONG!) Expected results: - Content should be downloaded only once, stored locally and shown in offline mode without requiring to download it again.
Severity: normal → critical
OS: Unspecified → All
Priority: -- → P3
Hardware: Unspecified → All
Summary: Only download headers, but store remaining content for offline use if it was downloaded (IMAP) → IMAP messages are not stored locally for offline use
This is not a critical bug (please read the definition), but an enhancement. You basically want "conditional" offline use. What has been downloaded once on demand shouldn't be downloaded again.
Severity: critical → enhancement
I don't want to take more minutes to understand this report where comment 0 reads full of contradictions, but comment 2 sounds like a bug, no?
Priority: P3 → --
Well, comment #2 says "WRONG" once. But that's not a bug. The folder wasn't chosen for offline use, so there is no offline use. Every time you touch this in a new session (it's cached while not leaving the session), you download it again. As I said: The reporter is asking for "conditional" or "on demand" offline use. What has been downloaded once should be stored. Maybe we could change the cache from memory cache to disk cache, so we could rely on it here. Having been through the IMAP stuff for my caching changes I know that this is fiendishly hard to do and won't happen, unless someone is willing to fund the work.
Thanks. Perhaps you can help the reporter by mod the summary to something acccurate and more comprehensible, and pick a component. :)
Summary: IMAP messages are not stored locally for offline use → Enhancement: Store IMAP messages that are downloaded locally, although folder is not configured for offline use
Component: Untriaged → Networking: IMAP
Product: Thunderbird → MailNews Core
Version: 45 Branch → Trunk
Depends on: 1302422
Filed bug 1302422 for further looking into my idea from comment #5 ("Maybe we could change the cache from memory cache to disk cache, so we could rely on it here").
Thanks for mod the(In reply to Jorg K (GMT+2) from comment #3) > This is not a critical bug (please read the definition), but an enhancement. > You basically want "conditional" offline use. What has been downloaded once > on demand shouldn't be downloaded again. Right! Satellite Internet users 1) don't want to check the "Download" checkbox because it will download *ALL* messages and 2) don't want to have to download to same message more than once, because Satellite Internet is very expensive and slow. I agree with comment #5. When "Keep messages for this account on this computer" is enabled, messages should not be cached on memory, but on disk. Thanks Jorge K.
Well, if you read bug 1302422, you can see that switching to "disk cache" has a technical problem. And changing the IMAP behaviour to store once downloaded messages is not simple to do. Given that this is an enhancement and TB is maintained by a few overworked and unpaid volunteers, I don't see this implemented any time soon, unless you can implement it yourself or hire someone to do it.
Here I share a workaround for other Internet Satellite users: - Go into offline mode - Mark messages to be downloaded with a star - Go online and select option [Offline > Get Starred Messages] This way, starred messages will be downloaded to disk cache only once. Note that offline mode is necessary to avoid messages to be downloaded into memory cache (non-persistent) when you click and mark them with a star. Besides, it seems that Adaptive Junk checkbox must also be disabled to avoid messages to be downloaded, since we only want the headers.
(In reply to Jorg K (GMT+2) from comment #7) > Filed bug 1302422 for further looking into my idea from comment #5 ("Maybe > we could change the cache from memory cache to disk cache, so we could rely > on it here"). Wait...I guess "disk cache" is not the same as "local storage", is it? When "Keep messages for this account on this computer" is enabled and a user opens a message and their mime parts are downloaded, shouldn't the downloaded content be stored in the same way it is stored when a user clicks the [Offline > Get Starred Messages] option? I mean, can we just trigger the same code here when a message is clicked so TB doesn't download the content again every time?
(In reply to Christopher from comment #11) > Wait...I guess "disk cache" is not the same as "local storage", is it? Disk cache, which we don't use (we use memory cache) and local storage are different. In fact, is local storage is active, there is no caching. > When "Keep messages for this account on this computer" is enabled and a user > opens a message and their mime parts are downloaded, shouldn't the > downloaded content be stored in the same way it is stored when a user clicks > the [Offline > Get Starred Messages] option? I think so, all this goes to local storage.
(In reply to Jorg K (GMT+2) from comment #12) > (In reply to Christopher from comment #11) > > When "Keep messages for this account on this computer" is enabled and a user > > opens a message and their mime parts are downloaded, shouldn't the > > downloaded content be stored in the same way it is stored when a user clicks > > the [Offline > Get Starred Messages] option? > I think so, all this goes to local storage. Well, that's not happening. Mime parts are not stored in local storage even when this options is enabled. Should I rename this bug report or open a new (refurbished) one instead?
Summary: Enhancement: Store IMAP messages that are downloaded locally, although folder is not configured for offline use → Enhancement: Keep/Store IMAP message body and attachment that are downloaded locally in cache, although folder is not configured for offline use
Whiteboard: [dupme?]

I'm not sure I completely understand this bug. If the reporter is still listening and still using tb, I'm curious if this is still a problem.

I'm thinking that maybe disabling autosync so that only opened messages are synced may be a factor here.

Also, I've noticed that with junk detection turned on, even if you configure tb to only store headers that the whole message is still downloaded so that the message content is scanned for junk. I think that applies to even binary parts like PDF attachments, not sure.

Flags: needinfo?(kripper3)

Since this is a very specific use case about using TB with a Satelite Internet connection, I would suggest to close this report for now.
If someone else is interested in reducing TB's bandwith ussage, the above comments include detailed information of the problem and a workaround.
Understanding this issue requires some patience and time to reproduce the testing scenario which may not be worth considering there are other issues with more coverage and that I found and posted a workaround.

Please close.

Flags: needinfo?(kripper3)
Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.