Automatically remove duplicate mails in Thunderbird
It happens sometimes that you find duplicate mails in your inbox in Thunderbird. This can happen for instance when you retrieve new emails from the mail server and get disconnected during that process.
It can happen then that those emails will be retrieved again when you check for mails so that you end up with them being listed twice in the email client.
That's obviously not what you want, and while you can deal with the issue by deleting all duplicate emails manually, it may take some time to do so depending on the number of mails you have received.
Thunderbird has a nice hidden feature that defines how to treat duplicate mails.
I'm going to show you how to set it correctly so that duplicate mails are removed automatically.
Remove dupes in Thunderbird automatically
You have to click on Tools > Options to open the preferences in Thunderbird. Click on the Advanced tab there and select Config Editor under Advanced Configuration. Note that you may receive a warning message when you open the editor for the first time. You need to accept the warning before you can continue.
If you are using the Firefox web browser you may notice that it looks identical to the one you find in the browser. Enter mail.server.default.dup_action in the filter and the entry should be shown alone in the main window.
Now right-click that entry and select modify from the menu. You can change the parameter to the following values:
- 0 - this is the default value. It retrieves duplicate mails like normal mails.
- 1 - if you set the value to 1 duplicate mails will be deleted automatically once retrieved
- 2 - if you set the value to 2 duplicated mails will be moved right into the trash
- 3 - the value 3 finally marks duplicate mails as read
If you want to delete duplicate mails automatically in Thunderbird you set the value 1.
You may want to experiment with those options for some time before you select a final value for it. While deleting duplicates may sound like the best option right out of the box, you may want to be sure that no regular mail gets caught in the cross fire. While unlikely, it is better to be safe than sorry. My advise is to use a value of 2 or 3 instead and monitor this for a while before you set the value to 1.
Thanks for knowing me about config editor.It is helping me a lot.
This problem only seems to happen in Windows Vista. An old XP machine does not do this. I have dual boot Vista and Linux and it is endemic on Vista, but I have never had it on Linux [Suse 11.1].
We have to leave our mail on the server, so we can pick it up in different locations, so the Mozilla idea of removing mail from the server is not helpful. However, the layout of Thunderbird in Linux and WIndows is different and this make much advice hard to follow. For example TOOLS in Linux has fewer options and ACCOUNTS are under EDIT not TOOLS.
If only the Mozilla teams would get together and make the Linux and Windows versions as nearly the same as possible, it would make life easier..
Just a word of warning for unsuspecting ‘fiddlers’, if you change this value in the config editor you are very brave.
Has the author of this article stopped to consider which parametres the config editor uses to determine if emails are the same?
Changing this value to 1 certainly will stop duplicate emails, and most others as well.
Lucky I discovered this before I lost too many orders!
Does’t matter if its a different order – it just deletes all orders because there are already ‘orders’ in the inbox!
The search for the elusive cause of duplicates continues, until then I’ll just stick to the duplicate removal tool which I set to: Author, Message ID, Send time & Subject.
Well I made the suggested change, but it changed nothing. The same duplications occur every time I open Thunderbird. I know this is a Thunderbird problem because I don’t get duplications for that email address on my phone. It only seems to happen for the current month. No past emails are duplicated. Something is going on with the last version or two of Thunderbird and I think they should make this a priority. It’s too annoying and makes me not want to ever check my mail thru Thunderbird. If it keeps happening I will abandon Thunderbird. There are scores of posts on this. If they don’t care, I don’t care.
Thanks a lot now mail box does not have duplicate mails,
Thanks for much for this remedy which seems to be working so far, although so far is only one day with NO duplicate emails coming into my Thunderbird program for a change. . . For several months I’ve tried to find a remedy for this daily frustration, but no suggestions or provided “Add-On”s worked, with reason given that such Add-On’s were only for previous Firefox versions, but not for my current Firefox version 37.0.2 . . . FINALLY after digging deeper and deeper into “Search” internet files, – – this remedy turned up, with easy-to-follow, well-explained instructions. I also followed the advice to not use config.value 1 right away until adequate testing time for emails, so I used value 2 for now. I’ve read some other comments from one’s who have also followed these instructions, sadly reporting no successful results. (wondering if they’re using the current Firefox version 37.0.2 or perhaps another version ???). . . So at this moment I’m not sure if duplicates might return by tomorrow, but for today no duplicates have come through. Thanks so much again, as this sure is worth a try !!!
I set this to send duplicate emails to the trash folder and it is working perfectly. Thank you for the tip!
Glad to know that this remedy is also working out for you, as it sure did the trick for me, as of my last posting above back on May 11’th, – – no duplicate emails have returned to my inbox, – – what a simple fix this has been, which we can highly recommend to others !
One thing I’ve noticed is that if I open TB and check the mail and then check it again and if it is having the duplicate issue, it will send the email to trash like I have it set and it’s perfect. But if I open TB and check the mail, get it and close TB and then open it again, if it is having the duplicate issue, I will get the duplicate in my inbox even if the first copy is sitting in the inbox. This has only happened to me one time. Usually when I check emails, I leave TB open for a while and usually give it another check before closing. But this one time I didn’t.
This leads me to believe that this fix only works per session. So it only works for the time you have it open. Which is still excellent.
I just make sure to check at least twice before I close it to try and lessen the chance of getting the dupe again on a restart of TB.
I’ve decided also to set it to delete since it does seem to be accurate.
Thanks, Ten…Sorry I’m sort of slow-minded to absorb what you did very well to carefully explain on this, – – all I can say is that from the time I applied that fix someone had kindly provided, – – it worked right away for me, – – but just as you mentioned, – – I DID see duplicates in my trashcan from what showed in my inbox, –but only for a short time. . .
I saw those dups in my trashcan for only about the first 2 or 3 days, – – after that, no duplicates became thrown into the trashcan at all, – – it appears that they just stopped coming!
The only configuration I had made for having them auto-deleted was within that first fix instructing me to type in the given words for preventing dups in my inbox became instantly successful. – – In my account settings I changed nothing to where incoming emails become automatically deleted, because I am still able to delete them manually by choice. –Repeating= It was only thru my altering TB’s inside configurations (typing in the fix words provided) that the dups began being deleted automatically and I never see them anymore.
Hoping this reply is not too confusing to read through,- – also hoping that the configuration fix (the same one I had applied) will also eventually work out perfectly for you. (P.S.=PLEASE NOTE: as mentioned in my first posting above,–I found this fix only applies to the most updated version of TB=Thunderbird.)
I’ve been using the fix with it set to “2” for about a week and I still get duplicates in the trash. It seems whatever problem I have is not totally fixed by going to that preference in about:config and setting it to 2. But, it does works as it should so I’m not really complaining. There was only one time that it failed to send the dupe to trash and went to my inbox and that happened when i opened tb, checked mail, closed tb and reopened it quickly. It seems closing it and then checking it again fast caused it to forget the dupe and then it put it in inbox.
Not a big deal really since that’s not how i usually check my email. It was a slip of the mouse click.
I’ve now set it to “1” as it seems to work good and I’d rather it just delete it. I haven’t received any dupes in a few days now since that last one so I’m hoping that that is the end of it. Maybe we have some others things configured differently and that is why we are seeing different behavior. I don’t allow email messages to stay on server for example by unchecking leave messages on server.
I’ve been told by a few techy-types that the real problem is my email provider, MSN. They believe it is not configured right and that is why TB has the problem. But at least this fix really helps.. nothing else has.
By the way Reba.. I don’t know if you are aware of this, and I don’t know what browser you use, but if you use firefox, you can install an extension called ublock origin or if you want adblock plus, it totally gets rid of ads online and makes browsing the internet much quicker.
If you are using Internet explorer you can still use adblock plus for internet explorer.
Chrome also has these extensions available. The most important lists any of them use are easylist and easyprivacy.
They also may protect against “malvertising” which is getting a virus from a website advertisement.
Anyway, if you already know this please ignore, it you don’t, you might want to check it out. Makes the internet much nicer.
Good to know that it was a mouse click fluke that threw things off a short time, and if the “1” setting works best for you, then you’ll want to stay with that. (setting “2” still works best for me) . . . You mentioned that the server (MSN) might have interfered a little with the configuration, (although no serious ongoing problem, thankfully) – – made me think of my server which is connected with MSN, being Hotmail my emails are connected with. So this config “fix” has sure helped you and I to get around the duplicate problems, while nothing else had worked for me before that., – – even preventing duplicate emails in my TB inbox although I have chosen to allow emails to remain on my server until I manually delete them.
It was also thoughtful of you to also suggest me to make sure I have the best Ad-blocking add-on (shown in my Firefox “extensions, as I do like Firefox much more than Internet Explorer) – – and in the “extensions” tab I find that I have “Adblock Plus” as well as another service called “Adblock Plus Pop-up Addon” – – both of these have worked very well to keep those pesky (& sometimes viral) ads from driving me crazy while surfing thru the internet.
Thanks again, Tens, – – it was beneficial for us to compare our technical experiences while we keep watch on other necessary improvements in the future ! ~
Just a follow up.. I did receive a duplicate email today to one of my email addresses with it set to delete (MSN) so at least for me it doesn’t seem to have totally fixed it. I think I may experiment with a different email provider.
Sorry this has happened, Tens, – – when U said that you use the MSN server, does this mean your email is through the msn.com server address, or could it be through hotmail.com – -or also through outlook.com as both hotmail and outlook are also through MSN.
My email address is through hotmail.com and with Hotmail the #2 setting works fine through Firefox and into my Thunderbird email client. . . So if you’re considering checking for a new server, that’s why I’m checking if you now go directly through MSN with an msn.com email address. If it turns out that you’re using hotmail.com or outlook.com, – – this might bring good results – IF you are also using Firefox for your default browser, – – then I think you could change your settings to #2 and have more successful results. . .
At least I’d be curious as to how this might turn out. Hoping whatever you choose to do will work out for you !
Hi Reba – Yes I use Firefox… yeah it happens with a .msn,com,(friends email) .outlook.com and live.com (my emails) email address… all Microsoft email addresses. Someone told me they had the same issue with a Microsoft email and he (tech person) believes it is because of the way M configures their servers – incorrectly and its not a TB issue. I don’t know if that is true. For now I do have it set on #2 back from #1 after the duplicate fail. I was thinking about changing email providers to a non microsoft address.. though this will be a hassle. I may just keep it as it is and just deal with the occasional duplicate. At least it is better now.
thanks for further clarifying, Tens. . . .Also, with you using Firefox and an outlook.com and live.com email address, – – I’m glad that you’re trying (or re-trying) switching # 1 to #2 and giving it a chance long enough to see if it might hopefully settle any more duplicates down, eventually to none. ..
Only thing different you’re doing than me at this point is not using a hotmail.com email address, in case msn might have configured that server most favorably for the #2 setting to work best, – – I just don’t know, – – but hoping that the way you have it now will do well enough.
Thanks & maybe after giving enough time U think right for testing the latest setting, — I’d like to know (& probably others reading these testings) how your current settings work out.
Hi folks, I recently got several times some duplicates. Right now I have set that variable to “2” so I am looking forward to see how it works. However, I recommend you to give a try to mozzilla addon called “Remove Duplicate Messages (Alternate)”. It has a lot of settings and works good for me, after a while of playing with it. On the other hand, it is not automatically launched. You have to launch it manually and after it finds something you can preview every message listed, its size, lines count, date and time, everything is listed tabulary. I usually use it to move messages to the trash but it can delete them totally, too.
And, as someone mentioned a Linux in earlier post, just forget about the Thunderbird. There are better alternatives for Linux, e.g. KMail. Nevertheless, I like TB.
Setting parameter to ‘2’ did __nothing__.