Just like MailMate is an alternative to the macOS Mail app, BusyContacts is an alternative to the macOS Contacts app. One of its popular features is that it can show related emails to the currently selected contact. This used to work with both Mail and MailMate, but currently it only works with MailMate (since the release of macOS Sonoma).

In this post I’ll describe how it works, what might be wrong if it doesn’t work, and I’ll provide a few debug hints to help both you and me to debug any issues in the future — most likely in relation to future macOS updates.


How it works

The MailMate app includes a plugin which enables macOS to parse and index metadata from any .eml files found (these are raw emails in the message/rfc822 format). The metadata can then be searched by other applications such as the BusyContacts, HoudahSpot, and the macOS Finder. The metadata includes email subject, date, received date, author (sender), recipients, and text content.

By default, MailMate does NOT index the .eml files in its own cache. You need to enable the “Indexed for Finder/Spotlight” setting in the General settings pane of MailMate. Technically, this renames an internal folder from Messages.noindex to Messages which implicitly triggers macOS to start indexing the files in the folder.

The indexing performed by the Spotlight plugin is not related to the internal indexing done by MailMate itself (although it naturally shares some code).

(Note that the “Custom location” feature does not need to be enabled. This is only needed if you want emails to show up in the Spotlight search interface. This is an ugly hack, but I haven’t found a better solution — and it doesn’t even seem to always work for me. Searching using the Finder appears to be more stable.)


Why it might not work

The following is a check list in case this feature does not work for you:

  • Make sure your copy of BusyContacts is the website version and NOT the AppStore version.
  • Go to “System Settings ▸ General ▸ Login Items & Extensions ▸ Spotlight” and click on the ⓘ to see if MailMate is enabled.
  • Go to “System Settings ▸ Spotlight ▸ Search Privacy…” to see if anything problematic is disabled.
  • Go to “MailMate ▸ Settings… ▸ General” to see if “Indexed for Finder/Spotlight” is enabled.

Debugging tricks

Using a Terminal window, the following commands might be helpful to learn more if something does not work as expected.

Assuming you have located a specific .eml file then you can do the following to explicitly parse it:

mdimport -t -d1 example.eml

In particular, you will get the location of the Spotlight importer used. Switch to -d2 to see the parser results. Use man mdimport to learn more about the command.

Test-import all emails cached by MailMate:

find ~/Library/Application\ Support/MailMate/Messages -iname "*.eml" -print0 | xargs -0 -n1 -I{} mdimport -t -d1 {}

If the emails are located elsewhere then you need to change the search path. The command above is also useful if you need to find a message which makes the Spotlight indexer hang or fail.

The following will force re-indexing of all emails in a specific folder:

mdimport -i ~/Library/Application\ Support/MailMate/Messages

Finally, you can test searching in the Terminal window:

mdfind "kMDItemAuthors == 'Benny Kjær Nielsen'"

Other values to play with are kMDItemAuthorEmailAddresses, kMDItemRecipient, kMDItemRecipientEmailAddresses, kMDItemSubject, kMDItemDisplayName, kMDItemTextContent, and kMDItemContentCreationDate.

Again, use man mdfind and man mdimport to learn more.