Software

Still frustrated with Apple Mail searching

Vincent Danen can't figure out why Apple can't figure out a simple thing like Search functionality in Apple Mail. Here are some tips on things he's learned about it, but it's still not right.

If there is one thing that frustrates me about Apple's Mail client it is the poor searching. Apple Mail isn't nearly as powerful as it could be, but for many it may be enough -- if you know some of the shortcuts and commands.

There is an empty search box in the upper right-hand corner of the Mail window and it is here that you type in your search terms. But what do you type? Having done some poking around, it seems that Apple neglected to document any of the possible commands that can be used here. By the looks of things, you simply type in the field and then manipulate the search results page to select if you want to search the To or From fields, etc.

It can be done easier, if you know a few of the commands. This will save some mousing around and will help you construct more useful search terms.

There are five search "terms" or "expressions" that can be used. Using just text, such as "john", will search for "john" everywhere: To, From, Subject, and the Entire Message (or whichever field you click on later to tune where you want to search). If you are looking for email from John, you can use "from:john" and Mail will search for emails that contain "john" in the email address or the name. Using the "from:" predicate is the second term, the others are just as obvious: "to:" to search in the To: address, "subject:" to search subject lines, and "email:" which looks to search any email address (From or To, giving higher rank to matches in the From address).

You can also combine these to create better search filters. It's a little clumsy, but it's not entirely useless. For instance, if you want to find all messages from you (you@domain.com) to your wife (wife@domain.com) you might use:

from:you to:wife

Now assume you want to find messages from you, to your wife, about an upcoming vacation. Buried somewhere in your mailbox you vaguely remember that such emails had the word "vacation" in the subject, however you don't want to just pull up any old message with "vacation" in the subject (such as spam or conversations with other people):

from:you to:wife subject:vacation

There also seems to be a NOT conditional, but not an OR conditional; the NOT conditional is fairly messed up and doesn't seem to work reliably. I would not trust using anything like NOT or OR (AND is implied when you have more than one word in the search). You may decide to play, and perhaps you'll have better luck than me, but Mail's searching is extremely basic, simple, and using conditionals seems to really confuse it. Using Smart Folders gives you far more options than the search box, sadly, but who wants to define a Smart Folder for the occasional targeted search query?

There are other tools that can enhance Mail's poor search implementation. One such tool is Rocketbox but it didn't impress me very much. Maybe I didn't give it enough time to index all the mail, but when it didn't tell me it was still indexing, and I tried to search, the results I got were less accurate than Apple Mail's.

Another application is HoudahSpot, which is a better frontend to Spotlight than Spotlight. It uses all of Spotlight's metadata but gives you much more powerful ways of searching. While HoudahSpot searches more than just Mail, it can be used to build more complex search queries than what is afforded by Mail. HoudahSpot's steep $30 price tag may prevent you from looking at it, unless you are also looking for a more advanced search tool than Spotlight itself, and you find it fills that need.

It's quite depressing that after all of this time, Mail still cannot do more than dumb queries. While full regular expression support would be nice, I would be happy with a working NOT conditional and an available OR conditional.

As it stands now, it makes me want to drop into a Terminal and grep around in ~/Library/Mail/. Come on Apple, it's 2011. Email searching has been figured out over a decade ago. It's amazing that they lead the pack in so many areas but completely drop the ball on something as simple as this.

Perhaps someone out there would be kind enough to offer a better searching solution (besides an alternate mail client, of course)?

About

Vincent Danen works on the Red Hat Security Response Team and lives in Canada. He has been writing about and developing on Linux for over 10 years and is a veteran Mac user.

3 comments
ealanm
ealanm

I'm hoping you have some thoughts on a problem that has plagued me since I started using Apple Mail.  I would like to have a smart folder that has all of the emails I received from or sent to a specific address (or list of addresses).  I have been mucking around with Spotlight syntax but have been unable to accomplish this simple task. 


It seems as though Apple's goal was to create a system that makes it very easy to get unspecific results, but really hard to get specific results.  Unfortunately, for me, I rarely want unspecific results but very often want specific results.  Regular expressions would have been much better.

eeg
eeg

I've multiple pop and imap email accounts on different Mac machines. Mailsteward (free trial version with 15,000 email limit) has done exactly what is claimed. I was going to buy it from Appstore but it was temporarily unavailable via that route. The searchable archive and associated database it has created so far lack nothing! I can't remember the last time I came across such an excellent easy to use comprehensive solution.

corrp
corrp

I only use the built-in search of Apple Mail for quick and dirty searches. The information in your article should help in the future. Thanks. I also use an external application, Mail Steward (standard version), which uses SQLite under the hood. It does create searchable database, so you may have a space constraint but I found it has wide latitude in search features.

Editor's Picks