Trying to migrate old IMAP account to new Office365 account using imapsync:
imapsync --authmech1 PLAIN --authmech2 PLAIN --authuser1 "migration@domain.tld" --host1 "oldmail.server" --host2 "outlook.office365.com" --user1 "account_to_be_migrated@ucm.sk" --user2 "migra
tion@domain.tld\ID@domain.tld" --password1 "REDACTED" --password2 "REDACTED" --office2
where:
- migration@domain.tld admin user in both domains (in Office365 Mailbox_Import permission is granted)
- ID@domain.tld login credentials for Office365
and imapsync's logs:
Host2: connecting and login on host2 [outlook.office365.com] port [993] with user [migration@domain.tld\ID@domain.tld]
Host2 IP address: 40.101.19.146
Host2 banner: * OK The Microsoft Exchange IMAP4 service is ready. [QQBNADQAUABSADAAMgAwADIAQwBBADAAMAAyADAALgBlAHUAcgBwAHIAZAAwADIALgBwAHIAbwBkAC4AbwB1AHQAbABvAG8AawAuAGMAbwBt
AA==]
Host2 capability before authentication: IMAP4 IMAP4rev1 AUTH=PLAIN AUTH=XOAUTH2 SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
Host2: outlook.office365.com says it has CAPABILITY for AUTHENTICATE PLAIN
Host2 failure: Error login on [outlook.office365.com] with user [migration@domain.tld\ID@domain.tld] auth [PLAIN]: 2 NO AUTHENTICATE failed.
Host2 info: trying LOGIN Auth mechanism on [outlook.office365.com] with user [migration@domain.tld\ID@domain.tld]
Host2: success login on [outlook.office365.com] with user [migration@domain.tld\ID@domain.tld] auth [PLAIN]
Host2: state Authenticated
... and later ...
Read: 5 BAD User is authenticated but not connected.