Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Quickly archive and/or delete Gmail messages in Mail.app Apps
In the recent Move messages to a target folder via keyboard shortcut hint, I noticed a user describing a script he'd written to allow him to archive messages from four different Gmail accounts. I replied with this simpler suggestion, and I think perhaps it might merit being considered as a hint in its own right. A quick search of the site didn't show that it'd been posted before.

When you define your Gmail account in Mail.app, make sure you do the following:
  1. Under Mailbox Behaviors for Trash, make sure both options are unchecked. You want Mail to not move deleted messages to the trash, and not to store them on the server.
  2. For Junk, check Store junk messages on the server, and set auto-delete to never. In the listing of your GMail account's folders within your Mail.app sidebar, select the Spam folder and choose it as Mail.app's Junk folder. You can do this by selecting 'Use this Mailbox for..' under the Mailbox menu, and selecting "Junk." This sets it up so that both Mail.app and Gmail are using the same folder for Junk and/or Spam.
Once you've done the above, you can easily archive messages without any custom scripts or plug-ins. Note: the following solution has one key limitation: if you have any accounts in Mail.app that aren't Gmail accounts, you'll be in for an unpleasant surprise if you try to archive mail from one of those accounts' inboxes by deleting it. With that caveat in mind, here's how I handle GMail in Mail...

When you're going through your inbox, to archive a message, simply delete it. As Gmail uses tags, not folders, you're not actually telling Gmail to delete the message, but rather to remove the 'Inbox' tag from the message. Without the 'Inbox' tag, the message will no longer show up in your Inbox, but it won't be deleted from your account; it's still accessible under 'All Mail.'

This is exactly the same as clicking on the Archive button for messages when you're using gMail's web interface. So deleting == archiving; it's not intuitive at first, but it's sure easy to remember and quick to perform.

If deleting is archiving, you may be wondering, what should you do if you really want to delete a message? This is also simple, but not initially obvious: Flag the message as junk mail.

Mail.app will move the message out of your Inbox and into your Junk folder, which also happens to be Gmail's Spam folder. In other words, when you click on a messages's Junk button, you're telling gMail to remove the 'Inbox' tag from the message, and apply the 'Spam' tag. So the message will show up in your Gmail account's Spam folder, and it will be automatically deleted when it gets to be thirty days old (the age at which Gmail automatically deletes Spam messages).

So, to archive, delete. To delete, junk. It really will make sense, I promise.
    •    
  • Currently 2.15 / 5
  You rated: 5 / 5 (40 votes cast)
 
[22,035 views]  

Quickly archive and/or delete Gmail messages in Mail.app | 13 comments | Create New Account
Click here to return to the 'Quickly archive and/or delete Gmail messages in Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Quickly archive and/or delete Gmail messages in Mail.app
Authored by: wgscott on Dec 29, '09 08:07:46AM

Or you can leave everything the way it is, and simply drag and drop messages from the "In Box" into the Gmail "All Mail" folder.



[ Reply to This | # ]
Quickly archive and/or delete Gmail messages in Mail.app
Authored by: gconway on Dec 29, '09 08:19:49AM

Major problem with this tip - by deleting a message to your spam folder you're instructing Gmail to treat the sender as a slammer. Future emails from that sender will be treated as spam. Better not "delete" email from your Mom this way. Bad tip.

---
____________
Gerry Conway



[ Reply to This | # ]
Quickly archive and/or delete Gmail messages in Mail.app
Authored by: DGluckman on Dec 29, '09 08:47:57AM

I use the same method to archive via the delete key/button, but I fear that your Delete via Junking method may have some unintended consequences. The way I understand it, marking an item as Junk in Mail.app teaches the program to mark future messages from the sender as Junk and can remove the sender's address from the previous senders list. I believe Gmail's spam filter will react in a similar way.



[ Reply to This | # ]
Junk != Delete
Authored by: sjk on Dec 29, '09 01:13:04PM

This tip seems incomplete/flawed without mentioning the side effect of using it that gconway and DGluckman described in their comments (thanks!). Surely not everyone who uses this tip will also read the comments.

Edited on Dec 29, '09 01:14:03PM by sjk



[ Reply to This | # ]
Junk != Delete
Authored by: everkleer80 on Dec 30, '09 09:13:21AM

I can't believe anyone would actually recomment trashing by marking as spam/junk and as much as I commend Rob for his work on this site, I especially can't believe he let this 'hint' in here without at least mentioning the side effect. Maybe estnyc only actually deletes a message if it actually is junk mail.



[ Reply to This | # ]
Keep it simple & avoid confusion!
Authored by: rodneyweston on Dec 29, '09 02:46:59PM

This tip requires a certain level of doublethink, and is bound to lead to unintended consequences.

I set up my gmail account so that:

Delete = Delete (i.e. moves it to the Trash)
Junk = Junk (i.e. the destination for Spam)

To archive using Mail, I simply "move" the message to All Mail. Because I do a lot of email organising across multiple accounts, I now use a tool so that I can move easily via the keyboard: "MsgFiler". A few quick keystrokes, and the message is moved to where I need it to be!

Cheers,

Rodney



[ Reply to This | # ]
Quickly archive and/or delete Gmail messages in Mail.app
Authored by: rexroof on Dec 29, '09 03:55:07PM

I think when I move things to the All Mail folder I end up with duplicates... I could be wrong about that.

I think the wiser thing to do, instead of improperly marking messages as Junk/Spam, is to make the move to the Trash a manual process, because I almost never truly delete things from my Gmail accounts. The rare times that I do want to truly delete things, I think it's less bother to make it a manual process.

Thanks for pointing out that Google automatically saves things unless you specifically move it to trash.



[ Reply to This | # ]
Another approach
Authored by: ptwithy on Dec 29, '09 03:59:50PM

I purposely use the Labs feature to _not_ show my All Mail as an IMAP folder. I don't want to have Apple Mail try to sync to every message I have ever received on GMail. That would be a good way to fill up my hard drive. But I also want to make it easy for me to review mail that I have recently 'deleted', from any of my mail viewers (Apple Mail, iPhone, etc.)

So here's what I do: I create a label in GMail called 'IMAP/Deleted', which will show up as a subfolder Deleted in the folder IMAP in Apple Mail. I use that folder as my Trash folder, and tell Apple Mail to move deleted messages to that folder, store them on the server, and remove messages older than a week. The effect in Gmail is that deleting a message removes the label 'Inbox' and adds the label 'IMAP/Deleted'. I can easily see any mail that I deleted in the past week by looking in that folder. After a week, Apple Mail will remove them from that folder, which in GMail simply removes the 'IMAP/Deleted' label -- but it will still be in 'All Mail', so if I _still_ need to find it, I can use the GMail web interface to pull it up.

As to _really_ deleting a message? If it's not junk, I just don't bother. At the current price of GMail storage, there's no need to. And, since I don't sync to my All Mail folder, I don't have to worry about filling up my hard drive will archived mail. That's Google's problem (but they apparently _want_ all my email, to help them show me more pertinent advertisements, so I don't feel bad about taking advantage of them...)



[ Reply to This | # ]
Another approach
Authored by: everkleer80 on Dec 30, '09 09:01:57AM

Interesting idea... I haven't (yet) noticed a problem with my hard drive getting filled, but I kind of hate going to that huge All Mail folder and trying to find the email I deleted/archived last night.



[ Reply to This | # ]
A little exaggeration
Authored by: ptwithy on Dec 30, '09 09:34:54AM

Yeah, I don't really think my email will fill up my hard drive -- there's only about 3Gb at gmail so far, and hard drives just keep getting bigger. But I'd rather devote that space to more important stuff. So far, being able to only get to the All Mail folder via the web interface has not been a problem. And actually, any time I am doing a lot of searching, I usually use the web interface -- it seems much faster than searching my local copies.



[ Reply to This | # ]
Running out of space with
Authored by: scooby509 on Dec 30, '09 05:02:51PM

A 1TB drive is around $100, so you should really consider upgrading.



[ Reply to This | # ]
Better than just a hint...
Authored by: Andreas. on Dec 29, '09 10:48:51PM
...is to follow the instructions and advice in this TidBits article

It's long, but it's very well written (as to be expected from Joe Kissell), very simple to follow, and gives clear explanations for every decision.

Andreas

[ Reply to This | # ]
Quickly archive and/or delete Gmail messages in Mail.app
Authored by: atonaldenim on Jan 26, '10 10:37:05AM

Delete key = archive ... this is correct.

Mark as junk = delete ... I wouldn't do this. It does seem like it would mislead the intelligent spam filters by training them badly.

I don't know if this is the "stock" configuration, but my Mail.app <-> Google Apps account has a "Trash" folder. When I log into Google Apps Gmail via the web, opening the Trash folder displays the option "Empty Trash now" and says "(messages that have been in Trash more than 30 days will be automatically deleted)"

Thus it seems to actually delete from Mail.app I would just move a message into the Trash folder, and expect it will be gone in 30 days, or log in to Gmail and manually empty the trash.

But... does anybody really delete anymore? :)



[ Reply to This | # ]