Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Spotlight does not search within archived mail (.mbox files)

I need to search words within archived mailboxes (.mbox files created with Mail 3.6). Spotlight seems unable to do searches there. Any help or solution will be most welcomed

MacBook Pro, Mac OS X (10.5.8)

Posted on Sep 2, 2009 12:38 PM

Reply
Question marked as Best reply

Posted on Sep 2, 2009 12:50 PM

Acqua wrote:
I need to search words within archived mailboxes (.mbox files created with Mail 3.6). Spotlight seems unable to do searches there.


that's right and you can't make it search there. the only way to make a searchable archive that I know of is the following.

put the messages you want to archive in a local mailbox in "On my mac". now go to /users/username/Library/Mail/Mailboxes and copy the mailbox folder corresponding to the mailbox you've just made to a convenient location. You can now delete the mailbox you've made from inside Mail (not from finder) if you like. Spotlight will still search messages in the backup folder in the usual way and you'll be able to open those messages in Mail. also, if you need to you can import the .mbox folder back into Mail.

Message was edited by: V.K.
10 replies
Question marked as Best reply

Sep 2, 2009 12:50 PM in response to Acqua

Acqua wrote:
I need to search words within archived mailboxes (.mbox files created with Mail 3.6). Spotlight seems unable to do searches there.


that's right and you can't make it search there. the only way to make a searchable archive that I know of is the following.

put the messages you want to archive in a local mailbox in "On my mac". now go to /users/username/Library/Mail/Mailboxes and copy the mailbox folder corresponding to the mailbox you've just made to a convenient location. You can now delete the mailbox you've made from inside Mail (not from finder) if you like. Spotlight will still search messages in the backup folder in the usual way and you'll be able to open those messages in Mail. also, if you need to you can import the .mbox folder back into Mail.

Message was edited by: V.K.

Sep 2, 2009 1:20 PM in response to V.K.

Thank you very much, V.K., for your prompt reply.

Since I already have many archived mailboxes in a folder within Documents in the Finder, I made a copy of that folder (named it "Mail archives copy 020909" to make sure that I can locate it easily) and put it in /username/Library/Mail/Mailboxes. I am afraid Spotlight still does not search there; it just searches on mailboxes currently "ON MY MAC".

Sep 3, 2009 4:13 AM in response to V.K.

This is precisely what I have: within the Documents folder I have a folder named Mail Archives full of .mbox files. It is within these files I need to search words.

So far, the only way I manage to do searches in archived mailboxes is by importing them all into Mail and keeping them "ON MY MAC". (I hardly see the logic of archiving mailboxes if they are almost unavailable).

Sep 3, 2009 7:38 AM in response to V.K.

Yes. I have all archived mailboxes in a folder within Documents (where Spotlight does not search; this is my problem). When you advised to put the files in /username/Library/Mail/Mailboxes I made a copy of that Documents folder, gave it another name by adding the date, and put it in /username/Library/Mail/Mailboxes. Again Spotlight did not retrieve any words from the archived mailboxes.

I observed that, while I had that folder in .../Mailboxes, a white folder was present ON MY MAC in Mail with the name of the folder I had placed in .../Mailboxex, but it was empty, no messages could be read (I imagine because I had not imported them correctly in Mail).

Sep 3, 2009 8:34 AM in response to V.K.

Thank you so much, V.K. This time I got it right. Since I had the mailboxes archived I had to import them before following your advice precisely. Now Spotlight does search in the Documents mbox files copied there from the Username/Library/Mail/Mailboxes folder.

(The odd thing is that now I have two folders in Documents, with lists of .mbox files that look alike and Spotlight just seems to see one of them!)

Sep 3, 2009 8:57 AM in response to Acqua

(The odd thing is that now I have two folders in Documents, with lists of .mbox files that look alike and Spotlight just seems to see one of them!)

they are not actually alike. one is a regular text file. the other is a folder not a file containing .emlx files with messages. you can open it and see what's inside. that's the one that spotlight can search.

Spotlight does not search within archived mail (.mbox files)

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