How to deduplicate your IMAP emails
IMAPDdedup is a tool to deduplicate IMAP emails, i.e. delete identical emails from your IMAP account. By default, it will only delete mails within the same folder and use the Message-ID header to find duplicate emails. It is also pretty fast, since it only needs to load the message headers, not the complete messages.
First, clone it using
git clone https://github.com/quentinsf/IMAPdedup.git
Then run it using
python3 IMAPDdedup/imapdedup.py -s [server] -w [password] -r -S -u [username] [Folder]
For example:
python3 IMAPdedup/imapdedup.py -s imap.your-server.de -w Hiethi3lah -r -S -u [email protected] INBOX