Jun 15, 2005
Tip: Remove Duplicate Emails with Mutt
Mutt has a little-known feature to detect duplicate messages. I’m quite sure it detects duplicates by their Message-ID header, but it could be from something else in addition to that. You can do a pattern match duplicate messages in a mailbox and do whatever with them, e.g. delete or move them somewhere else.
Let say you want to delete all duplicate messages in the current mailbox. Just do a tag-pattern (bound to T here), put in ~= as the pattern, then all duplicates will be tagged. After that, you can delete tagged messages (bound to ;d, or just d if you have $auto_tag=yes).
Duplicate messages are also indicated by = in the thread if you sort the messages by thread and you have $duplicates_thread=yes (it’s yes by default).
Follow