Recently I cleaned up some of my mail prefs and auto-junk filtering stopped working. If I manually marked a message as Junk, it would go to the Junk box, but messages marked as Junk when downloaded would stay in my Inbox.
Deleting prefs and resetting Junk didn't help. What I finally discovered is that if you have no rules at all in your rules list (or one that says "Stop Evaluating Rules"), the Junk rule won't be auto-run either. It now runs after the other rules (whereas it used to run before), and if there are no other rules, then there is no "after" either.
When I created a dummy rule (I even unchecked the "Active" box), Junk automagically started working again.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20031216172358316