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