Jump to content

Mail.app search by author, subject or content

Recommended Posts

18 hours ago, sumin said:

I found my ~/Library/Mail/ doesn't contain any files in it,


Make sure that you're navigating to your user directory's ~/Library/ and not the main Macintosh HD Llbrary.


Quickest way to do this is to paste the ~/Library/Mail/ path into Alfred, in fact :)


Don't move anything, as Mail's files need to be where Mail expects them to be. Just make sure Mail is set up with your accounts, then take a look at the path above ensuring you're definitely in the right user directory, and we'll take it from there.


Also, please let us know which version of macOS and Alfred you're using.



Link to post
  • 3 weeks later...

Just sharing my own experience: 

I had "no results and fallback to default search" until I granted "Full Disk Access" rights to Alfred. You can do that in System Preferences/Security & Privacy/Privacy/Full Disk Access. Click the padlock icon to allow changes, then drag Alfred to the app list on the right. Make sure it's checked, restart Alfred, done. Voila, work like charm.


This is MacOS Mojave 10.14.3 and Alfred v3.8


Thanks for the great wf, @Vero

Edited by Indolamine
Link to post
  • 1 month later...
  • 1 month later...

Mine keeps going to the default (google) search engine. I use emfrom > enter > use name of a contact who is in my contacts and who has many emails. 


Here's a screenshot of Alfred with the input ready.


Mojave 10.14.3

Alfred 3.8.1

Alfred checked in Accessibility


Any ideas?



Screen Shot 2019-05-14 at 1.34.15 PM.jpg

Link to post

@Tonycr46 As a basic check, are you using Mail.app for your email? This workflow is intended specifically for users who use Mail.app, and won't find results from other email clients or web-based email sources. :)


If you're indeed using Mail, can you please try the various keywords with the simplest search term possible you would expect to find?


This file filter is very simple:

  • It searches for com.apple.mail.emlx files
  • In the search scope ~/Library/Mail

Take a look at the objects in the workflow to see if any need changing for your particular configuration.


You can also check that your Mac's metadata is complete and that using the Alfred Metadata Tool (https://cachefly.alfredapp.com/tools/AlfredMetadataTool_v1.1.zip), your email files show the correct file type and are in the correct location.


If the metadata doesn't seem complete, then rebuild your Mac's index, and you should be good to go :)





Link to post

Thanks, Vero.    


Yes. I'm using mail.app. I haven't made any changes to it as far as the default locations. 


Something that probably has a bearing on it and I can't figure out how to fix it is that Spotlight is not coming up with emails when I search and the search in Mail doesn't even offer to search for addresses or senders. The only thing the search in Mail will search for is text. It seems like Spotlight is not indexing the email, but I've spent hours trying the different suggestions people have to get this to happen.


I have a Mac running High Sierra and everything works fine (Spotlight, your Alfred workflow and Mail search). As I said, I do have the accessibility enabled on the Mojave machine. 

Link to post

@Tonycr46 If Spotlight isn't returning results, then that's the source of your issue; Alfred (and any other third-party app relying on the same metadata index) won't be able to find results either.


You haven't said what kind of metadata can be seen if you install the Metadata Tool as I recommended, but I'm assuming there's some corruption there.

  • First, launch System Preferences > Security & Privacy > Privacy > Full Disk Access
  • Add Terminal to the list of apps
  • Launch Alfred's preferences to the Advanced tab, click "Rebuild Metadata index" and check the box for "Delete /.Spotlight-V100"
  • When Terminal launches, enter your password and hit return
  • Keep an eye out for any error messages, and let us know if there are any
  • Wait an hour or so to allow your Mac's index to be rebuilt

You should now have a freshly rebuilt index, and Alfred, Spotlight and others should return results.



Link to post
  • 3 months later...
10 hours ago, musi003 said:

All my searches are falling back to google search...


Could you please provide a screenshot of the Mail workflow so that we can see the keywords (if you've modified them)?


Also, can you let us know exactly what you're typing into Alfred, and what results you're expecting?


Finally, which version of Alfred and macOS are you using?


The more information you can provide, the more likely we'll be able to help you troubleshoot the issue on your Mac. :)



Link to post
  • 5 weeks later...

I am using Alfred 4.0.4 [1111] with macOS 10.15 and the workflow Mail.app Search v3 does not work. The first letter after emfrom immediately shows the standard search.
Alfred's Metadata Tool seems to show the meta data correctly and the permissions are set correctly. 
~/Library/Mail is entered.

Are there any known problems with this workflow and Catalina?

Many greetings

Link to post
2 hours ago, dfay said:


macOS 10.15 Catalina bans third-party applications from searching the Mail.app Spotlight index. On macOS Catalina, HoudahSpot will thus no longer be able to find your Apple Mail messages.”


And the reasons for not moving to Catalina just keep on coming. Got High Sierra on one machine and Mojave on two others. Going to stay there for a long time.

Link to post

In macOS Catalina, Apple have removed access for third-party apps to Mail.app results by excluding it from the Spotlight metadata that apps like Alfred can use to return results. As such, the workflow won't return any results, as macOS no longer returns any Mail results.

Here's a thread including responses from an Apple employee explaining what's happened to the Spotlight index. Within this thread, there's a somewhat possible workaround of copying the Mail folder to a different folder within your Home folder (e.g. in Documents), it becomes indexable. However, we can't advise doing this and you'd be doing so at your own risk, as it could cause other issues.




We are hopeful that Apple will realise that this is necessary to third-parties and bring this back. 



Link to post
  • 3 months later...
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...