I have a specific mail setup on my mac where I use Mail.app to access my Gmail via IMAP, and the app filters emails into folders ("On my mac" as opposed to in Gmail itself) for my different projects, school, etc. The problem is that whenever Mail.app moves an email into a folder (out of the main Inbox), it gets put in the Gmail Archive (All Mail), and then is no longer accessible via my iPhone - i.e. when I search for it, it's not there. Is there a way to make emails in folders available on iPhone/iPad, preferably actually synced with the device so you have the real folders from Mail.app available?

  • 1
    I have all my folders avalable on my iPhone, and I haven't done anything to get them there. How is your gmail setup ?? what if you move a mail in gmail to a lable (folder) will it then be placed correct ?? How is your rule(s) in Apple Mail setup ?? Apr 26, 2011 at 17:58
  • Is the new folder in OSX Mail in Gmail or "ON MY MAC"
    – mmmmmm
    May 3, 2011 at 13:12
  • It's "On My Mac."
    – Jason
    May 3, 2011 at 19:11

3 Answers 3


You need to update your rules to move mail to the gmail IMAP folders rather than the ones from 'On My Mac'. When it does that, it is copying them out of the gmail box to your local mail store.

You could also have the rules set up in gmail which will parse them before sending mail to your device, so on both your Mac and iOS devices they would already be in the correct location.

  • If Gmail parses the messages into folders, will Mail.app also be able to parse and move the messages as well? I want to have a local copy of all my messages.
    – Jason
    May 3, 2011 at 23:15
  • The only way I could see that is if you copied the message in your rule, but I have not tried that. Do you just want to have an offline copy? If Gmail parses them - then they would appear in the IMAP folders on the server, which would then show up in Mail.app - but wouldn't be in the 'On My Mac' folder. You also could possibly make a copy with AppleScript for every email but that would be rather tedious.
    – jmlumpkin
    May 3, 2011 at 23:31
  • 1
    I wanted to add a comment to the other part of your comment - You will have a local copy of your messages. IMAP in Mail.app will store your messages offline too (they are in ~/Library/Mail/ and then your servername. If you switched to rules on the gmail side, you not only would have everything where you want it, but a local mirror as well. Plus would get them on all devices, versus your mac storing them locally that your iPhone can't get to
    – jmlumpkin
    May 6, 2011 at 13:18

Be sure that you are making folders that are stored on gmail using IMAP.

It sounds like you are moving the messages to a local folder (on my mac) and the correct behavior in that case is to delete the message from all IMAP folders.

Mail keeps a local copy of all messages - so you still have offline access, time machine backups going back in time, and all the benefits of local storage when messages are "stored in a folder in gmail." Think of the location as the authoritative copy and not the only copy or even the most correct copy. When you make changes offline - those time stamps let the system sync your changes back to gmail once you reconnect and properly integrate changes with new mail that has arrived while offline.

Just to be totally clear - here are some pictures...

Try making a new IMAP folder like the picture below - you can rename it later if needed to see what creating a folder stored on Gmail looks like on your mail client. IMAP stored mail folder

You don't want it stored locally like this:folder stored on your mac

You can drag messages into the new folder or drag entire folder structures as long as you have time for the operation to sync / upload all the data to gmail servers. I have seen folders with 5,000 messages take two or three hours to upload even on normal internet with decent upload speeds so try first with smaller mailboxes to get the hang of things.

  • Thanks, is there any way to do it so that the folders will be on my mac? Essentially I want to keep the system like it is now, but make it so that when I move emails to folders "on my mac," they are archived on Gmail rather than deleted.
    – Jason
    May 3, 2011 at 22:22
  • 1
    No - "on my mac" implies ONLY on your mac. Don't fret as your mac keeps a local copy of "all the messages" so even though the "authoritative" master copy is online, your mac mail has a local copy of everything to speed things up and allow offline access with sync later when you reconnect. There is no benefit to having the folder on your mac other than that it deletes the original from gmail.
    – bmike
    May 4, 2011 at 2:47
  • OK, so if I want to shift from the "On my Mac" system to the Gmail folder system, what's the best way to do this? Also if I have multiple email accounts I suppose that it won't work since not everything is going into the same email account... unless I force all my email accounts to forward to my gmail account so they are all going into the same space.
    – Jason
    May 17, 2011 at 15:02
  • You can move email from the local mac to gmail simply by dragging and dropping the folder to the new location. Mail will then carry out the move by uploading the information from the local store to gmail. It doesn't matter how it got to the mac or which account. Once it's done, you can delete the "on my mac" copy of the mail. No need to forward unless you want that as well as moving past messages.
    – bmike
    May 17, 2011 at 15:19

iOS 4.0 and newer seem to set Gmail up as IMAP, but older setups are probably POP3, giving you only INBOX access. If you (have) set up your Gmail account on your iPhone as Exchange account or IMAP (for iOS 4.x, just re-set Gmail up, for 3.x follow these instructions) then you can get out of the INBOX by touching Mailboxes button up left and then navigate to All Mail folder where you can see all your mail and search among them.

If this suffices, no changes have to be made to Mail.app filters.

  • You could set up Gmail as IMAP before iOS 4.
    – jmlumpkin
    May 5, 2011 at 11:59
  • Yes, but before iOS 4 setup defaulted to POP3 and you had to manually input server names etc for IMAP.
    – Laas
    May 5, 2011 at 12:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .