[Migrated from MSDN Exchange Dev]IMAP migration from Exchange 2010 to O365 results in error: The specified message set is invalid.

KyleXu-MSFT 26,201 Reputation points


I’m migrating a bunch of mailboxes from Exchange 2010 on-prem to Office 365 based on IMAP.
The most are going fine, but approximately 10 mailboxes have a status “Synced with errors”.
The error is:
Error: ImapBadResponseException: Error: Imap server sent BAD response to FetchCommand. Response code: ‎'‎', message: ‎'The specified message set is invalid.‎'
When I download the report for that user I see
Fatal error ImapBadResponseException has occurred.
Can someone point me in the right direction?

Below is the output of some PS commands to gather some info.

Source link : https://social.msdn.microsoft.com/Forums/office/en-US/797ba37a-d8bc-451b-a220-bdc225a791a9/imap-migration-from-exchange-2010-to-o365-results-in-error-the-specified-message-set-is-invalid?forum=exchangesvrdevelopment


Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,801 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. KyleXu-MSFT 26,201 Reputation points

    Since you could migrate other mailboxes successfully, it means there doesn't exist issue with the configuration for IMAP migration. This issue may relayed with those mailboxes themselves, you could try to take steps below to narrow it:

    1. Make sure the CSV file that you used are correct
    2. Here are also some limitation that you need pay attention to: 33835-qa-kyle-1021102138.png
    3. Try to migrate those mailboxes to another database, the migration action will fix some minor problems in the mailbox itself.
    4. Using command below to repair this mailbox file structure.
      New-MailboxRepairRequest -Mailbox User1 -CorruptionType ProvisionedFolder,SearchFolder,AggregateCounts,Folderview

    If you still cannot migrate this mailbox data to Exchange online, I would suggest you take this way to migrate data for this part of the mailbox:

    1. Use New-MailboxExportRequest command to export data from Exchange on-premises mailboxes.
    2. Use network upload to import your organization's PST files to Microsoft 365

    If the response is helpful, please click "Accept Answer" and upvote it. Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.