MozillaZine


GMail IMAP leading to huge "All Mail" folder. Why?

User Help for Mozilla Thunderbird
danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 10th, 2016, 5:03 pm

I've been using Thunderbird for POP downloads for many many years. Have just started to use it for IMAP downloads. I'm doing IMAP downloads from Gmail, which seems to work well. But Thunderbird seems to want to download ALL of my "All Mail" on my Gmail account, which is thousands of e-mails. I don't want all that on my Thunderbird client, since they are always accessible directly on GMail if I need them. I have it set to Synchronize just the most recent 30 days, so why am I looking at a whole years worth of e-mail in my "All Mail" folder on Thunderbird, rather than just the last 30 days?

tanstaafl
Moderator

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

Post Posted December 10th, 2016, 5:29 pm

I think its a poor decision displaying that folder by default too, but some people like that feature. I suspect the reason Thunderbird is ignoring the 30 day setting is because the AllMail folder is not a normal folder, it is a special case. From http://kb.mozillazine.org/Minimize_the_ ... _a_profile :

"If you decide to keep offline folders enabled and have a Gmail IMAP account, uncheck "All Mail" in Tools -> Account Settings -> Account Name -> Synchronization & Storage -> Advanced. Exit Thunderbird and delete "All Mail." and "All Mail.msf" in the accounts local directory. The "All Mail" folder in a Gmail IMAP account has a copy of all messages for that account, doubling the number of messages downloaded for offline folders. "

I normally disable both offline folders (synchronization & storage) and global search/indexing to save disk space and eliminate both of the background processes that would download mail to the hard disk since I'm comfortable relying upon using the "quick filter bar" to search messages, and it reduces the chances of problems.

viewtopic.php?p=14614949#p14614949

danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 10th, 2016, 5:38 pm

I sure don't see any "All Mail" to uncheck in Tools -> Account Settings -> Account Name -> Synchronization & Storage -> Advanced.

I guess I was worried that if I delete "All Mail" in Thunderbird (and "All Mail.msf"), GMail would synchronize with it and delete "All Mail" there too. Is that not the case? That is, I want to keep "All Mail" in the cloud, but not have it on Thunderbird. I'm happy to just have my Inbox on Thunderbird synchronized with my Inbox on GMail.

Does the 30-day synchronization just apply to the GMail Inbox?

tanstaafl
Moderator

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

Post Posted December 10th, 2016, 8:29 pm

"I sure don't see any "All Mail" to uncheck in Tools -> Account Settings -> Account Name -> Synchronization & Storage -> Advanced."

Click on the gmail account in the "folders and newsgroup" list on the left and then look for a "all mail" folder in the list of folders on the right.

"I guess I was worried that if I delete "All Mail" in Thunderbird (and "All Mail.msf"), GMail would synchronize with it and delete "All Mail" there too."

That why you need to remove it from the list of folders it is supposed to synchronize (and exit Thunderbird) before deleting the actual file. Otherwise it would empty the contents of your all mail folder on the gmail server, deleting every message in that account

Lots of things can be done in either order. This isn't one, you need to be really careful that Thunderbird is not going to synchronize the all mail folder anymore before you get rid of that file. A quick sanity check before you exit Thunderbird and delete the file would be right clicking on the gmail account name in the folder pane, select subscribe, expand the folder hierarchy, and check that all mail is not listed as subscribed. The reason being that normally it would only be subscribed as a side effect of being chosen as a offline/synchronized folder.

Think about making a copy of your other Gmail folders under a child folder in Local Folders beforehand as a precaution in case you make a fatal error. You don't want to just backup the "allmail." file instead as while that would save a copy of the messages you wouldn't know what folder to copy the messages back to.

tanstaafl
Moderator

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

Post Posted December 10th, 2016, 8:35 pm

"Does the 30-day synchronization just apply to the GMail Inbox?"

No. It should apply to all normal folders. I think AllMail and the trash folder might be special cases that it doesn't apply to.

danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 11th, 2016, 8:01 am

"Click on the gmail account in the "folders and newsgroup" list on the left and then look for a "all mail" folder in the list of folders on the right."

Apologies, but I don't get this. We're talking Thunderbird, right? I click on my Gmail account at left, and I get the page on the right with Email, Accounts, and Advanced Features sections on the right. No list of folders. "All Mail" is not to be found. Assuming I see that "All Mail" folder, what do I do with it?

On the left, I DO see a vertical list with me@gmail at the top, and what looks like this (substituting punctuation marks for icons, and dots for spaces)

# me@gmail.com
....@Inbox
......%[Gmail]
........@Drafts
........@Sent Mail
........@All Mail
........@Spam
........@Trash

That "All Mail" folder isn't on the right side of the window.

Again what I want to do is remove All Mail from my TB client computer, BUT keep it on Gmail in the cloud.

tanstaafl
Moderator

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

Post Posted December 11th, 2016, 9:25 am

Yes, we're talking about Thunderbird. I think you are looking at the vertical folder pane on the left in the main window, and clicking on the Gmail account name. That displays what http://kb.mozillazine.org/Window_layout_-_Thunderbird calls "account central" on the right.

I'm talking about the "synchronization & storage -> message synchronizing -> advanced" settings for the gmail account in the tools -> account settings menu. The window it displays has a "items for offline use" title. Its a little confusing as it lists the folders for every account, when you'd expect it to list only the folders for the currently selected account.

danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 11th, 2016, 10:00 am

Ah, thank you. I have now unchecked "All Mail" in the "Choose mail folders and newsgroups for offline use" section in "Advanced". So that means "All Mail" will henceforth NOT be synchronized with the cloud Gmail "All Mail"? Cool.

I have also made a copy of "All Mail" which is all of my Gmail, in an independent TB folder. So that is protected, if I do something stupid. When I'm successful, I'll get rid of that folder.

Now I'd like to delete the "All Mail" folder in Thunderbird. That's the whole point of this. I want "All Mail" kept only in the cloud. But I don't seem to have that option when I cntl-click on that folder. I can, however, delete the whole [Gmail] folder that contains that folder. Is that what I'm supposed to do? Then, I'm hoping when it resynchronizes, that [Gmail] folder will be recreated, but without the "All Mail" folder. Is that the correct strategy?

I do find it a bit puzzling that, now that I have commanded that "All Mail" in Thunderbird won't be synchronized with "All Mail" in Gmail, when I send an e-mail to my account at Gmail, it lands (via IMAP) in BOTH my Thunderbird Inbox *and* my Thunderbird "All Mail" folder. If Thunderbird isn't synchronizing "All Mail", how come that folder is increasing in size?

danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 11th, 2016, 4:32 pm

One additional question. In "Server Settings" for the Thunderbird IMAP account, I can specify how often to check for new messages. As I used to do with POP, I have this set to 10 minutes. With POP, that's exactly what it did. But when I get an e-mail, it appears in my Thunderbird IMAP Inbox almost instantaneously. That check-every-10 minutes doesn't appear to mean anything for the IMAP account. Am I missing something? Wonderful, however, that the transmission is pretty much instantaneous.

tanstaafl
Moderator

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

Post Posted December 11th, 2016, 4:42 pm

Don't delete the AllMail folder using Thunderbird. If it let you do that you'd lose all of the messages for your Gmail account. Your goal is not to delete the folder in Thunderbird, but to make it go away as far as Thunderbird is concerned. The distinction is important. There are other ways to make it go away. If you unsubscribe the folder it will remove it from the folder pane, but won't delete the corresponding folder on the server. You'd still see it if you log into webmail with a browser.

There are two possible background processes that might sync a folder. One is designating it as a offline folder. You've unchecked that. The other is global search/indexing. It will download messages to the folder if its not a offline folder so that it can use that info to help build its search index. Unsubscribing the folder tells global search/indexing to ignore that folder, so it won't "synch" it (unless you unchecked "show only subscribed folders" in the gmail accounts server settings -> advanced).

Stop Thunderbird synching with the AllMail folder, unsubscribe it, exit and then delete the two files used to store the synched offline copy of it. But don't tell Thunderbird to delete any folders.

tanstaafl
Moderator

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

Post Posted December 11th, 2016, 4:51 pm

Dlester99 wrote:But when I get an e-mail, it appears in my Thunderbird IMAP Inbox almost instantaneously. That check-every-10 minutes doesn't appear to mean anything for the IMAP account. Am I missing something? Wonderful, however, that the transmission is pretty much instantaneous.
IMAP accounts have an additional mechanism to check for new mail. They can use the IMAP IDLE command to tell the mail server that it can immediately notify the email client of new mail whenever it arrives. This feature used to be managed in the server's advanced settings. Its now managed by server settings -> "allow immediate server notifications when new messages arrive". If you leave that checked, Thunderbird will use the IMAP IDLE command if the server states it supports it.

danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 11th, 2016, 5:00 pm

tanstaafl wrote:Stop Thunderbird synching with the AllMail folder, unsubscribe it, exit and then delete the two files used to store the synched offline copy of it. But don't tell Thunderbird to delete any folders.


Hmmm. When I go to my Thunderbird profile folder, and look in the "Imap Mail" folder. I don't see anything like "All Mail". I see INBOX.msf, [Gmail.msf], Templates.msf Drafts.msf, and Sent.msf. But no AllMail.msf. I do a global search for any "AllMail" file, but there is none. What gives?

danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 11th, 2016, 5:02 pm

tanstaafl wrote:
Dlester99 wrote:But when I get an e-mail, it appears in my Thunderbird IMAP Inbox almost instantaneously. That check-every-10 minutes doesn't appear to mean anything for the IMAP account. Am I missing something? Wonderful, however, that the transmission is pretty much instantaneous.
IMAP accounts have an additional mechanism to check for new mail. They can use the IMAP IDLE command to tell the mail server that it can immediately notify the email client of new mail whenever it arrives. This feature used to be managed in the server's advanced settings. Its now managed by server settings -> "allow immediate server notifications when new messages arrive". If you leave that checked, Thunderbird will use the IMAP IDLE command if the server states it supports it.


Yes, that makes sense. Allowing immediate notifications makes the "Check for new messages every x minutes" irrelevant. Thank you.

danll
 
Posts: 188
Joined: March 2nd, 2010, 4:20 pm

Post Posted December 12th, 2016, 1:32 pm

OK, this is just getting stranger, but I'm starting to see a glimmer of success.

I had TWO folders in my Thunderbird profile folder inside the ImapMail folder. One was called imap.gmail.com, and the second was imap.gmail-1.com. The latter was more recent, and the former was huge - 2GB. The hugeness was in a [Gmail].sbd file. I guess the second one was started as a result of the changes I was making. That former folder probably has my years-worth AllMail in there somewhere -- probably in [Gmail].sbd. So (since I copied all that AllMail to a separate holding folder for security), I trashed the imap.gmail.com folder. So now I just have a imap.gmail-1.com folder in my system profile folder. It is 177MB in size, of which my INBOX is 60MB. So my Thunderbird-accessible AllMail is gone right? Not really. Every single one of my 2GB years-worth e-mails is easily available in my Thunderbird AllMail file. I click on a long-ago e-mail subject line, and it pulls that e-mail right up. Where is it storing those 2GB of e-mails???

I have to assume that when I now select an e-mail in my Thunderbird AllMail folder, it's pulling the body of that e-mail out of the cloud. In fact, when I close my internet connection, all the subject lines in my AllMail folder are still displayed and I can still select any e-mail in my AllMail folder, but the e-mail body doesn't get displayed, and I get a "Failed to connect to server" error pop up. Ah, that's why those folders have a URL name! So what remains on my system is a list of e-mails in AllMail, and a pointer to imap.gmail.com, but not the e-mails themselves. That list on my Thunderbird system is updated as new e-mails arrive in my Gmail account. That is, only that list gets synced.

I think I have solved my problem, wherein I no longer have 2GB of AllMail cluttering up my system, and I can easily access my AllMail in the cloud, but I'm not quite sure how I did it.

Now that imap.gmail.com is gone, do you suppose that imap.gmail-1.com will revert to that imap.gmail.com name?

tanstaafl
Moderator

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

Post Posted December 12th, 2016, 2:50 pm

"Now that imap.gmail.com is gone, do you suppose that imap.gmail-1.com will revert to that imap.gmail.com name?"

Nope. It might change to imap.gmail-2.com if whatever caused it to change local directories re-occurs.

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 10 guests