

#Webmail remove duplicate messages software#
Still, this can be a useful option if your software supports it! Note that not all IMAP servers will allow the creation of custom tags, and not all mail programs will allow you to view them. The -t option will, instead of marking messages for deletion, attempt to tag them with the custom tag duplicated. The process can take some time on large folders or slow connections, so you may want to add the -v option to give you more information on how it's progressing. When you're ready, leave that out, and it will go ahead and mark your duplicate messages as deleted.

The -n option tells IMAPdedup that this is a 'dry run': it stops it from actually making any changes it's a good idea to run with this first unless you like living dangerously. imapdedup.py -s -u myuserid -x -n "My Important Messages" Note: IMAPdedup expects to run under Python 3. That should give you a safe place to play! Simple use If you want to experiment, create a new folder on your mail server, and copy some messages into it from your inbox. You just need the imapdedup.py file, and Python 3. IMAPdedup doesn't currently have any installation process. "Subject: Your review has just been published!") Installation I'd recommend this in general, because some (foolish) automated systems can send you multiple messages within a single second, with different contents but the same headers. If you have messages without a Message-ID header, or you don't trust it, there's an option (-c) to use a checksum of the To, From, Subject, Date, Cc & Bcc fields instead.Īnd if you want to add the Message-ID, if it exists, into this checksum, add the '-m' option as well. (Note that GMail, for example, does sometimes have some unusual mailboxes.) This is a string generated by email systems that should normally be unique for any given message, so unless you've got some rather unusual mailboxes, it's a pretty safe choice. How it worksīy default, IMAPdedup will simply look for messages with a duplicate Message-ID header.

(If your server purges the deleted messages automatically, you may be able to prevent this with the -no-close option.) There is also a 'dry-run' option so you can check what might happen before doing anything scary. Whatever your system does, you will usually have the option to see what has been deleted, and to recover it if needed, using your email program, after running this script. Sometimes they are hidden and can be displayed and un-deleted if wanted, until they are purged. Sometimes deleted messages appear in a 'Trash' folder. Some mail clients will let you still view such messages in situ, so you can take a look at what's happened before 'compacting' the mailbox. Exactly what that does in your environment will depend on your mail server and your mail client.

To be more exact, it marks the second and later occurrences of a message as 'deleted' on the server. IMAPdedup is a Python script (imapdedup.py) that looks for duplicate messages in a set of IMAP mailboxes and tidies up all but the first copy of any duplicates found. Repeat this process for other mailboxes.Please note that recent versions require Python 3.6 or later When the script is finished, you’ll see a window that tells you how many duplicates (if any) it removed. If the AppleScript finds any duplicate messages, it will remove them from Mail and copy them into a Removed Duplicates folder within the Remove Duplicate Messages folder on the desktop. Within it you’ll find a Read Me document, as well as the Remove Duplicate Messages.log file. (If you don’t see an AppleScript menu, launch AppleScript Editor-found in /Applications/Utilities-open its preferences, and from the General tab enable the Show Script Menu in Menu Bar option.)Ī Remove Duplicate Messages folder will be created on the desktop. Select all of the messages in that mailbox then, from Mail’s AppleScript menu, choose Remove Duplicate Messages. Launch Mail and select the mailbox you’d like to remove the duplicates from. Within the Library window that appears, locate the Scripts folder and drag the Remove Duplicate Messages script into it. Hold down the Option key, click the Finder’s Go menu, and choose Library. The following process shouldn’t cause any harm but if something goes wrong, you can fall back on your backup.Īfter downloading the archive, open it.
#Webmail remove duplicate messages mac#
First, make sure that your email is backed up (as part of an overall Mac backup).
