I have huge mailboxes that I need to clean up.
For example over 37K emails close to 1Gb - I run the script Remove Duplicate Messages (Remove Duplicate Messages - EagleFiler AppleScripts), however, it always times out.
MacBook Pro M2 w 96GB Ram and 4TB SSD - doubt that machine is a problem
Any help is greatly appreciated
Thank you so much!
How long does it run before timing out? It’s set to run for up to 24 hours, and for 37K messages I would expect it to finish within just a few minutes. So I wonder if it’s timing out in an unexpected place. If you run the script from within Script Editor, you can use View ‣ Show Log, and perhaps then it will show you which command timed out and give us a clue as to what’s happening.
Events should not be empty if you open that part of the window before running the script. I just tested this on my Mac. You can also click the clock icon at the right to see the events and replies in the separate Log History window.
Separating the mailboxes into per-message files will be slower. Also, the script in question operates on mailboxes rather than on individual messages. There’s a separate script for removing duplicate files.
No, it operates on the whole mailbox file. But it should normally be plenty fast and not time out, so I think we just need to figure out what’s causing the unexpected timeout.
Well, this looks good that it didn’t time out. Perhaps there really were no duplicates? It looks by Message-ID so messages that are similar do not count as duplicates unless they are actually two copies of the same message.
Those are .eml message files. The script that you are using is for removing duplicates within a single mailbox file. To remove duplicates among a group of selected .eml files you would need this script.
I dug a little deeper inside the RAW and it looks like the MessageID’s of the above are Different for each line (have no clue how), but when I look inside the rest of the message they are the same.
So I figure the script needs to disregard MessageID and then just compare From, Subject, and inside the text to be the same.
Unfortunately, I don’t know the script or perl to comment out the MessageID check and add inside text comparison. OR. check for MessageID AND but after that, in addition, check if the text is the same
I don’t think there’s a way to modify the script to work that way. The Message-ID is core to how the formail tool works. Perhaps I can add this sort of duplicates removal as an option in a future version of EagleFiler.