My "one weird trick" for spotting this behavior is using my middle initial on LinkedIn. LinkedIn stores it as a part of my first name, so their spam always starts off with "Hey Mark P.!"
Those emails get ignored. I ignore most automated agency emails as well.
I will always reply to personal emails from in-house recruiters or employees, however. I am starting a new job soon, though, so it's only to thank them for writing.