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 24, 2013 11:18 PM in response to Bradley Taylor1

Hi Bradley, Merry Christmas to you and your family. I am trying to go to the link http://homepage.mac.com/aamann/Mail_Scripts.html and says Http/1.1 Service Unavailable. I really want to get rid of the dublicate and triplicate email messages. Manuall deleting them is taking so much time.

I am not and expert so pls. guide me in a simple way. Thank you so much for your help in advance. Best wishes.

Dec 25, 2013 8:01 AM in response to Anshul4s

Hello,


Yes, the original web link does not appear to be active. Not sure is aamann is no longer an active user or if they are no longer supporting mac.com. If you read down through the chain, there are several others links that discussion users have recommended. These should guide you thorugh the process. Here is one I checked and the link worked. I did not test it for removing duplicate emails but give it a try: http://www.andreasamann.com/MacOSX/Mail_Scripts


If this does not work for you, try the nex. BTW, what version of OSX are you running?


Besh Wishes and good luck.

Dec 26, 2013 8:42 PM in response to Bradley Taylor1

Dear Bradley,

Thanks for yoru help. I did follow this link and it worked. Downloaded the application and started the dublicate messages app. It just kept running for more that 24 hours, but the last message it showed was retrieving messages. But nothing happened. did not find any dublicate message folder. Pls. note I use Imap accounts on Apple mail. Your further advise will be much appreciated. Thanks and Happy 2014.

Apr 16, 2014 12:07 AM in response to judybogard

The site is working now. Just clicked on link as posted in my page 1 post and Bradley's link above. (Anshuls link was broken). Downloaded the "MailScripts.dmg". I had used it previously running Mac 10.6 with Apple's IMAP mail service, worked great. Author again states "Some of the scripts installed as part of 'Mail Scripts' are not compatible with MacOS X 10.7 (Lion) or higher", so full compatibility with Mavericks is doubtful. If you can fix the duplications with temporary use of a MacOS 10.5 or 10.6 machine(or virtual) then the fix will sync back to your 10.7+ macs.

Apr 16, 2014 5:30 PM in response to Stephen...

Hi Guys, I have been able to download the latest version. Thanks for your help. Howeven when I start remove dublicate appl, select my email accounts. It says retrieving messages. then the following box apprears. "AppleScrptErr

System Events got an error: Can’t get property list item "MailAccounts" of contents of property list file "Macintosh HD:Users:anshulkhanna:Library:Preferences:com.apple.mail.plist". (-1728)" After I say okay it continues saying retrieving messages. Dont know if its removing dubilicates.


Pls note my email accounts are IMAP, so does this work for IMAP accounts?


Also when I try to close AppleScript Editor I get the error " The document can't be closed while the script is still recording. "


Pls. advise,

Apr 16, 2014 9:24 PM in response to Anshul4s

What version of Mac OS are you using? (Click on the top far left apple symbol in the top menu bar and select "About This Mac" if you didn't know already). See prior notes if it is >10.6.8.


I just tried it on a 10.5.8 PowerMac as I had forgotten how it works. Scripts are installed in a folder "Mail Scripts" in the Applications folder. Double clicked on "Remove duplicates" script which launches a window listing all of your mail folders with check boxes. Select whichever folders that you want searched, click scan. Bottom left of the window states "Checking for Duplicates" with a progress bar in the bottom right. It automatically moved found duplicates from the IMAP folders into a "Duplicate Messages" folder under the "On My Mac" section as seen on the left sidebar. This removes them from your IMAP mail server and other machines using the same. When it is done the program informs you how many, if any, duplicate messages it found. So for me three sets of duplicate messages were found and automatically disappeared as well from my other Macs using the same IMAP service, in this case Apple's. You can then compare the saved messages to make sure an identical copy is remaining in the IMAP mail folder. Then delete. Worked flawlessly.


Most Macs these days are not running 10.5/Leopard or 10.6/Snow Leopard so this will not work for you directly.

Good Luck.

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.