Will the Mail.App (on Mojave) search within the base64 encoded parts of a message with mail rules? It looks like it only searches the text.

I'm not looking for it to decode the base64, rather just search for some raw base64 snippets provided by my rule within the base64 encoded sections.

My goal is to test whether some specific words have been included inside a base64 encoded html email.

It looks like Mail.app skips base64 encoded sections when searching emails via the rules.

1 Answer 1


Mail and spotlight use the same process to construct and search the same metadata database. If you can’t search in spotlight, mail can’t search as well.

To enhance the function of both, add a custom spotlight indexer to add that pattern to the indexing.

The default spotlight won’t find that content in spotlight in general or mail in specific.

If you’re of a mind to program your own extension here are two developer links to get started:

  • How do you "add a custom spotlight indexer"? Apr 27, 2019 at 16:35
  • 1
    @JBis Most people install an application that has these as part of their code that loads. So, Outlook installs a plug in to allow spotlight to index outlook mail file content that the core macos doesn’t search or index.
    – bmike
    Apr 27, 2019 at 16:43
  • Do the mail rules rely on spotlight to conduct searches of incoming mail?
    – znhohs
    Apr 28, 2019 at 15:13
  • Great clarification question @znhohs. See my edit above, the answer is yes.
    – bmike
    Apr 28, 2019 at 15:47
  • Sorry, and just to be clear - the email rules engine also uses spotlight search?
    – znhohs
    Apr 29, 2019 at 14:39

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .