IMAP Error: command FETCH: Invalid messageset


Error in IMAP command FETCH: Invalid messageset: This error is caused by a well-known bug in the IMAP implementation used by your email server. This typically affects IMAP servers known as DoveCot email servers. The bug is documented here:



Internally, each IMAP message is assigned a unique ID called UID. MigrationWiz retrieves UIDs from the source server as a way to implement fast data retrieval. MigrationWiz also retrieves UIDs from the destination server as a way to prevent creation of duplicates when performing multi-pass migrations. Because of the bug in some IMAP implementations, MigrationWiz is unable to retrieve UIDs from the IMAP server.


Upgrade the IMAP Server

Consider upgrading the IMAP server to a version which contains a fix for this well-known bug.

Disable Duplicate Detection

If the IMAP server cannot be upgraded, and the IMAP server reporting the error is the destination server (not the source server) for the migration, the following workaround can be used:

  1. Sign in to the MigrationWiz account
  2. Click Mailbox Migration.
  3. Click Migrate Mailbox.
  4. Select the Mailbox Connector.
  5. Click View Mailboxes.
  6. Select your Mailbox.
  7. Click Edit Mailbox.
  8. Click Show Advanced Options.
  9. Check Do not search destination for duplicates.
  10. Click Save​.

Note: The same Advanced Option can also be set on the connector. In this case, the setting will apply to all mailboxes under this connector.

By disabling the search for duplicates, MigrationWiz stops fetching UIDs from the destination server. As a result, the error is not encountered. Note that duplicate prevention is still in effect, but only as long as the same mailbox object is being used. For example, if multiple migrations are performed using the same MigrationWiz mailbox record, no duplicate will be created. However, we cannot guarantee protection against duplicates if the MigrationWiz mailbox record is recreated.

Was this article helpful?
0 out of 0 found this helpful