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.
Closing Words
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.

You said that Outlook isn’t your main email client, so which is your main one?
I think its thunderbird
It is Mozilla Thunderbird.
Awesome! This actually solved my problem… what a stupid bug.
If this is the same bug that I’ve encountered, there may be another fix: (1) hover over open Outlook item in Taskbar, cursor up to hover over Outlook window item, and right-click; (2) this should give you Restore / Move / Size / Minimize / Maximize — choose Move or Size; (3) use your cursor keys, going arbitrarily N/S/E/W, to try to move or size the Outlook window back into view. Basically, the app behaves as though it were open in a 0x0 window, or at a location that’s offscreen, and this will frequently work to resize and/or move the window. Don’t forget to close while resized/moved, so that Outlook remembers the size/position for next time.
THANK YOU Claude!!! I could get the main window to launch but could not get any other message window to show on the desktop. You are my hero!!!!
Solved my issue! 6 years later and this is still problem…
Fantastic. Thank you. Size did the trick.
This solved my Outlook problem, too. Thank you. :)
Thank you so much, this started happening to me today and was causing big problems. You are a life saver, I hope I can help you in some way some day.
You are a god – thank you!
thanks a lot…. work like charm.. :-)
Yah…thanks Claude. I’ve been having the same problem and tried all the suggestions…your solution was the answer. It had resized itself to a 0/0 box. Cheers
Excellent post. This had me baffled even trying to accurately describe the problem. This fixed it for me.
Thank you
Thanks a lot for the article. Don’t know why it happenend, don’t know how it got fixed, but it was really annoying and now it works :-)
Thanks a lot. I was facing this issue from past 3 week. I tried everything but no resolution. The issue was happening intermittently and mainly when I was changing the display of screen ( as i use 2 monitors). The only option i had was to do system restore. But thanks to you.
I’ve been tried to sole this problem for 12hours. Your comment about changing the display of screen helped me a lot!! Thanks!!
Thank you…don’t know why this happened but your instructions helped me fix it. Running Windows 10 and office pro 2007
Great tip! Thanks!
Worked for me, too – thank you!!!
It’s Worked for me, too
thank you very much!
I had a similar issue with Outlook 2013 on Windows 10 and this helped me to fix it. Thank you very much!
Thank you so much. Solved!
Considering you published this in 2012, incredible not been debugged by Microsoft.
Thank you again. M
This problem was faced by only one user logging to TS 2008 r2 using outlook 2010.The issue was resolved.
Thanks.
Great tip. Thank you!!!! If it helps, I had to use the Control Key and the arrow keys at the same time to bring my window back into view. Worked like a charm.
Thank you, this worked !!!!
Man, you are a fucking god. Thanks a lot, what an annoying bug!!
Awesome, this post solved the issue. Many thanks!