How to delete duplicate mail messages using Mail Script
We somehow ended up with all of our mail messages being duplicates in all folders and mailboxes. Some 5000+ duplicate emails. Found this link in an archived discussion thread. This kind individual wrote some scripts. One of them allows you to select duplicate emails. It puts them in a folder it creates call "Duplicate emails" You can then select all and delete. Way faster than going through every folder and mailbox manually selecting them.
You can download the apps and it will put this new Apple Script folder in our Application folder. It includes "delete duplicate messages" and worked great. I will not bother you with details as he does a great job describing it on his web site.