You mean filtering? That could get extremely expensive computationally, though. Tools like Rspamd support LLM-based filtering, but traditional Bayesian filtering is vastly cheaper and more computationally efficient. Hm, maybe LLMs can be used as an additional signal for ambiguous messages rather than as the primary filter.
I was sort of thinking a final stage of the filtering pipeline - though prompt injection etc are risks.
If you are thinking using AI to classify messages, the scale of email spam is so massive that using conventional techniques won't work. It won't make sense energetically speaking IMO.
I think techniques like HashCash by Adam Back should be revisited.