If running offlineimap it will show the following warning message (tested when using GMAIL)...
XOAUTH2 authentication failed: AUTHENTICATE command error: BAD ['Client aborted AUTHENTICATE command.
<randomstring>']. Data: DIEF2 AUTHENTICATE XOAUTH
... and then continue with the download/sync of emails.
You can get rid of the warning message, when adding auth_mechanisms = LOGIN .offlineimaprc in the <...>-remote section.
This is first working version of an added login query to the account
creation process. It fixes the first part of #6, but there still needs
to be more testing for the second part of that issue, which concerns
creating accounts with domains not listed in domain.csv.