I've found a great extension for Thunderbird to help with removing duplicate messages (which occasionally happens when you do a lot of importing, merging folders etc.) Just right-click and run it on the folder of your choice and it gives you a nice overview of all duplicate emails and suggests what to do with them. You then only need to confirm they can be deleted and the extension those all the work for you. Download it here

P.S. If you're running Thunderbird 1.5 beta, you'll be happy to know the 0.0.11 version of the extension is compatible.