OK, actually that will take clicks: one click for emptying the trash, and the second click to compress the folders. I want to do this on all my IMAP accounts in Thunderbird, so I don't have to do it one-by-one.
Is this possible?
Check out the Xpunge (0.5) Plugin
It can run both on demand and on a timer and will clean out multiple mail accounts, compress and clear trash etc
I've used it for a couple of years now it definitely helps keep things tidy