Mail.App, Rules, Regular Expression or content search, Base64

mail-rulesmail.appsearch

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.

Best Answer

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: