Delete Duplicate Messages from IMAP Account


EQ Forum Admin
Staff member

delIMAPdups looks for duplicate messages in an IMAP account, looking for messages in each mailbox that have the same Message ID. When a duplicate message is found the DELETED flag is set. If the -p argument has been supplied then an EXPUNGE operation is executed against the mailbox in which the message resides, causing the messages which are marked for DELETE to be removed.

Note that delIMAPdups does not check for duplicate copies of messages across multiple mailboxes since it is often useful to cross-file messages in multiple mailboxes.

Usage: ./deldups -S host/user/password
[-i list of users and passwords]
[-m mailbox list (comma-delimited)]
[-L logfile]
[-p] purge messages
[-d] debug mode
See usage() for additional arguments.

If you have a question about using this script please reply.

If you would like to download the script please see