1

I have a large number of message folders in MacOS Mail (v. 9.3, El Capitan 10.11.6), with a pretty deep hierarchy in places--I have folders in folders four or five deep in some places. (I am talking about folders in the Mail GUI at this point, not operating system folders/directories on a drive.)

Sometimes a folder just disappears, and what's happened is that it's become a subfolder of some other folder. (It's possible that I do this by accident with uncautious use of the mouse, but I don't think that's it. I think Mail just gets confused and does stupid things sometimes.)

I know that the folder and its messages still exist, because if I open the message search box, I can find messages, and they are listed as being in a folder with that name. I want to drag the folder back to where it belongs, but sometimes I can't find out where that folder is. Since I have so many folders and subfolders, poking through every folder in Mail to find out where Mail decided to move the folder in question is time consuming.

Is there any way to find a folder, by its name, for example, in the Mail folder hierarchy?

Even if there's no tool in Mail to do this, maybe there's a kludgey way to do it by searching through Mail's data files on disk using ls, grep, Unix find, etc. Maybe there's some graphical utility that I don't know about that will help.

Thanks.

  • If you shift folders in directory(in ~/Library), and rebuild, won't they be at correct place? I had copied some folders' directories to "On my Mac" directory and it worked! On my Mac in Mail app started showing those folders. – ankiiiiiii Aug 12 at 5:47
  • Thanks @ankiiiiiii. Are you saying that I should get rid of ~/Library/Mail or ~/Library/Mail/V3, moving it somewhere temporary in case I need it back, and then open Mail.app? I can try that. Wasn't sure that something like that wouldn't cause trouble. Hmm. I should add that the email account with the folder problems is connected to an Exchange mail server. Maybe that's relevant. – Mars Aug 12 at 20:26
  • No, that would cause all the folders in the cloud to make the same structure again. I wanted to say that the misplaced folder should be shifted only. But now I doubt because of the plist files. I think this worked only because on My mac doesn’t have to sync anywhere. Guess I would remove my comment. – ankiiiiiii Aug 12 at 20:46
  • Thanks @ankiiiiiii. Well, I don't know where the folders are on disk (not cloud) anyway. I don't think they are folders. I think they're inside data files, and yes, it make sense to me that they are indexed by entries in a plist file. – Mars Aug 14 at 1:10
1

If you want to search in Finder for the same, and then do the equivalent in Mail, you should go to /Users/you/Library/Mail/V* * varies for MacOS. Do either of these 2:

  1. In the question, you mentioned that you can search for specific messages inside mail app. So just pick a rare keyword from one of them and search for the same string in the directory. Press CMD + up to reach its parent folders and then open Mail app and navigate to that folder and fix it.
  2. Since you know the folder name of the misplaced, search for name.mbox and it will give you that folder itself.

Another possibly easy method can be to select a mail, right click, "Move To"-> you should see a lot of folders. I just hope that they're expanded. If you move something by mistake, CMD + Z brings it back.

  • Thanks ankiiiiii. The second method doesn't work because if a folder in Mail isn't already open, Move To (or Copy To) won't show it (unless you know how to click down to it, but if I knew that, I wouldn't have a problem). The first method ... I don't see how to search for individual emails. They are not in separate files. I can use unix grep to search inside files, and find files containing strings. These are in disk directories/folders that have names like Mail folders, but it appears that only some of my mail folders are there. This may be an MS Exchange issue. – Mars 2 days ago
  • Thanks ankiiiiii. My mistake was not selecting "V3" (the only folder under ~/Library/Mail) at the top. But it still doesn't work, because not all of my mail folders are on the disk. I assumed they were, but they're not. In fact, my most recent mbox file under V3 on disk is from 2017. So either Mail is toring copies of data somewhere else, or it's not storing it locally at all, but is just going and getting it from the server every time I open Mail. The stuff under V3 must be left over from a different configuration. – Mars yesterday
  • The proper solution may be getting my mail administrators to fix it, but that's probably not a serious option for me, unfortunately. For the emails I can readily identify, I'm just moving them into a new folder at the top level. Unfortunately, not all are like that. – Mars yesterday
  • @Mars You can try rebuilding the mailbox in Mail.app -> Mailbox menu-> rebuild. It is highly unlikely that an IMAP (no chance in POP3) would re-download all mails at the time of launching the app. mbox is a special kind of folder. the mails are of kind emlx. the 2017 file might be when you set up that folder(account). May mbox folders were created last year and were modified today. – ankiiiiiii yesterday

You must log in to answer this question.

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