Follow The Safe Mac on Twitter to stay advised of the latest Mac security news!
Posted on May 19th, 2011 at 3:11 PM EST
After covering nothing but MacProtector for nearly three weeks, it’s time to move on to other topics. Today I’ll discuss a common complaint among people trying to use Apple’s Mail program to access their GMail accounts: duplicate messages. Or, at least, what appear to be duplicate messages, thanks to some oddities about how GMail works.
Note that this information only applies to GMail accounts being accessed by IMAP, not POP. If you aren’t sure how you are connecting, IMAP is the default these days, but you should still check to be sure. Open Mail -> Preferences, click Accounts and see if it says IMAP or POP under your GMail account label. If it says POP, you’ll need to delete your GMail account from Mail and set it up again according to Google’s directions. (Be cautious when deleting an account, as that will delete all messages in mailboxes associated with that account.)
If you are connecting via IMAP, you will see something like the picture at left. (You may need to expand or collapse some items, using the gray triangles, to see the same thing.) Unfortunately, although it looks like I have two unread messages in two different places, due to a unique bit of GMail weirdness, it’s actually the same message.
GMail does not actually have actual mailboxes, like a normal e-mail server. Instead, GMail uses the concept of labels. On a normal mail server, you can create different mailboxes, which are actual locations, and thus a message can only be in one at a time. GMail uses labels, and a message can have many different labels at one time. In the case of the e-mail showing in two different places, it has both “Inbox” and “All Mail” labels.
In addition to this difference, GMail also has the unique behavior of never deleting messages. When you delete a message, you are simply removing all labels other than “All Mail” from it. To permanently delete a message on GMail, you must pay a visit to the All Mail “mailbox” on the GMail website and delete the message from there.
I can see some benefit to both of these features. However, a side effect is that little unread message count next to the GMail mailboxes in Mail’s mailbox list. Like many people, these counts annoy me. I also don’t like how GMail’s spam has its own place and isn’t filed away in the Junk mailbox with all my other accounts’ spam. I don’t want to see these things! I can collapse all the GMail mailboxes, but then I still see the unread message count next to the GMAIL heading in Mail’s mailbox list.
I don’t need to see most of GMail’s mailboxes – and most especially not All Mail – in Mail. Fortunately, there’s a way to hide that mailbox, as well as any others (like Spam), from Mail. To do so, you will first need to log on to GMail via the GMail web site. When you do, you’ll see a gear icon in the upper right corner of the page. Click on it, and choose Mail Settings. In the links at the top of the Settings area, click Labels:
On the Labels page, you can now check or uncheck a “Show in IMAP” box for each label. You will want to uncheck this box for any labels that you don’t want to show up in Mail’s mailbox list:
Once you have done that, you can log out of GMail. Then quit and reopen Mail. The All Mail box might still show up for a short time, but will disappear as soon as Mail has synchronized with GMail.