Login for Exchange server fails with new version (5.3.0 -- just downloaded) of davmail. Works fine with old version (5.2.0).
Log:
2019-08-07 09:15:24,975 DEBUG [ImapConnection-55266] davmail - > * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN MOVE SPECIAL-USE] IMAP4rev1 DavMail 5.3.0-3065 server ready
2019-08-07 09:15:24,975 DEBUG [ImapConnection-55266] davmail - < LOGIN **
2019-08-07 09:15:24,978 DEBUG [ImapConnection-55266] davmail.exchange.ExchangeSession - Direct EWS authentication
2019-08-07 09:15:25,109 INFO [ImapConnection-55266] davmail.connection - FAILED - 0:0:0:0:0:0:0:1:55266 gwilli349
2019-08-07 09:15:25,110 ERROR [ImapConnection-55266] davmail - Authentication failed: invalid user or password
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
at davmail.exchange.ews.EwsExchangeSession.checkEndPointUrl(EwsExchangeSession.java:221)
at davmail.exchange.ews.EwsExchangeSession.buildSessionInfo(EwsExchangeSession.java:230)
at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:175)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:191)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:93)
at davmail.imap.ImapConnection.run(ImapConnection.java:112)
2019-08-07 09:15:25,113 DEBUG [ImapConnection-55266] davmail - > A000001 NO LOGIN failed
2019-08-07 09:15:56,856 DEBUG [ImapConnection-55266] davmail - < A000002 LOGOUT
2019-08-07 09:15:56,857 DEBUG [ImapConnection-55266] davmail - > * BYE Closing connection
2019-08-07 09:15:56,857 DEBUG [ImapConnection-55266] davmail - > A000002 OK LOGOUT completed
2019-08-07 09:15:56,857 INFO [ImapConnection-55266] davmail.connection - DISCONNECT - 0:0:0:0:0:0:0:1:55266
2019-08-07 09:15:56,935 DEBUG [davmail.imap.ImapServer] davmail - Connection from /0:0:0:0:0:0:0:1 on port 1143
2019-08-07 09:15:56,935 INFO [davmail.imap.ImapServer] davmail.connection - CONNECT - 0:0:0:0:0:0:0:1:55524
2019-08-07 09:15:57,018 DEBUG [ImapConnection-55524] davmail.exchange.ExchangeSession - Test configuration status: 401</init>
I just updated to 5.3.0-3065 and am also unable to log into webmail, reverting back to 5.2.0-2961 and I am again able to log in.
Same behavior here. Downgrade to version 5.1.0 (5.2.0 has another problem: Thunderbird requires password at every startup). I'm using imap, smtp, caldav & carddav, EWS protocol.
MS Windows 7 x64 - JRE 1.8.0_221 x64 - Thunderbird 60.8.0
I was seeing the same thing, went into Settings and set Exchange Protocol: Auto, and it's working now (for me at least).
Thunderbird also now no longer prompts for login on every startup :)
@Ryan: Heh. I don't know what settings you refer to, but the problem comes and goes with only the davmail new release (no settings there).
(If it's important for some reason, I use Kmail as a client [KDE on Fedora 30] connecting to davmail. I haven't modified its settings at all and the bug is only with the new davmail release.)
I have the same issue. Exchange Protocol: Auto has no effect - it still will not login. Reverting to something previous fixes the issue.
Thank you all for your feedback, in order to fix this I would need to know:
mode (Auto/EWS/...)
/OWA or direct EWS (/EWS/Exchange.asmx) path
username: userid ? domain\userid ? email ?
The best would be two WIRE DEBUG log files, one with 5.2.0 and another with 5.3.0 at my private email address mguessan@free.fr
For the record, I upgraded from 5.2.0 to the current tip of master (9f4f822) yesterday. This is one commit ahead of the one tagged as 5.3.0 (1feacf0) and I didn't encounter any issues with authentication. My settings are:
mode: EWS
direct EWS: https://outlook.office365.com/EWS/Exchange.asmx
username: email
Mode: EWS
OWA URL /owa/
Username: userid
password 10 characters Upper/lower case, numbers and symbols
Looking for differences in my setup. With v5.3.0 it tries to POST to /owa/auth/owaauth.dll even if I have davmail.enableEws=ews in my config file. This POST returns a 404 error:
But with v5.2.0 the POST go to /ews/exchange.asmx and works well:
davmail.enableEws is deprecated, please use:
davmail.mode=EWS
instead, and set url with /ews/exchange.asmx path
Last edit: Mickael Guessant 2019-08-08
mode: EWS
URL: OWA
username: e-mail
Ok, found one issue with NTLM authentication
=> fixed in trunk https://github.com/mguessan/davmail#trunk-builds
I just downloaded the trunk build and it seems to fix the issue for me. Authentication works now. I didn't change any settings.
Thanks for the quick fix!
I just download the "Platform independent package davmail-5.3.0-trunk.zip" and issue still present.
It always do POST /owa/auth/owaauth.dll with result of 404 error. And davmail.mode=EWS seems don't work.
UPDATE: If I force adding to URL
/ews/exchange.asmxseems work well, but in 5.2.0 I don't need to add this endpoint to URL.Last edit: Óscar García 2019-08-08
If it tries /owa/auth/owaauth.dll it means DavMail did not find authentication form at /owa (or any other base path you set). Hard to tell why without a log file.
The davmail-5.3.0-trunk.zip file is dated 6 August 2019 so I guess it hasn't been rebuilt to contain the fix yet.
Trunks builds are automatically available thanks to appveyor
=> https://github.com/mguessan/davmail#trunk-builds
contains latest build from last night.
Trunk build is failing with Caldav connection. Login to server with username xxxxx failed
Failing Log in Log1.txt Log for working version in Log2.txt
Last edit: WizGnome 2019-08-09
Basically form authentication succeeds but EWS authentication fails
=> quick work around is to use direct EWS access (we used to depend on some information from OWA interface but this is no longer the case)
=> if you need to stick to form authentication, I need more info to reproduce your issue: a WIRE debug log of failed authentication
Please don't post it publicly, just send it to my private address mguessan@free.fr
Main issue fixed, please create a new ticket with detailed information if you have a similar issue.