Restrict local IMAP email copies in Thunderbird to save disk space and speed up search
If you have a lot of emails stored in the Thunderbird email client, you may have noticed two things: that the emails are taking quite the chunk of disk space, and that the performance of search may have deteriorated.
This can be an issue, especially if you use search often or are running low on disk space. While some of you may need access to an email archive that dates back five or even ten years, others may not need access to emails that old, at least not locally.
One suggestion for this particular situation is to archive emails in the excellent Mailstore Home email backup application. Once archived, you deleted the old emails in Thunderbird but can still access them in the Mailstore program whenever the need arises.
If you do not want to use Mailstore, or prefer a native solution, then you can make changes to how Thunderbird synchronizes and stores emails for IMAP accounts.
Restrict local copies in Thunderbird
Thunderbird will sync all email messages by default, regardless of age. A local copy is kept for search, so that you can search a single account or use the global search feature to find text not only in email headers but also in the body.
The email client offers two options to deal with emails that you do not longer need direct access to:
- Synchronize by age only
- Delete old email messages
To make the modifications do the following:
- Select Tools > Account Settings or right-click on the inbox of the account that you want to configure and select Settings.
- Switch to the Synchronization & Storage menu listed under the account.
The default setting under Disk Space is to synchronize all messages locally regardless of age. If you want to restrict that, select "Synchronize the most recent" and select a a time frame in days, weeks, months or years that you are comfortable with (e.g 1 year).
Note: This won't affect the state of messages that have already been downloaded to your email program immediately. It may take a while before the body of those messages does not show up anymore in the client. The emails are still listed, but when you click on them, they are downloaded from the server.
The second option that you have is to configure Thunderbird to automatically delete messages. You can either select to keep only a certain number of emails at all times, e.g. 2000, or delete messages that are older than a certain age automatically. If you are using starred messages, you can select to keep those regardless of the modifications you make here.
Tip: You can configure the search -- under Edit > Find > Search Messages to run the search on the server. This can be useful if you have restricted local email copies but need to search emails that you have received before that period of time.
Closing Words
This tip is mostly for situations where you computer is running out of disk space or when you have noticed that search performance or performance in general in the client has deteriorated over time. If you have an abundance of disk space, or a fast modern system, then you may not need to make those changes at all.
I prefer to archive messages locally, as this ensures that I can access all emails that I have ever received locally no matter what is happening on the server side of things (providers may close down, delete emails by accident or hacks...)
I agree and trust myself more to keep all messages locally (as servers can close down, be hacked, whatever), BUT: When on serverside messages have dissapeared, thunderbird default action is TO DELETE THE LOCAL COPIES TOO, without asking i might add.
Is there any way to let thunderbird ASK YOU BEFORE DELETING local copies?
Or in my case: to let the local copies be master and the server side messages be ‘slave’, when syncing? (so if a message locally exist, but not on the server copying it to the server)
Anyway i’d like a setting where i don’t RISK LOSING ALL MY EMAIL as i simply check for new email, and something has gone wrong on the server….
PS: this is my situation now, my provider has moved all email to a new server and is unable to migrate all the messages to the new inbox, which is empty, while on my local imap copy on thunderbird portable i still have all my mesages. but as soon as i check email, they are deleted! how to save them?
Excellent tip Martin, thanks. This is something I was looking for.