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

Map Gmail IMAP Folders to Mail.app Default Folders Apps
With the release of IMAP for Gmail (was I the only one who thought this would never happen?), one can finally keep his / her Gmail account synchronized across the web application and a desktop mail client, such as OS X's Mail.app. Google provides instructions for setting up the Gmail IMAP account in Mail.app, but, by default, your standard folders such as Sent, Drafts, Trash, etc. will be stored in a separate folder in Mail's side bar and not in Mail's standard folders.

The fix for this is simple, and may have only been unknown to me: Click on a folder in the Gmail folder in Mail's side bar. Click on the Mailbox menu in Mail. Click on the Use This Mailbox For menu item and click on the Mail folder that corresponds to the Gmail folder you've selected. That's it. Your Mail folders and Gmail folders should stay in sync. Note that you'll still have folders that don't map to Mail defaults such as, Starred and All Mail. Not to mention, all Gmail labels are converted to folders and Mail.app, which could create quite a mess if you're like me and have a lot of labels. It's a small price to pay, however, for IMAP access to Gmail.
    •    
  • Currently 4.28 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (18 votes cast)
 
[147,830 views]  

Map Gmail IMAP Folders to Mail.app Default Folders | 32 comments | Create New Account
Click here to return to the 'Map Gmail IMAP Folders to Mail.app Default Folders' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Personally, I am not a fan...
Authored by: cuban321 on Oct 24, '07 08:01:01AM

I messed with it for about two hours and then went back to my old configuration. I noticed a few annoying things:

*After you close and reopen mail, the little link shortcut that shows you replied (that you also click to see your reply) no longer shows for any emails. It's like GMail doesn't keep those inter-message links.

*New mail showed up in my Inbox AND in my All Mail folder. When I marked it read in my inbox, it did not mark read in All Mail. Requiring me to mark each message as read twice to keep my new message count down. Labels did the same thing. :(

*When I deleted a message from my INBOX it was removed from All Mail also (I may have emptied my trash, not sure, but regardless). So then, how do you archive a message?

I hope I'm doing something stupid, and others have got around these oddities. For now I just forward my Gmail to my .mac account, and send out via GMail's SMTP. So that way all my mail, sent and incoming, is archived in one easily searchable place.



[ Reply to This | # ]
Personally, I am not a fan...
Authored by: RickyB on Oct 24, '07 08:46:56AM

I've also been playing with this and have a more positive take on it.

When you mark a message in the Inbox as read, the message is technically marked read in the All Mail folder as well, but you probably won't see this take effect until your folders are refreshed (or Mail.app is closed and opened again). You shouldn't have to manually mark the All Mail copy as read also.

To archive messages, just put them into your All Mail folder in Mail.app. That is equivalent to archiving in Gmail.

I hope you makes your experience slightly more pleasant!



[ Reply to This | # ]
Personally, I am not a fan...
Authored by: horhey23 on Oct 25, '07 08:54:54AM
A nice way to speed this up would be to install Mail Act-On, a plug-in for Mail that allows you to add keyboard shortcuts to actions like moving messages to specific folders and other cool things.

[ Reply to This | # ]
Personally, I am not a fan...
Authored by: Westacular on Oct 24, '07 01:17:53PM
http://mail.google.com/support/bin/answer.py?answer=78755&topic=12762

That's not the way it's supposed to work. If you delete a message from the Inbox, that should have the same effect as archiving it. After next sync, it should remain in All Mail.

The only time deleting a message client-side should cause the actual deletion in Gmail is if the message was in Gmail/Trash.

Did you re-map your Mail.app trash folder to match the Gmail trash folder? Because in that case, deleting it in Mail.app and emptying trash might have caused the exact sequence of events Gmail would recognize as delete-forever.



[ Reply to This | # ]
Personally, I am not a fan...
Authored by: homer on Oct 26, '07 06:51:14PM

How did you switch back? I, too, like having that link to the reply I sent. I messed around with setting the "Sent Messages" folder as the mailbox for Sent, and that didn't bring back my reply links. Neither did specifying that Mail not store sent messages on the server (per google's directions).



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: CaptainIndignant on Oct 24, '07 08:30:22AM
I am MADLY refreshing but still don't have Gmail IMAP...
New mail showed up in my Inbox AND in my All Mail folder. When I marked it read in my inbox, it did not mark read in All Mail. Requiring me to mark each message as read twice to keep my new message count down. Labels did the same thing. :(
You should be able to create a simple filter in Apple Mail to mark new mail in All Mail as read upon arrival. Not sure if this would mark the Inbox mail as read too. And I guess it wouldn't solve the problem on iPhone.

You definitely don't want to delete mail from the Inbox - in gmail, deleting is deleting. What if you drag it from Inbox to All Mail? Does that just leave you with one copy in All and none in Inbox? Conceptually, that would seem to fit with the way Gmail is mapping labels to virtual IMAP folders. Wish I could test it myself...

[ Reply to This | # ]

Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: sjha on Oct 24, '07 08:55:07AM

IMAP for Gmail has not come to England yet - at least not for my account!

---
Steve Ashcroft



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: lucasweb on Oct 24, '07 09:06:19AM

I was able to get this working in the UK by using Firefox (it wouldn't show up in Safari) and setting my language preference in Gmail to 'English US'



[ Reply to This | # ]
This could be an issue of browser cache
Authored by: hamarkus on Oct 24, '07 09:13:19AM

no text



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: donkeyotay on Oct 24, '07 09:57:19AM

Also works in UK with Camino by changing to English (US)



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: rhowell on Oct 24, '07 12:07:37PM

First, this hint applies to all IMAP accounts, not just that provided by Gmail.

Second, to have changes in your Inbox automatically reflected in the All Mail folder, choose Mail->Preferences->Accounts, select the Gmail IMAP account, and select the Advanced tab. There, check "Automatically synchronize changed mailboxes". That should do it, albeit with a performance hit.



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: rhowell on Oct 24, '07 12:14:48PM
A lot of IMAP questions (e.g. labels, deleted mail & All Mail, spam, etc.) are answered in Gmail's FAQ:

http://mail.google.com/support/bin/topic.py?topic=12760


[ Reply to This | # ]
Google rolling IMAP out slowly?
Authored by: rusto on Oct 24, '07 01:06:49PM

I'm in the U.S. and in settings, it still reads "Forwarding and POP" not "Forwarding and POP/IMAP"...



[ Reply to This | # ]
Google rolling IMAP out slowly?
Authored by: barbarella on Oct 25, '07 07:35:36AM

I have multiple G-mail accounts and only one of them has the IMPA option available in the Forwarding and POP Settings.



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: ars on Oct 24, '07 07:06:33PM

Whether I use Safari, or Camino it does not show up for me either. Google has not yet made it available to all GMail user. I have already two Imap accounts in Mail.app and I don't anticipate having any problems adding a third one. I must say that I did not get the point of the hint. I keep all my sent mailboxes separately in the side panel so that one can locate quickly replies from each account.



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: Anonymous on Oct 24, '07 11:01:39PM

Another problem -- I told Mail to "Use This Mailbox For -> Junk" on the Spam folder. After re-opening Mail, there are two Junk folders for Gmail, *both* called "Gmail", but one's in the place Mail expects, the other's in the place Gmail expects.

Until I click on the one in Junk -- then it changes to "Junk (Gmail)" and loses its paper bag icon, going back to a blue folder. NICE!

It looks like this bogus new folder is being created by Mail when it finds new junk that Gmail didn't already find. Moving the (wrongly marked) messages out and then deleting the mailbox results in the *real* Gmail junk mailbox taking its place; as I configured it on the previous launch.

Nice effort by Google, but their opinion of how mail should work seems to have dulled their ability to implement a compatible mail server. Just like Microsoft. "Do no evil" my pooter.

Apple's Mail isn't perfect, but it's very configurable and very compatible. If only Gmail could have the useless "conversations" and tags things switched off...



[ Reply to This | # ]
How do I undo this action
Authored by: vincentdavis on Oct 25, '07 07:33:40AM

I accidentally made the stared folder the draft folder. When I select the starred folder in the draft location I don't have the option to move it back. I also can't drag and drop it.



[ Reply to This | # ]
How do I undo this action
Authored by: palahala on Nov 15, '07 04:14:07AM

Maybe too late for you, but for the archives: to undo, simply select any other folder to be the Sent/Drafts/Junk folder. That will swap the old and newly selected folder.



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: tricil on Oct 25, '07 07:02:45PM

This hint also applies to iPhone... go to Advanced in your mail settings and specify Drafts, Trash, etc.



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: joebogavich on Oct 25, '07 09:20:21PM

Has anyone had problems with the Inbox email body getting corrupted after switching to Gmail IMAP?

The last few messages have come through with the body of a previous email. This is only occurs with the message in the Inbox. The message in the Gmail All Mail folder is fine.



[ Reply to This | # ]
adding Gmail IMAP account reorganizes mailboxes
Authored by: sjk on Oct 26, '07 01:51:10AM

Adding a Gmail IMAP account to Apple Mail had the unwanted side effect of moving the top-level mailboxes for my primary IMAP account (formerly a peers of Inbox, Drafts, Sent, et.al.) into a new mailbox folder corresponding to that account. And the Gmail account mailbox uses a similar top-level folder, which I couldn't make appear as a subfolder of the Inbox by trying different IMAP Path Prefix settings. Hopefully there will be a way to eventually use the previous folder layout that none of my other non-Gmail IMAP accounts disrupted.



[ Reply to This | # ]
adding Gmail IMAP account reorganizes mailboxes
Authored by: damomurf on Oct 29, '07 05:41:08AM

Common IMAP servers actually have folders as children of the INBOX folder and these seem to display most logically in Mail.app. Unfortunately Gmails folders (tags) are at the same level as the INBOX and hence display in this less than ideal way. I too have tried experimented with Path Prefixes to no avail - this is a deal breaker for me.



[ Reply to This | # ]
adding Gmail IMAP account reorganizes mailboxes
Authored by: steven_kehlet on Nov 02, '07 12:43:07PM

Agreed. I think I figured out how to get this working though. When creating a new folder, prepend "INBOX/" to it to create the folder underneath your Inbox. E.g. INBOX/foo. This will make Gmail's IMAP just like more like what we're used to. Through the gmail web interface, you will see a corresponding new label appear, so you could probably create it through either interface. Tip: I had to quit and restart Mail to get it to notice the first one I created.

Even though this gets Mail.app to put the little triangle next to your inbox, you still can't seem to drag folders directly under your Inbox. You could create all your folders manually, or I found you can drag folders under any new folders you create. So I just created a folder called INBOX/folders, and then dragged all my folders under that.

Hope this helps anybody, this was driving me crazy too.



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: d0rk on Oct 26, '07 02:53:21PM
FWIW, Google recommends that you don't store sent messages and deleted messages on the server. To delete a message, just move it to your [Gmail]/Trash folder. Deleting a message on your IMAP client then just removes the label it has for that folder (archives a message in the inbox, same as the "y" keyboard shortcut on the web). Sent messages are automagically copied to your sent items when you send them through smtp.google.com. They do however recommend that you store drafts on the server so they are always in sync.

http://mail.google.com/support/bin/answer.py?answer=78892


[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: schalliol on Oct 29, '07 12:26:18PM

This is a good idea, but since there's no Gmail Inbox, I'm wondering how to handle this. Ideally I'd like for all email to be on my local machine and on Gmail for future access. I too have duplicate boxes, and I'm really getting confused as to what's what.



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: teddyc on Nov 12, '07 08:33:26AM

That is a great suggestion, prepending "INBOX/." Worked perfectly for me. Gmail should add it to their FAQ's!
Cheers--



[ Reply to This | # ]
Undo Delete Message does not work...
Authored by: ptwithy on Nov 15, '07 05:58:38AM

I understand why I don't want Apple Mail to move my deleted messages to [GMail]/Trash.  So I don't do that.

But in my other IMAP servers, Apple Mail seems to be able to support 'Undo Delete Message', so that if I am too quick on the draw deleting a message out of my InBox, Command-Z will bring it back (there is actually a history, I can undelete some number of messages, not just the last).  This feature does not work for my GMail IMAP account, but I can't tell why.

I tried the setting of _not_ moving deleted messages to the Trash at all.  This results in the message being marked deleted in my InBox, but as soon as the InBox gets sync-ed, it is also immediately expunged.  So even with Show Deleted Messages on, I don't see the deleted message, and Mail does not offer an Undo option to bring it back.

My next thought was to create a 'Deleted' label (which Mail would treat as a folder) and tell Mail to move deleted messages to that 'folder'.  It seemed to me, this should be just like other IMAP servers now.  When I deleted a message from my InBox, Mail would 'move' it to the Deleted folder, GMail would remove the InBox label and add the Deleted label.  My hope was that this would make the Undo Deleted Message action work in Mail, but, no joy...

Any suggestions?



[ Reply to This | # ]
All Mail Not Showing... All Mail
Authored by: Anonymous on Nov 16, '07 05:00:03AM

I have a Gmail added to my mail.app as an IMAP account, but the All Mail folder doesn't show all the mail that exists in that folder online in gmail. It only has 300 or so of about 2000 messages. Has anyone had this problem? Everything else seems to update/sync fine. Thanks.



[ Reply to This | # ]
All Mail Not Showing... All Mail
Authored by: zookie on Nov 20, '07 03:48:50PM

In both my Mail & iPhone, I map "All Mail" to Trash. This way, when I delete emails, it disappears from the folder the email was in but a copy remains in All Mail instead of it being deleted entirely. Others do the same?



[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: Michael.Massing on Nov 25, '07 01:59:39PM
There's a more compact summary of many of these tips, including:
• the main one of mapping app/functional mailboxes
• the correspondence of "archive" to "move to All Mail"
• integration into the Mail hierarchy via "Advanced" options and
• (bonus hint!) a tip that Mail "flagging" corresponds to Gmail "starring".

http://5thirtyone.com/archives/862

Best to all,
M.

---
If a nation expects to be ignorant and free, in a state of civilization, it expects what never was and never will be. - Thomas Jefferson to Col. C. Yancey, 1816

[ Reply to This | # ]

Mail.app on OS X 10.5 does not work well with Gmail via IMAP.
Authored by: brendiana on Jan 29, '08 08:15:22PM

Since December I have been using the Gmail / IMAP configuration to keep mail in sync. Overall this does not work very well and I have experienced a variety of problems. I am now reverting to the reliable POP configuration.

1) Mail.app does not sync To Do's well. a) Multiple entries appear in Gmail. b) Mail.app often hangs / crashes when creating a To Do
2) Mail.app does not sync mail contents properly. On occasions it does not sync attachments, but instead garbled ansi texts.
3) Mail.app syncs multiple copies of the same mail.




[ Reply to This | # ]
Map Gmail IMAP Folders to Mail.app Default Folders
Authored by: charlestephen on Nov 16, '08 02:35:11PM

If one goes to Settings in the GMail web interface and selects the Labs tab and then selects "Advanced IMAP Controls," this problem can be solved by simply selecting which mailboxes you want to appear in IMAP.



[ Reply to This | # ]