While I'm a huge fan of Smart Folders in Mail, I've possibly been abusing them and not filing my mail at all. Once I had around 10,000 messages in my inbox, I decided that it was time to do something about it. Ideally, I'd have multiple sub-folders, such as Clients and Vendors, and then in these folders, I'd have Client Name A, Client Name B... and Vendor Name A, Vendor Name B, etc.
Sorting through 10,000 emails and manually moving them wasn't my idea of fun -- even on a cold, rainy afternoon. Neither was creating a slew of individual rules for something like If from contains clientname.com then move message to mailbox Client Name. This seemed like a job for AppleScript! As my script-fu isn't as good as I would like it, I've resorted to having a single Sorted folder, and then within that are folders named with the relevant domain name -- eg clientname.com. Here's the script:
Mac OS X Hints
http://hints.macworld.com/article.php?story=20080124214333383