Estou no celular, portanto, um pouco breve, mas além das mensagens de e-mail reais, um servidor IMAP atribui números de ID exclusivos a mensagens, que são mais ou menos específicas desse servidor IMAP. Ao migrar, você moveu o e-mail existente, mas o servidor IMAP gera novos IDs e clientes de e-mail exclusivos para ver todas as mensagens antigas como novas. Sorte difícil :(
2.3.1.1. Unique Identifier (UID) Message Attribute
A 32-bit value assigned to each message, which when used with the
unique identifier validity value (see below) forms a 64-bit value
that MUST NOT refer to any other message in the mailbox or any
subsequent mailbox with the same name forever. Unique identifiers
are assigned in a strictly ascending fashion in the mailbox; as each
message is added to the mailbox it is assigned a higher UID than the
message(s) which were added previously. Unlike message sequence
numbers, unique identifiers are not necessarily contiguous.The unique identifier of a message MUST NOT change during the
session, and SHOULD NOT change between sessions. Any change of
unique identifiers between sessions MUST be detectable using the
UIDVALIDITY mechanism discussed below. Persistent unique identifiers....