MozillaZine


On deleting absurdly huge email files

User Help for Mozilla Thunderbird
MrAmbrayses
 
Posts: 3
Joined: February 22nd, 2021, 5:12 pm

Post Posted February 22nd, 2021, 5:29 pm

I have discovered my All Mail file on my gmail IMAP account is ridiculously large - 25Gb.

This has nothing to do with compaction or email management. I know this because it is a relatively new email account and all the emails I've ever sent or received on that account don't amount to even 2% of that figure.

I suspect I know why this has happened: Every day or so, Thunderbird insists on 'bringing the folder up to date', which appears to comprise it downloading every single email on the server to my local machine for no reason. Historically I ignored this, assuming that regardless of why it was doing this it would have the sense not duplicate these files, but it looks like I was wrong. I'd estimate 98% of the All Mail folder is duplicated emails that I never requested.

So now I want to migrate to a new PC but I don't want to copy all this junk across, so ideally I'd like a way to get rid of it before I copy my profile.

I guess my question is, can I delete the files and download the mail from the server again, prior to copying my profile?

Of course on the new PC I'll have to use another email client, or the same thing will happen again, but at least if I have my profile I can convert what's there to the new format.

Anyone any ideas? Thanks.

DanRaisch
Moderator

User avatar
 
Posts: 124270
Joined: September 23rd, 2004, 8:57 pm
Location: Somewhere on the right coast

Post Posted February 22nd, 2021, 8:03 pm

Not sure what your knowledge of email protocols is so I will apologize in advance if the following is already familiar to you.
With IMAP accounts, messages are stored on the email server AND may be downloaded to the local computer in order to make them accessible for off-line use, as when no Internet connection is available. To avoid storing data from the Gmail All Mail folder locally, in Thunderbird use menu path Tools->Account Settings->Synchronization & Storage->click on the "Advanced" button->uncheck the box for "All Mail". https://support.mozilla.org/en-US/kb/im ... ronization

Gmail's IMAP email includes several non-standard features. One of them is the fact that Gmail doesn't store messages on the server in true folders but applies labels to each message. That means that messages in the server Inbox, Drafts, Sent, etc "folders" also have the All Mail "folder" label applied. Thus that "folder", as it's name suggests, contains all of the messages of that Gmail account.

Due to the size the All Mail message folder on your computer, it is possible that there is corruption in that file. To delete that file, shut down Thunderbird, Navigate to the profile folder, locate and delete the files "AllMail" and AllMail.msf. (Not sure of the capitalization of those names or whether All Mail or AllMail is the correct spelling.) If you have disk space on that hard drive, you might wish to rename or relocate those two files rather than delete them, just to provide an extra measure of data security. The two files can be deleted after you confirm that this process has resolved the file size issue and that your message data is fully present and accessible.
Last edited by DanRaisch on February 22nd, 2021, 9:48 pm, edited 1 time in total.
Reason: Edited to remove file deletion recommendation

tanstaafl
Moderator

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

Post Posted February 22nd, 2021, 8:12 pm

Do NOT try to delete the All Mail folder by deleting its contents. That will delete all of the messages for the account when Thunderbird syncs the folder.

One safe way to remove the All Mail folder would be to login into Gmail webmail using a browser, left click on the gear icon in the upper right corner and select Settings, select the Labels tab, find All Mail, click on Hide and uncheck "Show in IMAP". Logout and delete "All Mail." and "All Mail.msf" in the Gmail accounts local directory in the Thunderbird profile."

This will prevent All Mail from re-appearing when you copy the profile, start Thunderbird and it synchs again.

Ideally you would use the same windows username on both PCs and copy the entire ..\remote\thunderbird directory tree from the old PC to the new PC, and install the same version of Thunderbird in the exact same location in the new PC due to the changes made in version 68 that tie a profile to a specific Thunderbird installation location.

If you can't then when you start Thunderbird on the new PC and it automatically runs the new account wizard, abort the wizard, click on about:profiles in help -> troubleshooting information, and press the set as default button for the desired profile.

MrAmbrayses
 
Posts: 3
Joined: February 22nd, 2021, 5:12 pm

Post Posted February 23rd, 2021, 2:06 am

DanRaisch wrote:Not sure what your knowledge of email protocols is so I will apologize in advance if the following is already familiar to you.
With IMAP accounts, messages are stored on the email server AND may be downloaded to the local computer in order to make them accessible for off-line use, as when no Internet connection is available. To avoid storing data from the Gmail All Mail folder locally, in Thunderbird use menu path Tools->Account Settings->Synchronization & Storage->click on the "Advanced" button->uncheck the box for "All Mail". https://support.mozilla.org/en-US/kb/im ... ronization


I thought that was the case, and that's the scenario I want - local storage and also messages left on the server. The trouble is that currently, Thunderbird repeatedly duplicates the server messages on my PC, not visibly in Thunderbird but in the All Mail file.

tanstaafl wrote:One safe way to remove the All Mail folder would be to login into Gmail webmail using a browser, left click on the gear icon in the upper right corner and select Settings, select the Labels tab, find All Mail, click on Hide and uncheck "Show in IMAP". Logout and delete "All Mail." and "All Mail.msf" in the Gmail accounts local directory in the Thunderbird profile."

This will prevent All Mail from re-appearing when you copy the profile, start Thunderbird and it synchs again.



Thanks, I'll give that a go later and see what occurs.

Thanks for both your replies.

MrAmbrayses
 
Posts: 3
Joined: February 22nd, 2021, 5:12 pm

Post Posted February 23rd, 2021, 2:24 am

OK, I changed the IMAP setting in Googlemail, shut down Thunderbird and restarted, and it automatically deleted the two huge All Mail files in the profile.

Now I'm down to a manageable 390Mb (Edit: actually 150Mb - even better).

So it looks like that sorts the problem, assuming Thunderbird doesn't try to duplicate anything else.

Thanks for your help.

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 2 guests