MozillaZine

Can't stop Thunderbird from loading all old Gmail messages

User Help for Mozilla Thunderbird
kitesarefun
 
Posts: 142
Joined: January 18th, 2006, 4:22 pm

Post Posted October 4th, 2018, 11:45 am

When setting up an old Gmail account on Thunderbird for the first time, how can I get Thunderbird to only load the last 90 days of messages? It loads all the messages going back years as soon as you set it up. Aferwards you can then go to Account Settings > Syncronization and Storage > Syncronize the most recent xxx days, BUT that doesn't apply retroactively.

It doesn't work to delete the messages on Thunderbird because that deletes them in Gmail too. I want Thunderbird to have only the last 90 days and the Gmail server to keep all the messages or as long as possible (many years or until I hit Gmail's limit).

60.2.1 32-bit
Win 7 Pro

tanstaafl
Moderator

User avatar
 
Posts: 44639
Joined: July 30th, 2003, 5:06 pm

Post Posted October 4th, 2018, 11:58 am

Have you considered archiving old messages (either moving them manually or via the archive feature) to other folders, which you don't sync?
Besides solving your problem if would noticeably improve performance on startup because the mbox file for the inbox would be a more reasonable size. See http://kb.mozillazine.org/Archiving_your_e-mail

If you disable offline folders in synchronization & storage and disable global search/indexing in tools -> options -> advanced -> general none of your messages should get downloaded to the hard disk. Only headers to the *.msf files, which don't take much space and are quick to download. That is the configuration I use. It makes it harder to backup but improves performance and gets rid of some troublesome background tasks. I'm content using the quick filter bar to search. See http://kb.mozillazine.org/Minimize_the_ ... _a_profile

kitesarefun
 
Posts: 142
Joined: January 18th, 2006, 4:22 pm

Post Posted October 4th, 2018, 12:53 pm

tanstaafl wrote:Have you considered archiving old messages (either moving them manually or via the archive feature) to other folders, which you don't sync?


I'm not getting how that could work. I move messages to a folder in Thunderbird and then somehow those emails get saved in Gmail but deleted from Thunderbird?

tanstaafl wrote:If you disable offline folders in synchronization & storage


This is something else I don't understand and was going to ask about. I don't get what disabling offline folders could mean. It sounds like the emails would be kept only on the server and not my computer which sounds like it would run extremely slow so I must be missing something.

tanstaafl wrote:disable global search/indexing in tools -> options -> advanced -> general


Does that mean searches would only look in emails on my computer and not on the server? I definitely don't want that as I frequently need to search through old emails.

kitesarefun
 
Posts: 142
Joined: January 18th, 2006, 4:22 pm

Post Posted October 4th, 2018, 12:57 pm



Thanks, I will go through that. Looks like a lot to digest so it will take some time. For better or worse I never bothered to figure out how archiving works since I never come close to using up my space on Gmail but now I finally want to do whatever it takes to get Thunderbird to run fast and light and I know there's a fair amount to sort out.

tanstaafl
Moderator

User avatar
 
Posts: 44639
Joined: July 30th, 2003, 5:06 pm

Post Posted October 4th, 2018, 2:59 pm

"Does that mean searches would only look in emails on my computer and not on the server? I definitely don't want that as I frequently need to search through old emails"

No. It means searches would be limited to the specific folder. There is no problem searching a remote folder on the IMAP server using either the quick filter bar or the classic search (edit -> find -> search messages).

Searching remote folders on a IMAP server is usually pretty fast because the email client asks the server to do all of the work. Unlike a POP account it doesn't have to open every message in the folder, build a search index, and then actually search the index to create the search results. Instead it just send a IMAP search command to tell the server what it wants.

"I don't get what disabling offline folders could mean. It sounds like the emails would be kept only on the server and not my computer which sounds like it would run extremely slow so I must be missing something."

The messages would be kept only on the IMAP server and it would automatically fetch a copy whenever you open the message to read it. That copy is stored only in memory. Its actually pretty fast if you have a normal broadband connection since the "MIME Parts On Demand" settings default to only fetching the first 30KB of a message. It will fetch the rest of the message when you try to read more, or if you open an attachment. This means if you read a message with a 25MB attachment it won't fetch the attachment until you explicitly open the attachment, unless you set view -> display attachments inline (which a risky thing to do as attachments can contain malware).

"I don't understand how archiving works"
All it does is move the messages to a different folder, and then delete the original. It creates a hierarchy of the folders it uses as a destination (based on the month and/or year) rather than reusing the same destination folder every single time. You can manually duplicate everything that the built-in archive feature does, if you don't want to use it. You don't have to archive the accounts folders in the same account, you can archive them in any account.

http://kb.mozillazine.org/Entire_messag ... AP_message

kitesarefun
 
Posts: 142
Joined: January 18th, 2006, 4:22 pm

Post Posted October 5th, 2018, 1:48 am

tanstaafl wrote:Have you considered archiving old messages (either moving them manually or via the archive feature) to other folders, which you don't sync?...

If you disable offline folders in synchronization & storage and disable global search/indexing in tools -> options -> advanced -> general none of your messages should get downloaded to the hard disk. Only headers to the *.msf files, which don't take much space and are quick to download.


Thanks again this is all super helpful. Do I understand all this correctly:

- There's no way to stop Thunderbird from downloading messages older than 90 days (or whatever age you specify) before you add a Gmail account for the first time.

- The workaround is:

1- Go to Synchronization & Storage > Advanced > uncheck the box for the Archive folder
2 - Move all the old messages to the Archive folder
3 - Now all the content of the messages in the Archive folder except the header and first 30KB will be deleted locally while the full messages remain remote. (sounds odd that TB could do this but I think it's what I need -?)

kitesarefun
 
Posts: 142
Joined: January 18th, 2006, 4:22 pm

Post Posted October 5th, 2018, 1:57 am

tanstaafl wrote:There is no problem searching a remote folder on the IMAP server using either the quick filter bar or the classic search


Again to make sure I understand, is this correct:

- All search methods search remote messages.
- Whether a single folder or all folders and accounts are searched depends on the search method:

1) Global search using the edit field in the top right corner of the main window
- searches all folders in all accounts if you have checked Tools> Options> Advanced> General> "Enable Global Search and Indexer"
- searches only the currently displayed folder if the box is unchecked

2) Quick Filter bar (just above the folder listing and under the global search edit field)
- searches only the currently displayed folder

3) Edit -> Find
- searches one account or one folder of your choice; you can't search more than one account simultaneously

tanstaafl wrote:Searching remote folders on a IMAP server is usually pretty fast because the email client asks the server to do all of the work. Unlike a POP account it doesn't have to open every message in the folder, build a search index, and then actually search the index to create the search results. Instead it just send a IMAP search command to tell the server what it wants.


The article on minimizing the size of a profile makes it sounds like TB does have to build an index and doesn't send a search command to the server - ?

http://kb.mozillazine.org/Minimize_the_ ... _a_profile

quote:

"Global searching/indexing uses global-messages-db.sqlite as a pre-built search index. It contains a copy of all of your messages. The search index improves search performance because Thunderbird doesn't have to fetch or parse those messages before searching them. If you have a IMAP account and disable offline folders it will use a background process to download copies of the messages in all of your folders in order to update the search index. Otherwise it copies them from the mbox files. You can disable this feature using Tools -> Options -> Advanced -> General -> Enable Global Search and Indexer. If you do that exit Thunderbird and delete the global-messages-db.sqlite and global-messages-db.journal files in the profile. Help -> Troubleshooting Information -> "Open Containing Folder" will display the profile directory using Windows Explorer (or your file manager)."

tanstaafl
Moderator

User avatar
 
Posts: 44639
Joined: July 30th, 2003, 5:06 pm

Post Posted October 5th, 2018, 3:20 am

All of the built-in search methods (global, quick filter bar, edit -> find) will search remote folders in IMAP accounts. If you don't enable global search/indexing it doesn't add the global search field widget to the main window, so its not possible to use it with just the current folder by unchecking the global search/indexing checkbox.

I wrote the article on minimizing the size of the profile. Searching via global search does not send a IMAP search command to the server because it has a existing search index that it can use. That search index was built beforehand using the background processes. That search index covers all folders in POP, IMAP and "Local Folders" accounts. The non-global search methods (quick filter bar, edit -> find) are the ones that use a IMAP search command.

The IMAP search command can't be used to do a global search because it is designed to search for messages that match the specified search criteria in the currently selected folder. They already had an existing mechanism to build a search index which just requires a local copy of the folders. They decided to have global search fetch the contents of the remote folders beforehand rather than issue 'n' IMAP search commands because fetching the messages integrated better with their solution to search all of the POP accounts folders (and "Local Folders").

Return to Thunderbird Support


Who is online

Users browsing this forum: Bing [Bot] and 5 guests