Removing duplicates from mail base

Wouter van Marle wouter at squirrel-systems.com
Mon Jul 3 10:10:07 EDT 2006


Hi all,

I've a rather peculiar issue. I have a rather large archive of e-mails
in the cyrus imap format. But due to copy errors while migrating to the
cyrus server, I now have ended up with many many duplicate e-mails. And
I'd like to take these out.

These duplicates are the same down to the message-ID.

Does there exist a built-in tool or so to clean a cyrus mailbox and all
it's children from duplicates?

Alternatively I think I can relatively easy hack a script together that
checks for dupes, and deletes the affected messages. Is it a good idea
to start working on cyrus' mail store directly? (of course I have a
backup - but will the server accept this?). It seems to me the mails are
stored in single plain-text files, so using normal string functions I
can easily grab the messageID and remove any duplicates.

Regards,
Wouter van Marle



More information about the Info-cyrus mailing list