IMAP broken: invisible folder or MX record mismatch?

TL;DR: The log shows my Trash folder has a hidden folder I can’t see which was supposedly deleted (trash emptied) but might have been inadvertently re-added. It’s preventing IMAP operations. But a 2nd computer is also having problems connecting to my IMAP account.

Explanation:

I’m switching my email to a new email server and I have hundreds of emails in multiple folders. I’ve got both the old and new accounts set up as IMAP and grab folders and drag and drop between the accounts to move my email over. Sometimes, instead of dragging the whole folder, I’ll select all the emails in that folder and drag them because I already have the folder set up for the new account (it is already pulling in email for the new account because I already switched the MX records for my domain).

This was working fine but I think I got ahead of the IMAP transfer process at one point. On one of the folders, which already existed on the new server, I moved the messages and once it was empty on the old one, I manually deleted it. I kept on moving files and folders but then got an error (“Downloading items from server failed”) and could not move any more messages. Well, that’s not completely true; there are some messages that I can still move, others start the IMAP connection process then stop with an error. I found that emails that had been fully downloaded (didn’t need to reconnect to IMAP to get the message) would still transfer to the new server just fine; any message that had images or attachments and needed to connect to IMAP to complete the download, abort with the same error.

I tried several things then went into account management and turned on IMAP logging and ran the diagnostic. Looking at the log showed it was trying to access an email folder I had deleted. I had already emptied the trash so tried to re-create that folder (which I could) but still got the error. Looking more closely, I realized the error said it was trying to rename a folder in the trash. I tried moving the re-created folder to the trash but it said there was already a folder by that name (even though I couldn’t see one). I then tried creating a different folder and renaming it–that failed too, of course.

So, it looks like the Trash has record of a folder I can’t see. I looked at the “properties” of the trash folder and clicked on Repair but it didn’t seem to do anything or help; neither did closing and re-opening eM Client.

THERE’S MORE:

Then I remembered I have a laptop with eM Client on it as well as the desktop computer I’ve been using (both Windows 11, BTW). I figured if there was a problem with the folder in eM Client, the machine I had not been using would not have the problem, right? But that one gets the same problem trying to connect to IMAP right away (without adding the new account or transferring any emails).

So, now I’m wondering if just switching the MX record on my domain to point to the new email server is somehow messing up my IMAP connection to my older server?

I’m wondering if just switching the MX record on my domain to point to the new email server is somehow messing up my IMAP connection to my older server.

Changing your MX record shouldn’t normally cause any issues as it just points your Incoming mail to your new server account mailbox and so it only just affects new mail arriving in that time.

So if you have been dragging / moving email from your old IMAP account to your new IMAP account on a new mail server and it’s not all appearing after moving it, that just means eM Client is still synching / uploading the email to your new server which can take time to appear on the new server depending on your upload speed and how much mail is in each folder etc.

However as you are now getting errors downloading or uploading with your desktop and laptop if nothing is synching in Show Operations, and is a constant error, then it’s either a server mailbox error on your old or new server, or it’s a local database error. You probably will need offical support to determine that and what to do.

So, it looks like the Trash has record of a folder I can’t see. I looked at the “properties” of the trash folder and clicked on Repair but it didn’t seem to do anything or help; neither did closing and re-opening eM Client

You could normally manually run the local database repair to fix the trash folder in eM Client as per @gary links for PC and Mac , but the problem with doing that is because you are in the middle of moving emails from one server mailbox to another server mailbox “that would clear your local cache of any current emails uploading / transferring” from your old IMAP account to your new IMAP account so that’s not an option you can do in this case.

So id suggest if you have a current active paid Pro, Personal or Business account go to the VIP support page and login and lodge a support ticket and link this thread so they can see what you have done so far and include your logs in ticket.

If you have run out of your offical 12 months support you can get another year support via the following page. VIP Support Extension | eM Client

Very good suggestions–thank you. This has been going on for a few days; I’ve tried lots of things, restarted eM Client multiple times, changed DNS settings, etc. So, stopping and running that database repair is a great idea! After repairing, I still get errors on some messages so I think it’s a problem on the server or the DNS settings.

There’s an IMAP import on the new email server that is supposed to suck in all the email off the old server but it only gets a small fraction, then says it’s done. I’ve run that multiple times, getting a few more chunks at a time.

eM Client has been pretty stable for me so I let me support plan lapse about 6 months ago. I may need to renew it.

Thanks again for responding.

I finally got this to work and all email is moved over now.

What I had to do (using eM Client) was change the account settings to use the hostname of the server at the company that was hosting my old email and websites, not mail.<mydomain>.com. Evidently, the new mx record at my domain hijacked the IMAP connection and caused problems, even though the main domain entries point to the original hosting server and where websites still exist.