I often respond and tell I’m currently not interested. Legit head hunters leave me alone or ask to contact me again in a year or so (which I’m ok with. You never know when you need a new job).
Regarding the question: I don’t get many mails from recruiters. I wouldn’t invest time in setting up a block mechanism.