Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

tomachawk

macrumors newbie
Original poster
Sep 11, 2022
9
3
I have archived folders with .emlx files (from Apple Mail, archived over the past decade or so) and since Mac OS 12.5.1 Monterey Spotlight or EasyFind are not able to search for text content in those. Before, I used Mojave and that worked with those same files, mostly I used EasyFind to search for text content in those archives.

I am now on a new Macbook Air with Monterey 12.5.1 and neither Spotlight nor EasyFind bring up any .emlx files from my archive folder.

No one knows why on the Apple Forum.

The support from EasyFind responded: An .emlx file has base64 encoded data, not the text as you see it displayed, so it cannot be found in a contents-based search.

But I find that explanation strange, because Mojave worked just fine with those same .emlx files.

Any suggestions?
 

0128672

Cancelled
Apr 16, 2020
5,962
4,783
I'm not sure about .emlx files, but Spotlight will find .eml files. In Monterey 12.5.1 I dragged an email to the desktop and its extension was .eml. How do you produce an .emlx file from Mac Mail?
 

splifingate

macrumors 68000
Nov 27, 2013
1,922
1,711
ATL
I was able to search for .emlx (Finder; Monty 12.5.1), and found a handful of hundreds.

I can open them in TextEdit, BBEdit, etc., but--alas--QuickView just spins (nearly forever, it seems), and I was not able to successfully search for keywords within using Finder.

I do not have a running Moj install to test.

Regards.
 

tomachawk

macrumors newbie
Original poster
Sep 11, 2022
9
3
Well, .emlx is the native file format of Apple Mail. You do not need to produce them, Apple Mail saves all messages in library/mail as .emlx
 
  • Like
Reactions: 0128672

tomachawk

macrumors newbie
Original poster
Sep 11, 2022
9
3
I was able to search for .emlx (Finder; Monty 12.5.1), and found a handful of hundreds.
Thank you for the feedback.
Do they have the AppleMail icon in spotlight results list? Those are probably the active ones in AppleMail. That is not the problem.

But archived .emlx files that have been stored outside of library/mail do not appear in results since I use Monterey. I would be surprised if it would be different on your Mac.
 

splifingate

macrumors 68000
Nov 27, 2013
1,922
1,711
ATL
yw

I haven't used 'Mail' in years, but it seems (since I got hits on my search) that I do have quite a few backups stored from way-back. I just picked one at random to show the path:

Screen Shot 2022-09-11 at 5.09.31 PM.png

I guess these constitute backups of /Library/Mail, and not 'archives'....
 

0128672

Cancelled
Apr 16, 2020
5,962
4,783
Guess I'm curious how OP's archive is being produced. It is an actual Mail archive using the archive function? Is that Library/Mail/Archive folder copied and stored elsewhere on the hard drive or an external?

Or is OP's archiving process different?

Probably similar to what @splifingate did, I copied my Archive folder into a temp Documents folder, and Spotlight found the emlx files.

Added: I also reindexed the user library folder but spotlight didn't find anything within in.
 
Last edited:
  • Like
Reactions: splifingate

tomachawk

macrumors newbie
Original poster
Sep 11, 2022
9
3
@WildSky my archive consists of copies of the Library/Mail folder I do every couple years. This folders are then stored on external drive.

While Spotlight finds the attachments like PDF from those folders, none of the actual mails in .emlx format show up.

Only Mails listed within AppleMail do show up in searches.
 

BrianBaughn

macrumors G3
Feb 13, 2011
9,849
2,506
Baltimore, Maryland
My Monterey machine is down right now but I tested in Catalina by copying one of the subfolders in ~/Library/Mail to my desktop. Spotlight was able to find text in a emlx message there and QuickLook is able to open them.
 

tomachawk

macrumors newbie
Original poster
Sep 11, 2022
9
3
Thanks Brian. Yes, I did also not have problems before Monterey. Mojave was able to find them.
 

0128672

Cancelled
Apr 16, 2020
5,962
4,783
My Monterey machine is down right now but I tested in Catalina by copying one of the subfolders in ~/Library/Mail to my desktop. Spotlight was able to find text in a emlx message there and QuickLook is able to open them.
I had the same experience in Monterey. It just doesn't find them in the Library folder.
 

tomachawk

macrumors newbie
Original poster
Sep 11, 2022
9
3
@WildSky well, I get results listed from Mails stored in AppleMail, those are the .emlx files that are in user/library/mail
but any .emlx file outside of library does not get found.

SO I am surprised yours does not find .emlx files that are in library, did I understand that right?
 

0128672

Cancelled
Apr 16, 2020
5,962
4,783
@WildSky well, I get results listed from Mails stored in AppleMail, those are the .emlx files that are in user/library/mail
but any .emlx file outside of library does not get found.

SO I am surprised yours does not find .emlx files that are in library, did I understand that right?
Yes, my search results don't show any in the Library, only outside of it. It gets weirder, eh?
 

gilby101

macrumors 68030
Mar 17, 2010
2,974
1,641
Tasmania
@WildSky my archive consists of copies of the Library/Mail folder I do every couple years. This folders are then stored on external drive.

While Spotlight finds the attachments like PDF from those folders, none of the actual mails in .emlx format show up.

I can confirm the behaviour you are seeing. In my case:

I use Carbon Copy Cloner (was using Chronosync) to do a daily 1-way synchronisation from ~/Library/Mail to a folder on an external disk - so like a simple Finder drag and drop to produce folders of .emlx files.

Until recently (how recently??) I could do a search on a word in message content and got the expected results. I usually use HoudahSpot which uses the Spotlight index.

I now can't find any .emlx files. Either in Finder or HoudahSpot.

It is some while since I have searched Mail in this way, so I am not sure when this behaviour changed (for the worse).

I will try and find the solution (involving the mail "importer") as it bugs me as well as you!

Edit1: The developer of HoudahSpot says the emlx Spotlight Importer was removed with Big Sur. That is the importer to index content. See discussion here https://forums.houdah.com/post/houdah-spot-big-sur-apple-mail-search-addin-isnt-loading-11255776 and comment on Nov 16, 2020.

Edit2: A workaround is to use FAF (Find any File https://findanyfile.app/index.php). It is very fast searching my collection of about 100,000 messages.

The support from EasyFind responded: An .emlx file has base64 encoded data, not the text as you see it displayed, so it cannot be found in a contents-based search.
I am not sure about that base64 statement. I agree that EasyFind doesn't search content of my emlx files, but FAF does.

Yes, my search results don't show any in the Library, only outside of it. It gets weirder, eh?

Not weird - merely annoying. :(

For some time (as far back as Catalina) Spotlight has not indexed ~/Library/Mail as files. Instead, Mail is indexed into "Core Spotlight" and that index is only searchable by the Mail app. Apple Notes has the same behaviour - notes can only be searched from within Notes.
 
Last edited:

gilby101

macrumors 68030
Mar 17, 2010
2,974
1,641
Tasmania
EMLX as a Bad Thing:

As an aside, the emlx format is a bad thing and we should avoid using it outside Apple Mail. It is bad because there can be multiple files per message and they can get separated. For archiving it is much better to use eml or mbox formats. As a (paid) example, EagleFiler (excellent for archives) always creates eml or mbox.
 
  • Like
Reactions: 0128672

tomachawk

macrumors newbie
Original poster
Sep 11, 2022
9
3
Hello @gilby101

A workaround is to use FAF (Find any File https://findanyfile.app/index.php).
WOW! Thank you for your excellent work and insights! You really made not only my day, but my decade!!

FindAnyFiles really DOES WORK!
I have tried it before (I usually used EasyFind and was looking for alternatives) but it seems when I tried it some weeks back, I did not configure it properly, so it also did not find anything and I ruled it out as a solution.

Honestly, I feeled lost without access to my old emails. I only need that a few times now and then but it is usually Work information that can safe me a lot of time or confirm complied duties.

EMLX as a Bad Thing:
As .emxl was never a problem before and who would know Apple intentionally or accidentally would ever exclude it from search, I never thought about the way I archive emails. Copy over the library/mail folder is just the easy way to do this, I was not even aware what file types would be involved. I have emails stored even back to classic Mac OS.

I will check that EagleFiler. Thanks!
 
  • Like
Reactions: splifingate
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.