Years later, but here is a solution I made for myself that may be of use: http://lacinato.com/cm/blog/27-imapsizereducer
It's a python script. As long as you know how to log in to your server it should work with any IMAP folder. You can specify various min/max thresholds, etc, and it will churn through the messages.