The behaviour I want is that Thunderbird only downloads large IMAP
messages when they are specifically requested by the user, e.g. they are
selected for read or for download using 'Get Selected Messages' and 'Get
Starred Messages'. Using nsIAutoSyncMsgStrategy I can exclude messages
larger than 100KB being downloaded by AutoSync, but if I want to
manually sync using 'Download/Sync Now' I get the traditional offline
behaviour i.e. all messages in offline folders are downloaded.
I see a number of ways to implement the desired behaviour:
1. Ideally modify nsImapOfflineDownloader/nsAutoSyncManager to run on
demand
2. Modify nsImapMailFolder::GetBodysToDownload() to provide limited
support to strategies using nsIAutoSyncMsgStrategy::IsExcluded()
3. Least desirable modify nsImapMailFolder::DownloadAllForOffline() to
use nsIAutoSyncState::ProcessExistingHeaders(). But how would you know
when it has finished?
Thoughts?
The background for this is that I am currently living in Nepal and I am
trying to write an extension for use in low bandwidth conditions.