Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: Use some advanced search features in Mail.app Apps
I'm not sure if this is common knowledge (a couple of quick searches turned up nothing related) or completely obscure, but Mail.app's search is more advanced than it appears. It seems that you can structure searches using fields...
keyword1 from:some_user subject:some_word
...to search for all messages that match keyword1 in the entire message that are from some_user and have some_word in the subject. It seems that the search box is completely mimicking Spotlight, which gives the power of Spotlight searches inside of Mail.

After playing with this a bit, it seems that from: will search names, whereas email: will search email address. For instance, in searching for a message from jdoe@somewhere.com (John Doe), you can use from:john or from:doe or email:jdoe or email:somewhere.com. (Mail seems unforgiving when no wildcards are used, e.g. email:doe@somewhere doesn't turn up any results.)

[robg adds: I'm about 99% certain this is 10.5 only, but I'm traveling today and only have a 10.5 machine with me; a friend ran a quick 10.4 test, and it doesn't seem to work as described here.]
    •    
  • Currently 2.58 / 5
  You rated: 5 / 5 (12 votes cast)
 
[50,146 views]  

10.5: Use some advanced search features in Mail.app | 7 comments | Create New Account
Click here to return to the '10.5: Use some advanced search features in Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Use some advanced search features in Mail.app
Authored by: Mac Berry on Dec 04, '07 08:12:00AM

I'm sorry to say this really isn't advanced at all. It's far more limited than Spotlight, and even less advanced than the searches you can set up in smart mailboxes, which are already pretty weak. I'll try to explain:

In Spotlight you can perform Boolean searches, such as "from:john OR from:bill", but these won't work in Mail. They are always AND searches (all messages from John AND Bill, rather than all messages from John and all messages from Bill). If you try to type OR it'll actually search for OR!!

In smart folders (and also rules as it happens), you can either match ALL criteria (AND searches), or you can match ANY criteria (OR searches). This is more powerful than the hint, but won't achieve for example: "from Bill or from John, with "snuff" in the subject, but not from the "legal drugs" folder". This was true in Tiger as well.

So in order of descending power, available searches for Mail.app run: Spotlight, followed by smart folders/rules, followed by this hint, followed by Mail's search bar.

Remember that to use this hint, the search type must be set to "entire message".

Mark



[ Reply to This | # ]
10.5: Use some advanced search features in Mail.app
Authored by: ClarkGoble on Dec 11, '07 08:01:55PM

This is true. I was looking at the plist that the Smart Mailboxes are stored in and you really can't do more complex stuff there. I was kind of hoping they'd be stored more in a format like the Finder's smart folders, which are easy to edit. But they did things in a very weird way.



[ Reply to This | # ]
10.5: Use some advanced search features in Mail.app
Authored by: pedz on Dec 04, '07 09:10:23AM

I still like it. I rarely use OR's in my mail searches. It appears that double quotes work but single quotes do not. e.g. from:"bob marley"

The email: appears to be any email address.



[ Reply to This | # ]
10.5: Use some advanced search features in Mail.app
Authored by: hhip on Dec 05, '07 01:17:53AM

this is still better than nothing!

do someone know of a reference specific to Mail.app on the possible fields and syntax somewhere online?



[ Reply to This | # ]
10.5: Use some advanced search features in Mail.app
Authored by: Mac Berry on Dec 05, '07 05:45:15AM

My point was that it doesn't replace nothing! You could already do far more than this using either Spotlight or smart mailboxes.

I do accept that it enables slightly more advanced searches to be performed from the search bar instead of having to set up a smart mailbox, but I'd rather they'd spent time making those more useful instead of adding something you can already do (better) by other methods!



[ Reply to This | # ]
10.5: Use some advanced search features in Mail.app
Authored by: eaganj on Dec 05, '07 08:43:11AM

This feature seems to be quite buggy. When I start a search in Mail on "Entire Message" and type "from:" the search switches from "Entire Message" to "From", but then doesn't match anything (apparently because it's searching for a message from someone named "from:bob"). If I then manually switch back from a "From" search to an "Entire Message" search (again), it behaves as expected. Is this a case of Mail trying to be smart but failing?



[ Reply to This | # ]
entire message not available
Authored by: stellarvisions on Feb 08, '08 05:18:02PM

hey, I just upgraded to Leopard and suddenly my "entire message" option is not available when I search messages.

I know that this works from within spotlight so I forced a re-indexing to see if that would solve the problem, but no joy.

I find the messages in spotlight from the menu bar (so spotlight is searching them) but they are not presented in the context of mail which is much less useful.

any ideas?



[ Reply to This | # ]