They do not all fit one same category and we cannot have one-approach-fits-all
* RevengePorners: Clear cut criminal behavior, have the service cooperate with prosecution.
* Spammers: Depends on whether they're leading you into malware. Filters have gone a long way in dealing with that specific thing. In some legislations plain spamming may be criminal too.
* Doxxers: Grey area of law tbh, when paired with threats could easily categorize into criminal behavior.
* Trolls: Take the internet less seriously, be more conservative about sharing your identity online and lurk more. Of all things I don't understand why the current zeitgeist is "take all trolling as seriously as possible and give them stupidly large amounts of power and act surprised when trolling only gets worse".