Mail folder file structure confusion

I'm only partially familiar with the ~/Library/Mail/ file structure that supports displayed mailboxes in Mail.app. This question is about the locally stored mailboxes in ~/Library/Mail/Mailboxes. (I have one each IMAP & POP accounts, with their corresponding IMAP-username@imap.isp_name.com & POP-username@mail. isp_name.com folders, but this question does not concern them per se.)

As I understand it:

1. White mailboxes in Mail's list contain only blue mailbox subfolders & correspond to ~/Library/Mail/Mailboxes/ folders with no suffix.
2. Blue mailboxes in Mail's list may contain both subfolders of their own & individual messages, in which case in the file structure there may be a "parent" folder with no suffix & a folder.mbox child, the latter containing the individual messages not in that folder's children.

Is this correct?

If so, why do I have the following two folders at the same level in ~/Library/Mail/Mailboxes/:
Pxxxx.mbox <-- contains a Messages folder & Info.plist file
Pxxxx <-- empty folder (0 KB)

I have a blue Pxxxx mailbox in Mail, a root level 'on my Mac' folder containing the messages that correspond to the first folder above, but that's it -- it has no children folders.

I've had this mailbox for ages & the Pxxxx.mbox folder has dates consistent with that; the Pxxxx folder was created yesterday, but I don't know why.

Is is needed, useful, a sign of an error, or what? Can I delete it without ill effects? Why is it there?

Thanks for any enlightenment you can shed on this.

iMac G5/2.0 GHz 17" ALS (Rev B), Mac OS X (10.4.7), 512 MB RAM, Kensington Trackball

Posted on Jul 13, 2006 10:56 PM

Reply
16 replies

Jul 14, 2006 4:31 AM in response to R C-R

1. White mailboxes in Mail's list contain only blue
mailbox subfolders


They may contain other white folders as well, not just blue ones.

2. Blue mailboxes in Mail's list may contain both
subfolders of their own & individual messages, in
which case in the file structure there may be a
"parent" folder with no suffix & a folder.mbox child,
the latter containing the individual messages not in
that folder's children.


Not sure what you mean. For dual folders, both folders (with and without .mbox suffix) are at the same level in the filesystem, not one within the other.

If so, why do I have the following two folders at the
same level in ~/Library/Mail/Mailboxes/:
Pxxxx.mbox <-- contains a Messages folder &
Info.plist file
Pxxxx <-- empty folder (0 KB)</div>

This is exactly how it works. And once the folder without suffix gets created for whatever reason, it remains there, even after removing everything from it.

Is is needed, useful, a sign of an error, or what?


Neither.

Can I delete it without ill effects?


Yes. Quit Mail first.

Jul 14, 2006 5:52 AM in response to R C-R

To add to David's post, the folder, and xxxx.mbox of same name, on the same level was sometimes the result of moving and creating mailboxes in earlier version of Mail -- you should not see this result with new mailboxes in Tiger. Also, read Mail Help for "creating a new mailbox" -- the abiity to specially create folder only mailboxes was added in Mail 2.0, and avoids a lot of confusion. In the earlier versions of Mail, I always reorganized in the Finder, and not from within Mail because of this confusion. In Mail 2.x, it is best to NOT reorganize in the Finder, although it can be done.

Ernie

Jul 14, 2006 6:48 AM in response to Ernie Stamper

Ernie,

My remaining problem is I have never used an earlier version of Mail, nor did I do any editing or moving of folders in Finder, or anything else I'm aware of that explains why the folder appeared. On this iMac, I have not disturbed the file structure in Finder in any way, nor have I imported anything into Mail.

The whole white, "folder only" mailbox concept remains confusing to me. I can't figure out why I have one of these that I did not create with the "slash" method, but as a simple, root level "On my Mac" folder. I created new child folders within it before putting any individual messages in it. Somewhere along the line it became white, preventing me from adding messages directly to it, which is annoying.

Any clues on what I'm missing in my understanding here?

Jul 14, 2006 7:01 AM in response to R C-R

With the present versions of Mail, I would not expect to have a mailbox in a mailbox -- that is a xxxx.mbox containing messages, and also another yyyy.mbox -- it is not meant to be, even if appearing to be allowed.

You have mentioned something about importing -- when you import a mailbox, the result in the Sidebar is typically a white folder with a black triangle allowing it to be expanded. When expanded, there is another, Blue folder named Import that is the actual mailbox.

In Mail 2.x, you must remember that moving things around in the Finder, will cause the Envelope Index (the only index, now) to lose contact with the messages.

More info, please, and feel free to email me any screenshots. I will try to examine, even though I presently have access remotely with my iBook, and not my main computer.

Ernie

Jul 14, 2006 7:13 AM in response to R C-R

My remaining problem is I have never used an earlier
version of Mail, nor did I do any editing or moving
of folders in Finder, or anything else I'm aware of
that explains why the folder appeared.


The folder could have been created as a result of accidentally moving another folder within it in Mail, then moving it out of there, for example. IMO, trying to pinpoint this one is a waste of time, as it could very well be that you inadvertently did something you're not aware of. BTW, how do you know when it was created? By looking at the creation date or what?

Somewhere along the line it became white


This is what would happen if you try to delete a dual blue folder in Mail, for example. The *.mbox folder is the one that gets deleted and the other remains.

Beware that Mail doesn't provide full support to handle these things properly from within Mail itself, and it has some bugs that may lead to data loss...

Jul 14, 2006 8:05 AM in response to Ernie Stamper

In Mail 2.x, you must remember that moving things
around in the Finder, will cause the Envelope Index
(the only index, now) to lose contact with the
messages.


To my knowledge, I have not moved any ~/Library/Mail/ files/folders around in Finder on this iMac, only examined the contents. Please don't be confused by my other recently posted Mail topics -- on this iMac G5, I have been very careful about this, up to & including making copies of the entire ~/Library/Mail/ folder to examine, rather than the "real" version Mail.app uses.

More info, please, and feel free to email me any
screenshots. I will try to examine, even though I
presently have access remotely with my iBook, and not
my main computer.


A very kind offer! For reasons of privacy & security, would edited text files of the folder structure do instead? I'm not comfortable with sending screen shots because of some of the info that would reveal.

Jul 14, 2006 8:17 AM in response to David Gimeno Gost

BTW, how do you know when it was created?


Both by creation/modification dates & by comparison to archived copies & a clone of the drive.

I understand that the Pxxx folder could have been created by moving folders around from within Mail. My confusion now is how a once-blue mailbox can become a white one if I only manipulate mailboxes from within Mail.

Beware that Mail doesn't provide full support
to handle these things properly from within
Mail itself, and it has some bugs that may
lead to data loss...


That's why I want to make sure I understand what it does & doesn't support, & what to be wary of doing inadvertently!

Jul 14, 2006 8:56 AM in response to R C-R

My confusion now is how a once-blue mailbox can become a
white one if I only manipulate mailboxes from within Mail.


I believe I've already answered what could cause this under "normal" operation.

That's why I want to make sure I understand what it
does & doesn't support, & what to be wary of doing
inadvertently!


Saved mail not showing in user-made mailboxes (Mail 2.0.7)
Apple mail deleted some of my messages... 😟
Folder recovery
Mail loses messages moved into IMAP folders
Recovering mail from an application error
Mail creates mailbox folder named / (slash)
White inbox, emails all lost!

Jul 14, 2006 10:06 AM in response to David Gimeno Gost

I believe I've already answered what could
cause this under "normal" operation.


I guess I missed something. I have never tried to delete the folder that became white or any of its contents, nor is it a dual folder with both .mbox & non .mbox versions in the file structure. It has not been renamed & has a unique but normal all text one. Here is how it was created & what happened:

I created the folder at the root level as an "On my Mac" mailbox, with the popup "New Mailbox..." command. It was named normally, with no slash or any punctuation at all, just the text "Web Account info." At this point it was an empty, blue folder. I then created a number of child folders for it, each for account info messages from a different source like isp's, paypal, or whatever. Some were created with the popup menu as its children, others were created at the root level & then dragged into it. All were empty at the time. All were still blue.

Once this was done, I created rules to move inbox messages from the appropriate source into the child folders. I also manually dragged some previously saved messages on my Mac into them. Everything worked fine so I quit Mail. To the best of my knowledge, the parent mailbox remained blue until some subsequent launch of Mail, when I noticed it had turned white.

All of this was done from within Mail; no folder manipulation of any sort was done with Finder or Terminal.

I apparently "did something I'm not aware of" to cause this, but I have no idea what kind of thing that might have been -- from what you folks have told me, I would have had to have a dual mailbox at some point or messed with the files in Finder to make this possible, but I am reasonably sure neither condition obtained.

Jul 14, 2006 10:41 AM in response to David Gimeno Gost

Or maybe you were hit by one of the bugs I'm talking
about...


Possibly so. I just wish Mail had better documentation about its normal, expected behavior, which might help pin such things down. The problem seems to be that it tries to do so much behind the scenes to simplify the user experience that I'm never quite sure what I have done vs. what it has done for me.

Jul 14, 2006 10:59 AM in response to David Gimeno Gost

One final oddity I just noticed in testing a few things:

I created a regular blue, root level folder named "Test" in Mail. I copied a message into it. (All files/folders are local, not on servers.) At this point it was not a dual mailbox, just a regular one that in the file structure had only a .plist & Messages folder with a single emlx file.

In Mail, I then deleted the mailbox, answering the 'do you want to delete it & its contents' prompt in the affirmative.

Strangely, it left a white "Test" folder in the mailbox list. I could delete that in the same way from Mail, but I have no idea why it 'went white.'

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Mail folder file structure confusion

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.