First off, please do not post questions in the Tips & Tricks forum. It has clear instructions not to do that.
Hazel works with files on your filesystem. Apple Mail has it's own internal storage and would not recommend having Hazel interfere with that. I would look into products specifically designed for this, like SpamSieve.