MozillaZine

How to delete (ONLY local!) msgs after reduc.IMAP sync time?

User Help for Mozilla Thunderbird
thoste
 
Posts: 101
Joined: June 7th, 2003, 12:45 am

Post Posted November 5th, 2017, 3:10 am

I have setup an IMAP account and let Thunderbird at first sync ALL messages from all times.
After a while I have now a local message base of approx. 3 GB size.

In order to reduce this size I adjusted the sync time period to only 14 days.
I compacted afterwards Thunderbird and restarted it.
Unfortunately the local message base is NOT reduced in size.

How do I get rid of all the local (!) message bodies older than 14 days?
The original message bodies should be kept on remote mail server.

Thomas

tanstaafl
Moderator

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

Post Posted November 5th, 2017, 11:51 am

Compacting doesn't effect offline folders. Thunderbird appears to use something equivalent to expunge commands when it syncs remote and offline folders, and needs to physically remove some of the messages. Its not something you have any control over.

If that doesn't seem to work you could exit Thunderbird and delete the two files for each folder (for example "inbox." and "inbox.msf" for the inbox folder. leave "inbox.sbd" alone). That will force Thunderbird to re-fetch the messages when you restart, but hopefully only the messages for the specified time interval. What you want to avoid is deleting the remote folder.

I suggest you initially try this on a folder that you don't care about to verify that it still works as expected. However, before you do that ask yourself why you have offline folders in the first place. They're mainly just useful when you want to read mail or compose a reply when working offline. They don't improve performance or provide a reliable backup. They're very useful for some users, but a lot of users seem to have them just because they're enabled by default. See http://kb.mozillazine.org/Minimize_the_ ... _a_profile

thoste
 
Posts: 101
Joined: June 7th, 2003, 12:45 am

Post Posted November 7th, 2017, 12:03 am

@tanstaafl:

Thank you for your comment.

However I am really surprised. When I am understanding you right then there is NO way of getting rid of local IMAP messages (body) when they are downloaded in the past?

Only by manual deletion of files???

I cannot believe that!

Can you confirm that again

Thank you
Thomas

tanstaafl
Moderator

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

Post Posted November 7th, 2017, 12:36 am

The situation is confusing as Thunderbird should have physically removed the messages outside the specified time frame when it synced the remote and offline folders. You seem to have run into a bug. However that is the only mechanism they provide. Compacting has no effect on offline folders. AFAIK the messages that it would normally physically remove in the offline folder are not even marked as deleted.

You could delete the files used to store the offline folders. When you restart Thunderbird it will create a replacement folder with the specified messages (which it will have to download).

Alternatively you could use a text editor to manually delete messages from the mbox file used to store the offline folder. However, that requires you to learn how messages are stored in mbox files, takes a LOT more time than just deleting the files and letting it download just the desired messages, and is also riskier.

thoste
 
Posts: 101
Joined: June 7th, 2003, 12:45 am

Post Posted November 10th, 2017, 8:07 am

tanstaafl wrote:If that doesn't seem to work you could exit Thunderbird and delete the two files for each folder (for example "inbox." and "inbox.msf" for the inbox folder. leave "inbox.sbd" alone). That will force Thunderbird to re-fetch the messages when you restart, but hopefully only the messages for the specified time interval. What you want to avoid is deleting the remote folder.


Hi tanstaafl,
once more I refer to your suggestion: I would like to ask why inbox.sbd should be kept.

If I remove inbox, inbox.msf AND inbox.sbd then the folder "Inbox" itself should be recreated by Thunderbird too.

Am I right?

tanstaafl
Moderator

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

Post Posted November 10th, 2017, 4:31 pm

Yes, for a offline folder in a IMAP account.

The more mainstream your configuration is, the less risk you run into running into a bug. That's the main reason for leaving the *.sbd directories alone. Same issue comes up with why shouldn't you remove "Local Folders" if you don't store anything there. Some day you might want to send a message in the background or queue messages to be sent later. Both will break if you removed Local Folders.

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 6 guests