offlineimap
offlineimap copied to clipboard
Login strange log failure
General informations
- system/distribution (with version): Arch Linux
- offlineimap version (
offlineimap -V): offlineimap v7.3.2, imaplib2 v2.101 (bundled), Python v2.7.17, OpenSSL 1.1.1d 10 Sep 2019 - Python version: Python 3.8.1
- server name or domain: selfhosted ms exchange
- CLI options: /usr/bin/offlineimap -u basic
Configuration file offlineimaprc
[general]
accounts = ExampleExchangeShared
ui = quiet
fsync = false
[mbnames]
enabled = yes
filename = ~/.neomutt/mailboxes
header = "mailboxes "
peritem = "+%(accountname)s/%(foldername)s"
sep = " "
footer = "\n"
incremental = no
[Account ExampleExchangeShared]
localrepository = LocalExampleExchangeShared
remoterepository = RemoteExampleExchangeShared
[Repository LocalExampleExchangeShared]
type = Maildir
localfolders = ~/mail/ExampleExchangeShared
sep = /
[Repository RemoteExampleExchangeShared]
type = IMAP
remotehost = mail.example.com
remoteport = 993
remoteuser = example/myUsername/shared
remotepass = myPassword
ssl_version = tls1_2
tls_level = tls_secure
sslcacertfile = OS-DEFAULT
maxconnections = 1
singlethreadperfolder = yes
pythonfile (if any)
REMOVE PRIVATE DATA.
Logs, error
Feb 24 13:25:39 archBook.example.com offlineimap[840220]: *** Processing account ExampleExchangeShared
Feb 24 13:25:39 archBook.example.com offlineimap[840220]: Establishing connection to mail.example.com:993 (RemoteExampleExchangeShared)
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: PLAIN authentication failed: AUTHENTICATE failed.
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Calendar: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Contacts: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Deleted Items: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Drafts: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing INBOX: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Copy message UID 1 (1/1) RemoteExampleExchangeShared:INBOX -> LocalExampleExchangeShared:INBOX
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Journal: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Junk Email: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Notes: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Outbox: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Sent Items: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: Syncing Tasks: IMAP -> Maildir
Feb 24 13:25:40 archBook.example.com offlineimap[840220]: *** Finished account 'ExampleExchangeShared' in 0:00
using the debug switch:
Account sync ExampleExchangeShared:
[imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
*** Processing account ExampleExchangeShared
Establishing connection to mail.example.com:993 (RemoteExampleExchangeShared)
[imap]: RemoteExampleExchangeShared: level 'tls_secure', version 'tls1_2'
[imap]: Attempting GSSAPI authentication
[imap]: Attempting PLAIN authentication
[imap]: __plainhandler: returning ^@example/myUsername/shared^@(passwd hidden for log)
PLAIN authentication failed: AUTHENTICATE failed.
[imap]: Attempting LOGIN authentication
[imap]: Attempting IMAP LOGIN authentication
[]: Copying folder structure from RemoteExampleExchangeShared to LocalExampleExchangeShared
Syncing Calendar: IMAP -> Maildir
Loading message list for Maildir[Calendar]
Message list for Maildir[Calendar] loaded: 0 messages
Steps to reproduce the error
- Try to connect to exchange shared mailbox via imap username like
example\myUsername\SharedMboxUsernameor[email protected]\sharedMbox
The wird part sometimes it syncs messages even though the authentication fails. (As seen in the log attached above)
I also tried via openssl s_client --connect mail.example.com:110 --starttls pop3 --crlf and openssl s_client --connect mail.example.com:143 --starttls imap --crlf the credentials work there, so it must be a problem with the client.
EDIT: I found the error, using the debug switch, it turned out, that offlineimap cycles through different authentication protocols, upon once succeeds. But it was not obvious that an authentication failure is logged even though authentication succeeds.