After a server migration all POP3 users get duplicate unread emails - how to clean up

I understand enough about the differences between POP3 and IMAP to know that POP3 is supposed to be used “RETRIEVE” messages from the server whereas IMAP is designed to “STORE” messages on the server.

The problem was many of our legacy users were incorrectly advised to use POP3 and a lot of them thought they got the same functionality if they click the checkbox that says “Leave a copy of the message on the server”.

Now years later when we migrate some of these large mailboxes (up to 5 GB and more) to a new server the user is ending up with duplicate unread messages.

Any advice on how to clear these unread messages up?

So far I’m recommending setting up a new IMAP account because the server unread count looks good. I then ask them to copy messages across. As you can imagine it leaves a lot of work for the end-user and would like to hear if someone has another idea?

Hi,

If the actual issue is physical files themselves you could find and delete duplicate files recursively under given directory:

fdupes -dNr /home/username/Maildir/

Warning: Be careful running the command above, as it will just delete found duplicate files without any further notice.

At first try running it in a harmless, listing mode and see what you got:

fdupes -r /home/Maildir/

So far I’m recommending setting up a new IMAP account because the server unread count looks good. I then ask them to copy messages across.

Please check for Dovecot cache files under ~/Maildir folder, deleting those may help.

As you can imagine it leaves a lot of work for the end-user and would like to hear if someone has another idea?

There are command line utils, such as imapsync that can pull mail from remote mail servers.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.