On 2013-11-12 19:22:24 +0100, Jonas Petong wrote:
> Today I accidentally copied my mails into the same folder where they had been
> stored before (evil keybinding!!!) and now I'm faced with about a 1000 copies
> within my inbox. Since those duplicates do not have a unique mail-id, it's
> hopeless to filter them with mutts integrated duplicate limiting pattern.
> Command '<limit>~=' has no effect in my case and deleting them by hand
> will take me hours!
> 
> I know this question has been (unsuccessfully) asked before. Anyhow is there 
> is
> a way to tag every other mail (literally every nth mail of my inbox-folder) 
> and
> afterwards delete them? I know something about linux-scripting but 
> unfortunately
> I have no clue where to start with and even which script-language to use.

    for every file:
        read file and put the message-id in a dict in { message-id: [file1, 
file2..fileN] } order

    for each key in that dict:
        delete all filename values except the first

It should not be very complicated to write. If nobody else comes up with
something, I can possibly it for you after work.

Attachment: pgpfkgvJm0Edy.pgp
Description: PGP signature

Reply via email to