How do I do an advanced search in Apple's Mail program?
February 4, 2004 3:06 PM   Subscribe

Am I missing obvious functionality in Apple's Mail program? Is there an advanced search option I can't find? I'd like to do some serious digging of the 30k or so emails I've gotten in the past year, but I don't see the option [more inside]

I used to use Eudora Pro for email, on a PC, and it offers some pretty robust searching. In this case I need to find an accountant I talked to sometime last year, but I forget her name. I do recall she sent me a PDF attachment of a tax law at one point but I have hundreds of emails with attachments. In Eudora, I could run a search on two conditions, saying something to the effect of "find me every message that mentions the word "tax" in the body but also includes an attached file whose name ends with .pdf".

I need to run a lot of obvious, easier searches in Mail like "show me every message from my boss named John that mentions the term "deadline" in the body" that I also can't figure out.

I've taken to sorting through hundreds of messages looking for which specific one mentioned what I need to look up, but is the functionality of Eudora somewhere in Mail and I'm not finding it? If not, has anyone built an applescript companion to Mail that allows for deeper searches?

I've tried searching google and versiontracker, but using the term "Mail" makes it hard to find anything in the piles of results you get from a generic word search.
posted by mathowie to Computers & Internet (6 answers total)
 
Here is some of the mail.app plug-ins, perhaps one of them adds a complex search.

Also, I found that searching for the word "attachment" finds all my mail with attachments. (since it adds an "attachment" field to the header.)

There is probably a better way.
posted by milovoo at 3:39 PM on February 4, 2004


Mail does do boolean searching, so in this case all you want is "entire message" selected in "all mailboxes" from the magnifying glass menu[1] then search for:
tax and attachment and .pdf

Also, Mail does use standard mbox files -- perhaps a unix-level utility can help? (I'm out of my depth answering that one, sorry).

[1] Hey Apple, update the HIG and give these damn things some names already.
posted by bonaldi at 4:01 PM on February 4, 2004


I've found a page that seems to list a lot more mail
utilities ( many for mail.app ) but it's in Japanese.

... besides bonaldi's method will work,
but someone should write a better find plug-in for this app.
posted by milovoo at 4:08 PM on February 4, 2004


Mail does use standard mbox files

I'm not sure that's true -- at the very least there's some plist magic going on somewhere around there. But here's an example of how to use the UNIX find command in conjunction with grep to do searches:

find /Users/namespan/Library/Mail -exec grep -ni "criteria" {} \;

The first argument is where the find command starts iterating over the directory tree. The -exec tells it to execute the following command over each file examined... and in this case, we'd be greping each file in a case insensitive manner for the word "criteria". As far as I know, any extended regular expression can go where criteria is. The {} has something to do with connecting the grep command with the find, and the \; closes out the exec portion of the find command.
posted by namespan at 7:19 PM on February 4, 2004


In this case I need to find an accountant I talked to sometime last year, but I forget her name. I do recall she sent me a PDF attachment of a tax law at one point but I have hundreds of emails with attachments.

Thank god at least one other adult has problems like mine.
posted by adamgreenfield at 9:50 PM on February 4, 2004


Zoe is an application that may solve your problem. It indexes all your Mail.app mail and does searches on every field through a web interface.

It is not very user-friendly, but it works wonders in locating that single lost email among thousands.
posted by Tripps at 9:35 AM on February 5, 2004


« Older WiFi network issues when first connecting   |   How do I export email from Thunderbird to Outlook... Newer »
This thread is closed to new comments.