Jump to content
Vero

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.

 

Cheers,
Vero

Share this post


Link to post

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

Share this post


Link to post

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?

 

Thanks.

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

Share this post


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 :)

 

Cheers,
Vero

 

 

Share this post


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. 

Share this post


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.

 

Cheers,
Vero

Share this post


Link to post

Thanks, Vero.

 

I haven't run the Metadata tool since I am working on the High Sierra machine right now. When I go into the office tomorrow, I'll check that.

 

Appreciate the help. Will let you know in a few hours (I'm GMT +7).

Share this post


Link to post

Join the conversation

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

Guest
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...