HOWTO: Fix duplicating emails on IMAP server

Problem
Receiving duplicate emails in IMAP email account

Scenerio
One IMAP account, accessed via an email client (in my case, Thunderbird), from both home and from the office, using message filters to move email into certain IMAP folders.

I had setup the filters both at home and in the office, as I wanted the email to be moved into the correct folders regardless of where I was. An obvious expectation, right?

After lots of investigation, I finally figured it out. I almost always leave my email client open when I leave the house or the office. That mean's both email clients will receive email, and since this is an IMAP server, both clients are connected to the same place.

Email client A receives an email, the filter says it should be moved to folder_xyz, and moves it there. Meanwhile, email client B receives the same email, only it see's it on the server before Email client A moves the email to folder_xyz. So email client B also moves it to folder_xyz (keep in mind both email clients are setup with the same filters). This causes the email to be duplicated and you end up with two copies of the same email!

I was driving myself crazy because I thought it was a problem with the email server.

Solution
The best and cleanest solution would be to just remove the filters from one of your email clients. I deleted the filters from my email client in the office, and since I always leave my email client at home open, within 5 minutes of receiving an email, my office email client shows the email moved to the correct folder.

The other solution, although not 100% reliable, is to change the receive time's on the email clients. Email client A could be set to check for new email every 5 minutes, and email client B every 10 or 15 minutes. That way, by the time email client B checks email, email client A should have already received and moved email to the correct folder.

Summary
I hope someone finds this how-to helpful. It took me many weeks of annoyance to finally realize what the problem was. Sometimes the solution is staring you right in the face (quite literally in my case, my email client!).

If you find this how-to helpful, I'd appreciate a quick comment below!

Write a Comment

Comment

  • Related Content by Tag