Mail creates mailbox folder named / (slash)

Today, I see a new mailbox in Mail's mailbox list named /. Under it are folders named Users, my name, Library, Mail, POP-blah-blah, and finally, INBOX. It's clear what it represents.

I also believe I figured out how it was created. I have a rule that routes mail from a very low-traffic mailing list to an "On My Mac" mailbox. Somehow during my recent conversion to Tiger and Tiger Mail, that rule lost its connection with its preferred mailbox and adopted another path at random. Today I found it pointing to this INBOX construct, which isn't even the account associated with the traffic. So I gather when the mail came in, it just "created" a new mailbox at that path. I'll probably never know how the rule lost its original mailbox attachment, but it isn't what interests me.

I have since corrected the rule, and moved the messages from this INBOX to the proper mailbox.

What I want to know is, how can I make Mail forget about the "new" folder chain it created to this mailbox? This "new" mailbox is nothing more than a duplicate representation of one of my existing account mailboxes under Inbox. So I don't want to delete the actual mailbox, I just want to make Mail forget the "second path" it has manufactured to it in its list of mailboxes.

This happened to me once before, on the very day I upgraded to Tiger. Not understanding the problem as fully as I do now, I simply asked Mail to delete the folder, and ended up losing a huge chunk of my mail. I restored my mail from my pre-upgrade backup, but ended up losing six hours worth since the backup. I certainly don't want to relive that experience.

Powerbook G4 (& Lombard, G3 iMac, iBook...) Mac OS X (10.3.9)

Posted on Jul 1, 2006 1:53 PM

Reply
13 replies

Jul 1, 2006 3:18 PM in response to C. D. Tavares

In the Finder, go to ~/Library/Mail/. With that folder open, do Edit > Select All (⌘A), then Edit > Copy (⌘C), and paste it in your reply to this post, to let me see the names of the files and folders present at the root level of the Mail folder.

Before actually posting that information, you may edit it so that the file/folder names do not reveal any details you wish to keep private, e.g. you may replace any real username with "username" if you wish; similarly, you may disguise any domain names you don't want to be revealed. Try to be consistent in how you disguise those details, though, as we may need to refer to them in subsequent posts.

Now, go to ~/Library/Mail/Mailboxes/. With that folder open, repeat the process to let me see the names of the files and folders it contains. Again, you may disguise any mailbox names you wish to keep private.

Finally, within ~/Library/Mail/, locate the account folder related to the issue (its name begins with the account type (POP, IMAP, .Mac), followed by the account username and the incoming mail server), and post its contents here as well.

Jul 1, 2006 5:08 PM in response to David Gimeno Gost

~/Library/Mail:

Envelope Index-journal
SmartMailboxes.plist.backup
SmartMailboxes.plist
Signatures.plist
Signatures
POP-postmaster@127.0.0.1
POP-D1@e.com@nowhere.e.com
POP-m@b.com
POP-h@e.com@mail.e.com
POP-ha@b.com
POP-d@l.com@b.com
POP-c@e.com@mail.e.com
POP-t@e.com@mail.e.com
POP-me@localhost
POP-c@l.com@b.com
POP-b@w.com@w.com
OpenedAttachments.plist
MessageSorting.plist.backup
MessageSorting.plist
MessageRules.plist.backup
MessageRules.plist
Mailboxes
LSMMap2
IMAP-AT@imap.aol.com
IMAP-RT@imap.aol.com
IMAP-KT@imap.aol.com
Envelope Index
DefaultCounts
Bundles
Attachments

~/Library/Mail/Mailboxes:

ACTIVE.mbox
Deleted Messages.mbox
ACTIVE
Drafts (AOL).mbox
Info.plist
L-ARCHIVES
Sent Messages (AOL).mbox
sandbox.mbox
Sent Messages (R).mbox
Sent Messages (C).mbox
R Save.mbox
Outbox.mbox
Junk (AOL).mbox
Users
TO DO
DONE
Junk (R).mbox
ARCHIVES
G-ARCHIVES
spam.mbox

The folder that got attached to the rule is
~/Library/Mail/POP-me@localhost/INBOX:

INBOX.mbox (is the only thing in POP-me@localhost)
mbox
Incoming Table_ofContents
Incoming_Mail

Jul 1, 2006 10:00 PM in response to David Gimeno Gost

I never created this.

I quit mail and deleted the Users folder by hand (actually I archived it and moved it elsewhere). When I restart Mail, it simply recreates the whole hierarchy from Users on down. Did this twice just to make sure it wasn't me.

I get the feeling that what I need to do is get inside whatever file keeps a record of Mail's mailboxes and do a little surgery to make it forget about this chain. Can you tell me what file that might be? Last time, I was a nice guy and tried deleting this mailbox chain from inside Mail, and it took a huge chunk of my mail files with it before I force quit Mail.

Jul 2, 2006 5:39 AM in response to C. D. Tavares

Problem is, Mail doesn't keep a list of mailboxes anywhere. It just displays in the mailboxes drawer whatever it sees in ~/Library/Mail/Mailboxes/...

Tell me about your localhost account. What did you do in order to set it up? Go to Mail > Preferences > Accounts > Advanced for this account. What does Mail display in the Account Directory field?

Which plugins do you have installed in ~/Library/Mail/Bundles/? Check whether there is also a /Library/Mail/Bundles/ folder.

Jul 3, 2006 12:33 AM in response to David Gimeno Gost

Oh, man, long story.

We have a gigabit home network. My only scanner device is a networked all-in-one. In networked mode, the only way it can deliver scanner images is by e-mailing them to a canned address. Since image files are big, and my network connection out of the home is not really broadband, mailing it to my external ISP and then sucking it back was neither practical nor efficient.

So on my personal machine, I configured and activated the SMTP server in OS X, and installed qpopper from Darwinports as described at http://blog.kung-foo.tv/archives/000654.php .

I've been running this way for over a year on Panther with no problems. I reapplied the mods when I recently upgraded (archive & install) to Tiger.

When I visited ~/Library/Mail/Bundles/ as you suggested, I found remnants of MailEnhancer and JunkMatcher there, neither of which I had reinstalled after my clean install of Tiger. Had I realized they were in my private filespace, I would have flushed them earlier. I quit Mail, flushed them, deleted Mailboxes/Users again, and restarted Mail. Mail still showed the entire path of mailboxes from "/" to INBOX. When I clicked on the INBOX, it recreated all the elements from Users on down.

At this point, I asked Mail itself to delete Users and everything below it. That much worked -- lost no mail (woo hoo!) But the "/" entry remains. And the "/" entry now seems to correspond to "On My Mac." That is, if I now click on the disclosure triangle next to "/", it shows me a duplication "inside" it of every mailbox that appears below it, including the special-named IMAP mailboxes that are filtered out and repositioned inside "Sent", "Junk", "Trash", etc. But (and this is Twilight Zone stuff) if I try to click on any of the mailboxes at any level under there, they are all empty. Yet the mailbox hierarchy is an exact duplicate of my real one.

At this point I began looking for something stupid, like a blank-named link to . inside the Mailbox directory. But there is absolutely nothing in there that looks the least bit hinky. So I'm still buffaloed.

As to your remaining question, the Account Directory shows (grayed) as ~/Library/Mail, just like every other account.

Let me ask you a related question. Does your mailbox window show an entry for "On My Mac"? Mine no longer does -- it just shows the folders and mailboxes that would have been below it. However, when I use pop-up menus for "Move message to" and "Copy message to," "On My Mac" shows up in its traditional position. If everybody else's Tiger machine is showing an "On My Mac" and mine isn't, maybe this "/" directory is some side-effect of the compensation.

Jul 3, 2006 1:13 PM in response to C. D. Tavares

I believe the problem is some internal setting associated with your localhost account. Deleting that account in Mail (after moving its messages to "On My Mac" mailboxes), quitting Mail, removing the ~/Library/Mail/Mailboxes/User folder, then setting up the account again in Mail might have solved the issue.

At this point, I asked Mail itself to delete Users
and everything below it. That much worked -- lost no
mail (woo hoo!) But the "/" entry remains. And the
"/" entry now seems to correspond to "On My Mac."


Before proceeding any further, I'd like to know how that has affected the contents of the Mail folder. Please report any changes made to each of the folders for which you listed the contents in your second post.

Does your mailbox window show an entry
for "On My Mac"? Mine no longer does -- it just shows
the folders and mailboxes that would have been below it.


This is normal. Mail 2.x no longer groups "On My Mac" custom mailboxes in the mailboxes list.

However, when I use pop-up
menus for "Move message to" and "Copy message to,"
"On My Mac" shows up in its traditional position.


This is normal as well if you have IMAP accounts. There is an inconsistency in how Mail displays mailboxes in the mailboxes list and how it displays them in the Message > Move To menu, if you have IMAP accounts, but it's normal.

Jul 4, 2006 3:07 PM in response to David Gimeno Gost

The original contents of ~/Library/Mail/Mailboxes is exactly the same except for two fewer items now:

Users, which I deleted by hand, and

ACTIVE.mbox, which I also deleted by hand.

(Mail, at least the earlier version, wouldn't allow you to create a folder of mailboxes directly -- you had to create the folder as a mailbox first and then turn it into a folder. This action left a useless mailbox at the folder level. If there were any messages in that mailbox, or if any somehow found their way there later, they were entirely inaccessible and invisible. And the leftover mailbox had the bizarre side-effect of making the folder appear in blue instead of white. So I would pare these mailboxes off whenever I found one. When I was answering your original question, I discovered I had missed ACTIVE.mbox, so I pared it afterwards. I know debugging a problem gets painful when the user starts making unrelated trim changes, but I really felt this one was immaterial.)

There is also a .mboxCache.plist, which I believe I just forgot to include in the list before.

Jul 4, 2006 3:42 PM in response to C. D. Tavares

Well, the ACTIVE.mbox thing was immaterial indeed, but the Users one certainly isn't. We don't have now any folder at the filesystem level to blame for the "/" entry in the mailboxes list, do we? Hasn't anything changed within either ~/Library/Mail/ or ~/Library/Mail/POP-me@localhost/?

Now, wait! You didn't really post the contents of ~/Library/Mail/POP-me@localhost/, did you? You posted the contents of ~/Library/Mail/POP-me@localhost/INBOX/. Is there really an INBOX.mbox folder within an INBOX folder in the localhost account folder?

Jul 4, 2006 5:36 PM in response to David Gimeno Gost

We don't have now any folder at the filesystem level to
blame for the "/" entry in the mailboxes list, do we?


As far as I can see, we never did, really. 😟

Hasn't anything changed within either
~/Library/Mail/ or
~/Library/Mail/POP-me@localhost/?


A file "Envelope Index-journal" has disappeared from ~/Library/Mail. Envelope Index, which is still there, seems to be some sort of SQL data.

Now, wait! You didn't really post the contents of
~/Library/Mail/POP-me@localhost/, did you? You
posted the contents of
~/Library/Mail/POP-me@localhost/INBOX/. Is
there really an INBOX.mbox folder within an
INBOX folder in the localhost account
folder?


Actually, I posted both, but to make it clearer:

~/Library/Mail/POP-me@localhost:

total 16
drwx------ 4 cdt cdt 136 Jul 1 14:49 .
drwx------ 32 cdt cdt 1088 Jul 4 16:54 ..
-rw------- 1 cdt cdt 6148 Jul 1 16:58 .DS_Store
drwx------ 5 cdt cdt 170 Jun 21 14:59 INBOX.mbox

~/Library/Mail/POP-cdt@localhost/INBOX.mbox:

total 1056
drwx------ 5 cdt cdt 170 Jun 21 14:59 .
drwx------ 4 cdt cdt 136 Jul 1 14:49 ..
-rw------- 1 cdt cdt 518439 Jun 20 21:09 Incoming_Mail
-rw-r--r-- 1 cdt cdt 17035 Jun 20 21:09 Incoming Table_ofContents
-rw------- 1 cdt cdt 0 Oct 10 2005 mbox

That's no change from before.

Jul 4, 2006 6:26 PM in response to C. D. Tavares

OK. Try this:

1. Quit Mail.

2. Make a backup copy of the ~/Library/Mail folder, e.g. by dragging it to the Desktop while holding the Option (Alt) key down.

3. Move the POP-me@localhost folder out of ~/Library/Mail/, to the Desktop.

4. Open Mail.

5. Go to Mail > Preferences > Accounts and delete the localhost account.

Report any changes. Check whether quitting Mail and opening it again makes any difference. Don't set up the localhost account again until we're done with this (I hope it won't take too long).

Aug 31, 2006 1:12 PM in response to David Gimeno Gost

Sorry about the huge delay. Family vacation and all, then I dropped the ball on this when I got back.

I didn't perform the above exercise, due to its rather drastic nature. But I did perform two other experiments that produced interesting results.

I discovered that the mailbox "spam" inside the / hierarchy, and the mailbox "spam" in its normal place in the mailbox listings, is the same physical mailbox. Each showed different messages and a different message count -- but when I rebuilt each instance of the mailbox, they both jumped to the same total number of messages, with one showing roughly half the messages as "unread," and the other showing the OTHER half of the messages as "unread." So now we know we are looking at the same boxes through two parallel paths (avatars), but somewhere there is a distinct index or table of contents for each avatar.

Then it occurred to me that I might get interesting information if I renamed the entity named "/", so I tried it. After a few seconds of cogitation, the OS responded:

Error -- Mail was unable to rename "~/Library/Mail/Mailboxes".

So I've established why it's a bad idea to simply try to remove the "/" entity, and I've established that somehow Mail has decided to include the Mailboxes directory in the list of Mailboxes inside the Mailboxes directory. 😟

Everything I've seen tells me this must be some sort of corruption in a plist or similar database somewhere -- or possibly Mail's sqlite database?

Aug 31, 2006 4:29 PM in response to C. D. Tavares

I found and fixed the problem.

Even though I got an error when I tried to rename "/" to "Calamari" (well, the bug was slippery!), the rename took and held in the mailbox list in the side pane. So I fgrepped for Calamari in the ~/Library/Mail folder and found it in the files "Envelope Index" and Mailboxes/.mboxCache.plist. "Envelope Index" appeared to be an sqlite database, so I examined it. I found the following entries in the mailbox relation:

(1573, 'local://///Users/myname/Library/Mail/POP-myname@localhost/INBOX');
(1574, 'local://///Users/myname');
(1575, 'local://///Users/myname/Library');
(1576, 'local://///Users/myname/Library/Mail');
(1577, 'local://///Users/myname/Library/Mail/POP-myname@localhost');
(1578, 'local://///Users');
(1579, 'local://///spam');

Note the supernumerary slashes in these entries.

(So maybe localhost WAS involved in the creation of this thing.)

Anyway, I deleted those entries (after backing up my mail directory, of course!) as well as the "Calamari" entry, and re-entered mail. The bogus "/" was gone, Calamari was gone, I can access all the existing mailboxes, and as far as I can see I have lost no mail.

Finally, I can put this thing to bed.

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 creates mailbox folder named / (slash)

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