Diagnostics

What those errors mean when you read the log.

IMAP servers answer in a few words and almost never say why. Here are the most common replies in plain language, and what to do about each one.

NO [AUTHENTICATIONFAILED]The server rejected the username or password

Nine times out of ten the password is fine and something else is wrong: no app password was created, IMAP is switched off in the mail settings, or the username is in the wrong format. Yandex needs both things done and answers the same way to either, which is why people spend hours checking the wrong password.

What to do: create an app password (required for Gmail, Yandex and iCloud), enable IMAP in the mailbox settings, and check the username format: iCloud wants only the part before the @, cPanel wants the full address instead.
certificate verify failedThe server certificate fails verification

Common on shared hosting: the certificate is issued for a server name like srv142.hoster.net, while you connect to mail.yourdomain.com. The connection itself is encrypted fine, only the name does not match. The other case is an expired or self-signed certificate.

What to do: in the advanced settings, allow an unverified certificate, or connect using the name the certificate was issued for. You can check it like this: openssl s_client -connect host:993 -servername host.
OVERQUOTA / Quota exceededThe new mailbox ran out of space

The transfer stopped halfway because 12 GB will not fit into a 5 GB plan. The worst version of this is when the quota runs out overnight and you find out in the morning, looking at a half-migrated mailbox.

What to do: run a size check before you start (that is our first step, and it is free), compare it against the destination quota, and if space is tight, exclude Spam and Trash — that is usually the first few gigabytes.
Too many simultaneous connectionsThe provider is capping the number of sessions

Microsoft 365 allows about 20 concurrent IMAP sessions per mailbox, and iCloud noticeably fewer. Trying to speed a transfer up with parallel threads backfires: the server starts dropping connections and you end up with more retries than useful work.

What to do: drop the concurrency to one or two threads and simply wait. That is exactly why we go folder by folder by default.
Connection reset by peerThe server closed the connection without a word

Classic throttling. The provider decided the requests were coming too fast and cut the session with no explanation. After a particularly aggressive download, Gmail may block IMAP for a few hours.

What to do: restart the transfer — whatever is missing gets copied and no duplicates appear. If the drops keep happening, pause for a few hours and slow things down.
CREATE failed: invalid folder nameThe destination will not accept the folder name

Usually it is the hierarchy separator: Dovecot uses /, older Courier servers use .. Because of that, INBOX.Sent turns either into a separate folder with a dot in its name or into a subfolder, depending on who read it how.

What to do: turn on automatic folder-name mapping — we detect the separator on both sides and rewrite the paths. Special folders such as Junk and Spam are matched by their role, not by their name.
message too largeThe message exceeds the destination limit

Microsoft 365 accepts messages up to 35 MB by default, and other providers set their own boundaries. A message with a large attachment is simply skipped — the rest of the transfer runs as usual.

What to do: nothing is broken, but messages like these are listed in the final report. People move them by hand or save the attachments separately.

Errors explained

What the server answered and what to do about it

NO [AUTHENTICATIONFAILED]IMAP AUTHENTICATIONFAILED: what it actually meansThe server returns AUTHENTICATIONFAILED even though the password is correct. Three real causes: IMAP disabled, app passwords, and login format.certificate verify failedcertificate verify failed when connecting over IMAPCertificate verification fails when connecting over IMAP. Why it happens on shared hosting and how to inspect the certificate with openssl s_client.NO [OVERQUOTA] Quota exceededOVERQUOTA: the destination mailbox is out of spaceThe transfer stopped with OVERQUOTA: the destination mailbox is full. How to size the mailbox in advance and what to exclude so it fits.Too many simultaneous connectionsToo many simultaneous connections: the provider is capping sessionsThe provider caps concurrent IMAP sessions. Why adding threads slows a migration down, and what the limits are on Microsoft 365 and iCloud.Connection reset by peerConnection reset by peer: the server closed the session silentlyThe server drops the connection mid-transfer. This is provider throttling: why it triggers and how to resume the migration safely.CREATE failed: invalid folder nameCREATE failed: the destination rejects the folder nameThe destination rejects a folder name. The cause is almost always the hierarchy separator: Dovecot uses a slash, legacy Courier servers use a dot.message too largemessage too large: the destination rejected one messageA message exceeds the destination size limit. Provider limits explained and what to do about the messages that get skipped.

Find out how big your mailbox is. It costs nothing.

Connect two servers, look at the size and decide. Or take the client and keep everything on your side.

Code on GitHub · built on imapsync · no sign-up