No idea about Evolution, never used it myself. But in Thunderbird there's an option under the File menu (File -> Compact Folders). Simple as that.
When you cat your inbox file, you might see that loads of old mails that you thought you had deleted from your inbox are still there. This easily adds up to several MBs. Compacting it will get rid of that abundance.