I'm just thinking here - I've not really used IMAP too much - but couldn't the following be done:
I may be wrong but the emails are in the same place whether you use IMAP or POP3 server wise. Therefore, I would have though you could create an account on Thunderbird (say Email Backup), put it as POP3, and put in the same detail for incoming and outgoing. Then make sure it removes the email off the server.
Then once all the emails are in, you just disable that account from receiving (and sending) emails. You would then have all the emails on your thunderbird under a different account and your mail server would be back to empty.
I'd recommend the OP to wait for one of the more tech savvy guys to confirm whether that would work, or whether there is an easier way before doing this though...
$50 Discount 1LUCID50 Sign up now