Gmail-Apple Mail mismatched mailboxes

  • Avatar

    Posted: 18 March 2011 08:06 PM

    Initial Observations
      10.6, new IMAP setup using Mail?s automated setup to connect to a brand new Gmail account
      look in Mail > Prefs > Accounts > Mailbox Behaviors, all set to save on server
      back in Apple Mail, I save a draft, sent, and trash message to get things established
      the result is the following:
          Drafts
            Apple Mail: appear in top section Drafts
            Gmail: they appear in a newly created folder called [Imap]/Drafts
          Sent
            Apple Mail: appear in top section Sent, but ones that I trash only show up below in [Gmail]/Sent Mail
            Gmail: they appear both in ?Sent? and in the label ?Sent Messages?
          Trash
            Apple Mail: no sign of any messages I trash
            Gmail: show up in ?Deleted Messages?, but not in Trash

    Followup Observations
      when I take a peak at com.apple.mail.plist, I notice the following
          the DraftsMailboxName maps to Drafts
          the SentMessagesMailboxName maps to Sent Messages
          the TrashMailboxName maps to Deleted Messages
      it appears to me there?s a disagreement with the naming conventions of these mailboxes, so I changed the mailbox names within the plist, ?Sent Messages? to ?Sent Mail?, and ?Deleted Messages? to ?Trash? which results in the following
          ?Sent Messages? now show as new mailboxes, containing what ?Sent Mail? and ?Trash? used to contain
          when I use Apple Mail, ?Sent Mail? now shows up in the proper mailbox, but the messages I trash are nowhere to be found
          but, for the first time in this whole process, the ?Use this Mailbox for? items are available, enabling me to choose the [Gmail]/Trash as Apple Mail?s Trash. It them moves up in the top section, and emails that I trash lands there.
      but over in Gmail land
          there are now two more Labels, one [Imap]/Sent Mail and [Imap}/Trash and contain just what Apple Mail shows, but now were back to a non-desirable situation…Gmail?s Drafts, Sent Mail and Trash are different mailboxes from Apple?s versions.

    Joe Kissell?s wisdom
      fortunately, Joe has already explored this territory in this article: http://db.tidbits.com/article/10253
      he?s written the most comprehensive explanation of how to get Apple Mail and GMail to play nice
      Step 17 is the key item for this question. He?s right. If you choose ?Use this Mailbox for? for the Drafts, Sent and Trash that show up under [Gmail], it all congeals.
      The mystery for me is, why did it take editing the plist file for these to become available to choose?

    Starting from scratch
      Taking all this into account, I blasted away the ~/Library/Mail and the com.apple.mail.plist file and relaunched Apple Mail
      after creating the IMAP account, the very first thing I did was to set the ?Use this Mailbox for? accounts, and this time, they were available. Harmony achieved!  And when I look in the plist file, I see that Drafts maps to [Gmail]/Drafts, Sent to [Gmail]/Sent Mail and Trash to [Gmail]/Trash, which all makes sense.

    Remaining questions
      What is the trigger the sets the ?Use this Mailbox for? choices into stone? Most of my experiments and encounters with the Gmail/Apple Mail combo, those choices are almost always grayed out. How do you ?ungray? them, short of starting all over again as I did above?
      I?m asking because the most common situation is that I?ll get asked to ?fix the madness? of someone?s existing Gmail account, and I can?t because I can?t pick the ?Use the Mailbox for? choices. And as far as I can tell, the workaround is to edit the plist to map to [Gmail]/Drafts, [Gmail]/Sent Mail, and [Gmail]/Trash.


    -John Oakley, Petaluma, CA

         
  • Avatar

    Posted: 18 March 2011 11:24 PM #1

    I’ll be following this thread, but I only have speculation to contribute as I never use IMAP.

    My suggestion is to contact Google and Apple.  Probably Google is best to contact first since they are most likely to institute a fix, if the problem is on their end.  Apple is much much slower.

         
  • Avatar

    Posted: 21 March 2011 11:47 AM #2

    I don’t know why it wouldn’t work. It works fine for me. My only guess is that you have to have the right folder selected for Use this Mailbox… to work. Given that it worked fine for you after you started from scratch, I don’t see why it wouldn’t again.

         
  • Avatar

    Posted: 30 March 2011 11:38 AM #3

    appleseed - 18 March 2011 11:06 PM

      The mystery for me is, why did it take editing the plist file for these to become available to choose?

    That is definitely a mystery…because I cannot replicate the problem on my end, running OS X 10.6.7. “Use this mailbox for” is available for all of my Google email accounts, without any edits to the plist file.

    As for the differing folder names…I’m going from deep in my long-term memory here, but it seems to me I ran into very similar oddities when I was using MS Outlook 2007 (on Windows, yes) to check my Google accounts. Google has, basically, gone slightly astray from the IMAP standards, because of its use of the “All Mail” label in its web interface. It has to translate into “normal” IMAP somehow, so they use (I think) a custom folder setup to accomplish it. If you look up how to make Gmail and Outlook 2011 (Mac) play nicely, you’ll see that it’s even more convoluted than it is with Apple Mail.