Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

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.


http://homepage.mac.com/aamann/Mail_Scripts.html

Posted on Nov 21, 2011 1:18 PM

Reply
24 replies

Dec 5, 2011 6:57 AM in response to Bradley Taylor1

Thanks for the info.


Somehow this morning I managed to "mark as junk" an entire Folder and when I pulled it all back from the Junk Folder to the originating Folder - it created duplicates.


You would think APPLE would have something like this built into their Mail Software by now. iTunes has had this function for a long time to weed out duplicate Songs.


I guess it keeps 3rd party developers in business though.

Aug 29, 2012 5:09 AM in response to danyelie

Doesn't work with Mountain Lion.


This is such a basic issue with mail *arrrgh*


I'd buy an add on to do this. In fact, I would buy a lot of mail add ons to do various mail-related stuff.


I've used TBird in the past but that app is now EOL. I'm reluctant to switch to a 3rd party app like Postbox because of fear that it too will stop being supported and I will be left holding the bag.


This seems like a business opportunity. Surely someone can point me to either a plugin for mail or a freestanding app that does this.


*sigh*

Sep 24, 2012 10:20 PM in response to danyelie

Thank you. The http://www.andreasamann.com/MacOSX/Mail_Scripts link is good as of today, 9/24/12.


The "remove duplicates" script worked perfectly for me, removing hundreds of duplicates. It does it in a way that lets mail sync back the changes to icloud's imap server, which then allows you to clean up the rest of your macs mail with a simple Mail menu "Mailbox>Synchronize" command on your other machines. Lists OS 10.4-10.6, PPC or Intel, system requirements. Apparently 10.7 breaks "some" of the scripts. You could always fire up an older machine, sync mail so that it is current, run scripts, sync, and you'd be done. The changes would then sync back to your 10.7 or 10.8 Macs.


I had tried Tidy Up v2 & 3 for deleting duplicate mail messages, which it did, but in a way such that with the next mail sync the duplicates were all replenished again.

How to delete duplicate mail messages using Mail Script

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.