How to Remove Mail from Gmail when Archiving Locally on Apple Mail?

I have been using Gmail for about 7 months, now. I am using it in conjunction with a MacBook Pro (15 inch, mid-2010, i5, 2.53 GHz, running OS 10.7.4 and the current version of Mail) and an iPhone 4S (iOS 5.1.1 with the pre-installed Mail app). I, rarely, use Gmail's web interface and prefer to view and manage my mail using my devices.


I, recently, discovered a Gmail behavior that I wasn't aware of. Whenever I deleted an email from my Inbox on my MacBook, it wouldn't, actually, delete from Gmail. Instead, a copy of the mail would remain in Gmail's "All Mail" folder. It seems that Gmail and I have different ideas about deleting. When I delete, it means that I would, actually, like to get rid of it, not hide it somewhere else. After sorting through the, almost, 3000 emails in the "All Mail" folder and re-deleting everything that I thought I had already deleted (a pain, to be sure), I found the solution to my problem. In Apple Mail, I checked both Trash options in my account preferences then selected Gmail's "Trash" folder and used the "Use This Mailbox For" option to map it to Mail's trash (similarly, I mapped the trash folder on my iPhone to Gmail's trash folder). Now, everything I delete is going to the same place (and actually getting deleted).


I have a second issue, though, that I haven't been able to properly solve. I prefer to archive my mail locally rather than keep it on the server (i.e. I have created several mailboxes "on my mac". Emails I want to keep, I just drag them to the appropriate folder for safekeeping). When I drag an email into a local folder, it gets removed from the Inbox, but it still remains in the "All Mail" folder. I don't want this to happen. When I remove it to archive it, it means that I would, actually, like to remove it and, only, store it in my archive. I hate having to move stuff twice. Is there any way I can, completely, remove an email from Gmail when I archive it locally? (i.e. have it be deleted from Gmail when I remove it from my Inbox?)

MacBook Pro (15-inch Mid 2010), Mac OS X (10.7.4)

Posted on Jun 21, 2012 6:48 AM

Reply
13 replies

Dec 17, 2013 12:16 PM in response to BellaMichelle

When you delete the message from a client like Apple Mail, it will delete it from the server.


I had the gmail trash mapped to the main Trash mailbox in apple mail. So when I delete a message from the inbox in Mail, it goes to the Trash which is on the server. Since the trash was mapped from gmail, it is still an imap folder and is available at the gmail website also. When it gets deleted from the trash manually or by time settings made in apple mail, it will get deleted at that time from the server.

Jun 21, 2012 7:37 AM in response to Cerebro

You can make settings at the website to eliminate the ALL Mail Folder's use. These settings with Mail's settings of moving messages to trash and storing trash on server should accomplish what you want.


User uploaded file

Since trash is an IMAP folder (you mapped it to Mail's trash folder), when you delete it from the trash in Mail, it will delete it completely from Mail and gmail site.


Also, under the labels tab, check to hide the All Mail Folder and any other folder you don't want to see from IMAP.

Jun 21, 2012 7:15 AM in response to Cerebro

There really isn't any good way of doing that. Google believes that your email should be stored perpetually on their servers. You can always log on to GMail and manually remove messages from the All Mail folder, but as far as Mail is concerned, GMail is just an IMAP mail server. When Mail tells GMail to delete messages using standard IMAP protocols, GMail is choosing not to actually delete them.

Jun 21, 2012 8:46 AM in response to thomas_r.

Well at least since 2010. I should have kept the account to keep up with the settings.


For Cerebro:

It doesn't really eliminate the All Mail Folder since the message will still appear in it if it's in the trash. But it will clear out the messages without having to do it manually when you empty the trash on the computer. So, you don't need to show the All Mail Folder in IMAP unless you just want to see it.

By storing trash on the server and maping the trash folder to Mail's main trash mailbox, that eliminates the step of gmail putting the message in gmail's Deleted Message mailbox (another useless step in gmail) and moves it straight to the trash in gmail. And, as I said, since gmail trash is an IMAP folder and mapped to the main trash, deleting from the trash on the computer will delete it completely in gmail.


In the Labels section, delete all folders created at the bottom as local folders since you only want to access it in Mail. The only folders you really need to show in IMAP are INBOX (that's by default), Sent, Drafts, and Trash. Hide the rest. I would disable use of the SPAM filter in gmail and just use Mail's junk filtering. I would also not map the draft folder to Mail's draft folder. So, you will leave the Draft and Junk unchecked to store messages on the server. The imap draft folder will still appear under the gmail folder in the sidebar, but drafts you create will only be local to the computer.


This will keep the gmail website's Inbox, Sent, and Trash appearing the same as the computer.

Jul 17, 2012 11:39 AM in response to Edward Rios

I don't understand what you mean by the hide technique didn't work. If you check the box at the gmail site not to show in IMAP, then it should not appear in Mail under the account in the sidebar. If it doens't remove it in Mail, make sure the settings are saved in gmail. Then disable the account in Mail in the Advanced tab, then re-enable it. It should force it to syncronize with gmail.

Dec 14, 2013 8:49 PM in response to Glenn Leblanc

I just found this thread and am appreciative of the information. I am currently deleting over 24,000 emails that gmail has kept in the all mail folder. I noticed my mac mail was running so slowly and when I opened and watched the activity panel, I saw how many messages it was moving between mail and the gmail server. ugh!


So, whil I have to delete these in groups to make sure I keep any I have MEANT to keep, I just changed my settings to the 'immediate delete message forever' option. I had to change the setting above that one, to choose 'Auto expunge Off: wait for the client to udate the server'. Can you clarify what this means? I am wondering if a setting I have will cause an issue, and they may not be connected at all. I tell mail not to check for messages automatically, to wait until I ask it to check. With this set, will the system not delete unless I tell it to check messages? I hope I am asking this clearly.


To be honest, some of the other explanations here on hiding folders, etc. I am concerned if I hide a folder, I won't see that it has collected xxxxx number of emails or some other function. Hiding seems mildly dangerous to knowing what is going on. Maybe I am misunderstanding what you are suggesting.


I like using mac mail on my iMac, ipad and iphone and having it match what I see in gmail when I check it at work. So I am grateful for the help to smooth out the process. The least checking that I can do, and deleting, etc., and still being able to find the message I need to keep, make me a happier user.


Michelle

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to Remove Mail from Gmail when Archiving Locally on Apple Mail?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.