Gmail [2021] Download Entire Folder

0 views
Skip to first unread message

Azarias Alvarez

unread,
Jan 25, 2024, 5:38:25 PM1/25/24
to sesnamocomp

I am using eM Client 9.1 and gmail. eM Client is not downloading some of gmail messages from a couple of folders (labels?) to a local computer. It downloaded all messages in most folders, but downloaded only a part of messages from a couple of folders. Is there a way to synchronize particular folders?

gmail download entire folder


Download Ziphttps://t.co/vHtdnUsUIe



I would like to setup fetchmail or getmail to pull email from Gmail. I would prefer it to be IMAP but I can live with POP as well. The issue I'm running into is that all these seem to want you to specify the exact list of folders you want checked (this is cleaner in IMAP than POP).

This is a hassle since I frequently change my list of folders and when I do, I don't want to have to change my configuration file to add/remove folders. When something changes, I automatically want a mbox or a maildir directory to 'show up' with the contents of my new folder. I would also prefer the mbox to have the same name as the folder on the server

With IMAP you can list the folders on the server, that way email clients can do whatever they need. In getmail it depends on how the email retrievers are written. If this configuration does not work, you can check the IMAP retriever code and write a specific one that suits your needs ;-)

You could look into imapsync. It is designed to recursively sync up IMAP accounts. You will need an IMAP account for the destination. I have not tested it with gmail but if gmail is a well behaved IMAP server it should work.

I do almost all of my email through Thunderbird or K9 (Android).. only log into GMAIL once every month or two. Today I just discovered that my Gmail "All Mail" folder had > 12,000 emails. According to GMAIL help, this folder is a collection of everything sent and received that hasn't been deleted. In my case, most of the emails in this folder were emails received and deleted while in TB. I know this as I tested both TB & K9. K9 worked as expected. Whereas deleting an email in TB did remove the email from the GMAIL inbox but it didn't "delete" it from the All Mail folder.

Gmail is a collection of mail with labels. ALL folders in Gmail are not folders at all, but a label. Mail with no label is in ALL MAIL Deleted label is in the "folder" deleted and "all mail". You will also note advice to point Thunderbirds archive folder to the all mail folder as well as that is how Google describe all mail. An archive.

I have started using gmail thru Thunderbird and every incoming email is duplicated 3 times (it will appear once in the 'Inbox' folder, once in the 'Gmail/All Mail' folder and once in the 'Gmail/Important' folder).

This is annoying because I have to open the same email 3 (once every copy of it) times to ensure that the notification icon doesn't signal three unread mails. So I have to always go to the 'Gmail/All Mail' and 'Gmail/Important' folders to mark folder as read every-time I get a new mail.

How can I remove the 'Gmail/All Mail' and 'Gmail/Important' folders in Thunderbird (obviously without deleting the content of 'Inbox')? Is this something that can be fixed from within Thunderbird, or do I have to change something on the webmail side?

You can also tell gmail itself to not present the relevant folders to the IMAP user (thunderbird) at all. To do this, go to Gmail > Settings > Labels, find the relevant labels, and untick "Show in IMAP".

This can be done by right-clicking any folder in the inboxes panel and clicking "Subscribe...". That will load all folders Thunderbird is currently watching, and you can untick the box to unsubscribe from "Important".

The answers above no longer work for T'bird 68.10.0. The trick is to click on the account name -> Manage folder subscriptions -> select the folder you don't want and uncheck its box. The Important and All Mail folders are under [Gmail].

You can use advanced search operators to select messages in other folders or unread messages in every folder. For example, to select all unread messages in your Important folder, type "label:important is:unread" into the search field. To select all unread messages in all folders, type "is:unread". See the "Advanced Search" link in the Resources section of this article for more search operators.

When I send an email from the app, it works, and it does display in my sent items in the web interface, but no matter what I do I cannot get K9 to show me more than just my inbox. any other folder (sent, bin, spam, etc) simply does not display in the app.

Well f*ck me. no idea how these settings would have ever been changed, but here we are. As this has basically nothing to do with K9 mail, I can delete the post if needed, but here is the answer inside gmail settings:

Using Mutt, if I delete messages from the Gmail 'All Mail' folder (or 'archive' as it's mapped to on my local machine) by copying them to the 'trash' folder, the first sync appears to work, but then they get copied back down from Gmail to my laptop on the next sync after that. Driving me a little batty....

EDIT: After playing with it some more, it appears that the emails that can't be deleted all have duplicates within the 'All Mail' folder. Deleting one or both emails from the folder (copying to 'trash' or even just removing from the folder) still results in them _not_ actually being deleted from Gmail and reappearing on the next sync. This kind of leads me to suspect an offlineimap bug...

Do not save deleted messages on the server. Messages that are deleted from an IMAP folder (except for those in [Gmail]/Spam or [Gmail]/Trash) only have that label removed and still exist in All Mail. Hence, your client doesn't need to store an extra copy of a deleted message.

Do not save deleted messages to your [Gmail]/All Mail folder as some clients will try to empty this folder and ultimately fail. This can lead to delayed mail access or excessive battery consumption on a mobile device.

It seems to work fine for me to simply not use the trash folder at all. I use mutt to delete the mail (with 'd') then I sync it (I think the default it '$'). So the next time it actually cycles through the imap sync, it picks up these changes. I'm not at all user if this is how I am supposed to be using gmail's imap, but it seems to work.

except from the 'All Mail' folder...and especially if it's a duplicate message! Which is the issue. I ended up with a bunch of duplicates (mostly from cronjobs emailed to myself via Gmail's SMTP servers).

I haven't tried mbsync yet, but I got around the CPU usage issue you're talking about by only syncing my INBOX and news folders every couple of minutes and doing a full sync every 15 min. Makes a huge difference!

I highly recommend just setting up isync/mbsync over going through the whole offlineimap setup. Here is what I use for one of my gmail configs (I changed the account name to 'gmail' to make it more generic, and masked my email as pw for obvious reasons). The Arch wiki is also a pretty good resource for setting this up. It optionally gives much finer grained control over what gets synced in which direction, but I don't use that, as I want everything to go in both directions, which makes it work just like offlineimap.

Well, I think after battling with my email for about 5 days now, I've finally got it all sorted out. I did end up switching to mbsync....which was painful in it's own right...and I still seem to have a minor outstanding bug/misconfiguration. I'm actually not convinced it's that much faster than offlineimap, but I'll give it a try for awhile. I'm attempting to use the 'AltMap' Maildir store option because I was having issues with conflicting UID's when copying mails bewteen tags/folders. Either I didn't have that issue with offlineimap, or I just never noticed it before...either is equally possible! I was also able to get Gmail's subfolder feature working with mbsync, which a lot of people have had trouble with (using the 'Flatten' directive). If it all seems stable after a few weeks using it, I'll add my configs to the Wiki (I can post them here if anyone else wants to test them).

I think what finally solved the problem of not being able to delete mail and duplicates from the 'All Mail' folder via Mutt/mbsync,offlineimap was setting on the Gmail Site 'Settings->Forwarding and POP/IMAP->Auto-Expunge Off and When I mark a message in IMAP as deleted: Immediately delete the message forever'. Hit 'd' to remove them from the 'All Mail' folder in Mutt, but don't try to save them to the 'trash' folder like other mails.

Yeah, I've been running offlineimap for years and I do notice some of that, especially on older machines. However I did something similar to you and just synced my inbox (and rss2email folder) every couple of minutes and the rest every 15. I'm continuing that tradition with mbsync since I've got 2 accounts and a fair number of folders... Just to reduce the overall runtime and network traffic. Maybe unnecessary now, but I'll have to keep an eye on it.

I'm attempting to use the 'AltMap' Maildir store option because I was having issues with conflicting UID's when copying mails bewteen tags/folders. Either I didn't have that issue with offlineimap, or I just never noticed it before...

Yeah, well I'm about there now too. I marked this as unsolved again. I've got laptop and server that _should_ be seeing the same messages, but what I'm seeing on each is different from each other _and_ different from Gmail's site :-/ It seems to be ok for smaller folders/tags, but with big tags/folders like 'All Mail' and 'Sent' it seems to be off. Now I don't know if this is a Gmail issue with their IMAP implementation and the way I'm using it, or if it's an mbsync issue or all of the above. I'm about ready to delete all my mail from Gmail and start over with what I have on my laptop, which seems to be correct....

df19127ead
Reply all
Reply to author
Forward
0 new messages