The glitch exposes your IP address and other system details to spammers and other online tracking companies.
When you use Spotlight to search for an email, Spotlight shows a preview of that email.
When it does this, it automatically opens external images linked in an HTML email.
These emails caninclude tracking pixels, which can reveal certain details about your system to spammers.
At the moment, the only way to prevent it from happening is to disable Mail search in Spotlight.
Head to System Preferences > Spotlight, and uncheck the “Mail & Messages” option.
Glitch in OS X search can expose private details of Apple Mail users| InfoWorld