So I had some fun with Python last weekend. The result is a tiny project on kenai.com called Sidebar Config. It doesn't do much more than generate a configuration file for the Mutt sidebar. But it does so based on folders in either one or more Maildirs, or on your IMAP server.
Here it is : kenai.com/projects/sidebar-config
I've commented and cleaned up my Mutt configuration files. While I feel you can get the most out of Mutt by writing your own config, these might be helpful in getting someone started. They should also be a pretty good example for usage of the account_hook and folder_hook.
Since it seems that I can't link to tarballs or folders on this server, here are links to the individual files :
muttrc
account_hooks
colors
folder_hooks
gpg
lists
macros
sidebar