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:
- 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.
- 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.
Editor’s Note: I wouldn’t follow the portion of this guide regarding ‘Setting deleted items as Junk. 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. The rest is valid, and recommended.