Loading 6 Votes - +

Align and Sync GMail's IMAP Folders with Mac Mail

2_article_2336_thumb_gmail_in_mac_mail_before_alignment

The default GMail folder handling in Mac Mail.

I recently started using the same IMAP GMail email account from many different devices, i.e., I access my GMail account using the web interface, my iPhone, and Mac Mail on my laptop. One of the big advantages of using IMAP mail is that your folder structure is on the server. This means when you mark something read, move something to a folder, or do anything to your email messages, all of your clients should see the change. For example, if I get 10 emails and check them on my iPhone, they should be marked read when I use the web interface or Mac Mail. Likewise, when I send an email from my iPhone, it should be in my sent folder on Mac Mail and the web interface.

I first noticed that these 3 nodes weren’t synchronized when I went to look for an email I sent with my iPhone but couldn’t find it in my Mac Mail “Sent” folder. In Mac Mail, I expanded the “MarkMcB” section (i.e., the name of my mail account) and found that the key Gmail folders were being treated as ordinary folders by Mac.

The solution for alignment was simple. All I had to do was highlight each folder under [Gmail] that was important, click on the “Mailbox” dropdown menu item, and tell Mac Mail to use the folder as one of the special folders.

2_article_2336_thumb_aligning_mailboxes_in_mac_mail

Telling Mac Mail how to use existing folders.

After doing this for sent, trash, and junk, Mac Mail released control of the folders that it had created to be the special folders and listed them under MarkMcB. These folders were now obsolete, but they still had messages in them. I simply went through each and moved the messages to the new sent, junk, and trash folders.

2_article_2336_thumb_gmail_in_mac_after_alignment_with_old_folders

Extraneous folders after alignment.

Once all messages were moved to their new homes, I had no need for the old folders. I simply highlighted all of them and deleted them.

2_article_2336_thumb_gmail_before_deleting_extraneous_folders

Deleting extraneous folders.

Now I have a nice, clean, and aligned mailbox structure. The iPhone smartly detected the changes and aligned to the new layout. (If yours doesn’t, you can manually tell it which folders to use in your iPhone email account settings.)

2_article_2336_thumb_gmail_in_mac_after_alignment

Gmail folders aligned with Mac Mail.

Similarly tagged OmniNerd content:

Information This article was edited after publication by the author on 30 Dec 2008. View changes.
Thread parent sort order:
Thread verbosity:

First, I use three interfaces to my Gmail account, also – and I’ve had the same issue with syncing. This tip is just what I needed – and it worked flawlessly.

Second, maybe “catch” isn’t the best word, as this only tangential to your point. In any case… I use my inbox as a “todo” list (i.e., I archive stuff I don’t need to worry about anymore). Unfortunately, this means I have to drag messages to the “All Mail” folder in Mac Mail. It’s not that much harder than clicking the “Archive” button on the web interface, but it is more work. I wonder if there is an easy way to simplify this – maybe a way to add a custom button to Mac Mail, or to assign a custom keyboard shortcut that would move the selected messages to that folder. Any ideas?

0 Votes  - +
personal mailboxes by Anonymous

Great article – thanks!

Any idea how to sync personal mail boxes – ie the ones I create myself, ‘current projects’ etc?

Cheers

Trebso

I could have just missed it before, but I started noticing lots of duplicate emails in the trash after doing this – usually either partial / early versions of sent emails. It doesn’t really hurt/bother me, but it is odd to see “65 deleted messages in this conversation” at the bottom of an email thread.

Again, I could be wrong, but I think it only happens when a thread is read/accessed in both locations (i.e., Web and Mac Mail interfaces). I’m guessing it has something to do with the way the Web interface groups conversations. Maybe the issue is you can move around individual emails in Mac Mail whereas in the Web interface you always move the whole conversation. So, if I move part of a conversation in Mac Mail to the All Mail folder, the Web version views it as one conversation with tags – and procedes to delete the single messages and form one conversation.

Oh, and I should mention this effect carries over into Mac Mail. Doing searches will turn up multiple copies of results – one in a normal location (e.g., All Mail or the Inbox) and all the rest in the Trash. Again, not a huge deal, but slightly annoying. Maybe I can set Mac Mail to not search the Trash…

2 Votes  - +
Some answers... by Anonymous

Anonymous,
To sync your own created mailboxes with the web gmail and have it show up on all of your IMAP devices, create a label in web Gmail and it will show up in your IMAP clients as a folder. This way you can just drag emails into the folder and gmail will apply the label to it in the webmail.

Brandon,
On the general tab of the mail.app prefs, there is an option to deselect Trash folder when searching.

To all,
Using gmail’s interface I have created my own versions of a sent folder, trash folder, and drafts folder by creating labels for each and creating filters to put the correct messgaes into them. Then in Mail.app and my iPhone, I select these folders to be used as my sent, trash, and drafts folders. This works great for me since I am accustomed to using my trash as my archive. Gmail won’t delete my trashed messages automatically, so I control everything. The only drawback to this is that gmail automatically stores any message you send through their smtp.gmail.com server in your sent folder, so you may end up with two copies of sent messages. I dont send many messages throughout the year, so this is not a problem for me, and this can also be fixed using a filter in gmail web.

I’m having the same issues, but my Mac Mail isn’t the same as yours. The picture with the caption “The default GMail folder handling in Mac Mail.” does not look like mine. In the left panel, I have MAILBOXES, with Inbox, Sent, Trash and Junk subfolders beneath. Did I use the wrong program to sync Gmail with Mac Mail?

0 Votes  - +
One problem... by Anonymous

What happens when you accidentally select and assign the wrong folder for something? How do you “undo” that? I accidentally set one of my spam folders to be “trash”.

Hitting command Z does nothing, and I can’t find a way to undo this.

I have an iPhone, Mac, and Gmail account and a month’s worth of e-mail isn’t downloading to my Mac. I can access it from my phone and my Gmail account and not the Mac. Very odd. I’ve attempted a rebuild of my inbox and sent items. I have attributed this block of e-mails that are missing to me having my Mac boxed up due to a move and not syncing on a routine basis for a good month. Any suggestions? Thanks!

0 Votes  - +
Thank you for tip by Anonymous

This is the one I think I need to try as I recently started accessing gmail from Mac which is creating additional folders for trash and sent message. i do access email from various devices. I called apple support they couldn’t even resolve instead they were trying to say that folders were created by gmail account. It was wierd that APPLE support don’t have knowledge on this.

Thank you and I’m so glad to see this resolution.

Praveen

Share & Socialize

What is OmniNerd?

Omninerd_icon Welcome! OmniNerd's content is generated by nerds like you. Learn more.

Voting Booth

America's involvement with the ISIS crisis should be?

0 votes, 0 comments