Kind of reminds me of the old POPFile (and the IMAP extension) I used to use years ago. Email comes in, is classified and sorted into the appropriate folder.
I had always intended to add labels to it but never got around to learning Pearl to do it.
Popfile is a per folder bayesian auto classification system, procmail's more of full fat server mail filter system. You could get procmail to do the same thing but it would require a bit of work and certainly isn't an out of the box sort of thing.