Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A script to remove duplicate messages from Apps
Some bug in of Panther leads to multiple downloads of the same messages (at least in my configuration). It's a pain to manually remove all these massages again and again. Luckily, I found Andreas Amann's Mail Scripts. There is an AppleScript called "Remove Duplicate Messages" (based on the Message-ID header). You can follow his Panther-specific installation instructions.

Because I wanted only this script, I just removed the part of the script which is above -- now, on to the fun part... and stored it in ~/Library/scripts/Mail Scripts. In, select the menu item "Update Scripts Menu" then select all messages to be analyzed for duplicates, go back to the Scripts menu, and choose "Remove Duplicate Messages." The script then creates a new mail folder and moves all duplicate messages into this folder.
  • Currently 3.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (4 votes cast)

A script to remove duplicate messages from | 6 comments | Create New Account
Click here to return to the 'A script to remove duplicate messages from' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A script to remove duplicate messages from
Authored by: aamann on Dec 27, '03 08:42:50PM

Looks like this hint is already outdated;-)

Just yesterday, I released a completely new version of 'Mail Scripts' which is AppleScript Studio based. You won't be able to find the above mentioned line in the code any more (which was part of the 1.3.7 version which is still available for download - the ReadMe file for the old version includes a link for the sources of that version).

Andreas Amann

[ Reply to This | # ]
A script to remove duplicate messages from
Authored by: pisej5 on Dec 29, '03 03:17:42PM

I installed these mail scripts and tried out the "Remove duplicates..." script, but unfortunately it generates an error (AppleEvent timed out -1712) while loading the mailbox hierarchy and hangs after this. Have anybody had the same experience? I'm trying this running Panther on a Cube.

[ Reply to This | # ]
Yes, known - working on a fix/work-around
Authored by: aamann on Dec 29, '03 10:29:16PM

Yes, this is a known problem (however, it doesn't occur for everyone...)

I am currently re-writing the "Remove Duplicates" script completely and this issue should hopefully be gone with the new version (it is not a problem of the code used but some nasty AppleScript/AppleEvent caused race problem/race condition)

Andreas Amann

[ Reply to This | # ]
An unusual problem and the "status" header
Authored by: scorpion on Mar 19, '04 09:08:29AM

I've been running Mac OS X since it was released and never had any duplicates. But just after updating to 10.3.3, I got a ton of duplicates only in my POP account (not my .mac or anything else). I ran the script and it didn't find them. One thing I noticed was when I showed complete headers, the status of the newly-downloaded messages was "RO" and the status in the original message was blank (and the message IDs were identical). Is there something in the script which differentiates between duplicate messages with this weird Status header difference? Or can someone tell me what the deal is with these messages?


[ Reply to This | # ]
A script to remove duplicate messages from
Authored by: wpdv on Dec 27, '03 11:12:34PM

When I first installed Panther 10.3, Mail went nuts. The number of messages in my mailbox began rapidly changing before my eyes. I immediately called my web master, and he said everything appeared to be normal on his end, and that this problem was only with my account. He is a "Mac" man, and suggested that the problem was a bug with the new release. Before I ended the several minutes call, I had 107 messages in my mailbox!

The only setting I had changed in Mail after I had installed Panther, was selecting the box in: Mail Accounts>Advanced>Remove copy from server after retrieving a message>to "After one day".

I changed the setting from "After one day" to "Right away".

I thankfully haven't had this problem with Mail since.

I hope this helps someone. (:P)

[ Reply to This | # ]
Might not be a bug
Authored by: skipole on Dec 28, '03 01:06:18PM
Try the following:
    Open the
    Go to Preferences
    Select accounts
    Select your account
    Go to advanced tab

Look at the "Remove copy from server ..." setting. IF it is not "Right away" or "When moved from Inbox" you will get your messages sent over and over until you delete them.

Working on Macs in a PC environment is like putting on fireworks displays for the blind. The slightest noise scares everyone and no one see the brilliance of y

[ Reply to This | # ]