Hi all,
I’m trying to sync my old emails (hosted in Office365) to Mailcow. The docs are very simple and don’t provide much help.
The error I’m having is:
Host2: connecting and login on host2 [localhost] port [993] with user [lucas@example.com*XXXXXXX@mailcow.local]
Host2 IP address: ::1
Host2 banner: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
Host2 capability before authentication: IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN AUTH
Host2: localhost says it has CAPABILITY for AUTHENTICATE LOGIN
Host2: success login on [localhost] with user [lucas@example.com*XXXXXXX@mailcow.local] auth [LOGIN] or [LOGIN]
++++ Listing 1 errors encountered during the sync ( avoid this listing with --noerrorsdump ).
Err 1/1: Host1 failure: Error login on [outlook.office365.com] with user [lucas@example.com] auth [LOGIN]: 2 NO LOGIN failed.
The most frequent error is ERR_AUTHENTICATION_FAILURE_USER1. Check the credentials for lucas@example.com.
Exiting with return value 161 (EXIT_AUTHENTICATION_FAILURE_USER1) 1/50 nb_errors/max_errors PID 81291
Disconnecting from host2 localhost user2 lucas@example.com*XXXXXXX@mailcow.local
No log file because of option --nolog
The sync job is configured like this:

- I followed this article that explains how to use App passwords on M365
- Saw this other issue in the forum about "Modern Authentication” within office365; which I’ve already addressed
Any help would be much appreciated. Thanks!