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


Click here to return to the 'Delete large numbers of duplicate emails from Mail.app' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Delete large numbers of duplicate emails from Mail.app
Authored by: david-bo on Jan 31, '10 09:48:38AM

Why wasn't message id enough to identify duplicates? It must be unique. All messages with identical message id are duplicates unless you haven't modified them locally.

Actually, old Eudora had an option to delete duplicates based on message-id that, if selected, was applied every time you opened a mailbox. A very simple and elegant solution.

I would be interested in finding a script for IMAP-mailboxes doing this. Anyone?



[ Reply to This | # ]
Delete large numbers of duplicate emails from Mail.app
Authored by: Kalak on Feb 26, '10 02:00:39PM

Assuming mbox format (such as used on some IMAP servers, or from the "Archive Mailbox" in Mail.app, save this as something like /usr/local/bin/mbox-removedup.sh
then run it on the mbox in a terminal:
sh /usr/local/bin/mbox-removedup.sh ~/Inbox

--begin copy--
#!/bin/sh
formail -D 10000000 idcache < "$1" -s > ztmp && mv ztmp "$1"
rm idcache
--end copy--

---
--
Kalak
I am, and always will be, an Idiot.



[ Reply to This | # ]
Delete large numbers of duplicate emails from Mail.app
Authored by: david-bo on Apr 09, '10 02:47:12PM

Care to explain how your script works?



[ Reply to This | # ]