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 Apr 09, '10 02:47:12PM

Care to explain how your script works?



[ Reply to This | # ]
Delete large numbers of duplicate emails from Mail.app
Authored by: bradknowles on Jul 20, '13 05:00:50PM
The "formail" program is a part of the "procmail" package, which dates back to 1990. Since OS X is based (in part) on Unix, procmail is something that has been included by default as part of the operating system for as long as I can remember.


The code in the post you are responding to is based on the "procmail examples" or "procmailex" man page, and you can find a copy of that page at https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/procmailex.5.html. You can see a copy of the "formail" man page at https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/formail.1.html.


Note that this example will delete duplicates based exclusively on the content of the Message-id: header, which is SUPPOSED to be unique for each and every message, but in some cases is not. This is part of why the procmailex man page suggests keeping a "duplicates" mailbox which you can go through manually to see if there are any messages which were mistakenly believed to be duplicates. This is also part of why other AppleScript examples you may have seen will check more than just the value of the Message-id: header.

---
--
Brad Knowles


[ Reply to This | # ]