Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

401 Unauthorized, NTLM, davmail 5.5.0.3293 #100

Closed
smanolache opened this issue Apr 17, 2020 · 3 comments
Closed

401 Unauthorized, NTLM, davmail 5.5.0.3293 #100

smanolache opened this issue Apr 17, 2020 · 3 comments

Comments

@smanolache
Copy link

Hello,

After upgrading to davmail 5.5.0-3293 I couldn't connect to Outlook for fetching my mails any more. However, I could fetch the calendar.

I've activated the debug level in logs and checked the exchange of messages. For both mails and calendar there's a handshake sequence as follows:

  1. davmail sends an Authorization: NTLM ... header with a rather short token.
  2. the server answers with 401 Unauthorized and a WWW-Authenticate: NTLM ... response header with a "longish" token
  3. davmail sends another Authorization: NTLM ... header with a long token.

When fetching emails the 3rd step fails with 401 Unauthorized. When fetching the calendar the 3rd step succeeds.

So I've inspected the three tokens in each handshake.

Here's the end of the token of step 3 for fetching the calendar (the token that works):

00000180  a0 14 d6 01 00 00 00 00  00 00 00 00 41 00 44 00  |............A.D.|
00000190  61 00 62 00 63 00 64 00  65 00 66 00 67 00 68 00  |a.b.c.d.e.f.g.h.|
000001a0  6c 00 65 00 6f 00 2d 00  6e 00 61 00 70 00 68 00  |l.e.o.-.n.a.p.h.|
000001b0  74 00 61 00                                       |t.a.|

leo-naphta is my local machine (where davmail runs). AD\abcdefgh is my user on the Exchange server.

Here's the end of the token of step 3 for fetching the mails (the token that fails):

00000180  a1 14 d6 01 00 00 00 00  00 00 00 00 41 00 44 00  |............A.D.|
00000190  6c 00 65 00 6f 00 2d 00  6e 00 61 00 70 00 68 00  |l.e.o.-.n.a.p.h.|
000001a0  74 00 61 00                                       |t.a.|

As you see, the domain and the local machine are present but not the remote username.

I have not changed the configuration of davmail, nor that of thunderbird. After I've rolled back davmail from 5.5.0.3293 to 5.4.0.3135 it worked again.

I've attached my configuration below:
davmail.txt

@mguessan
Copy link
Owner

Confirmed, this is a regression related to:
#91

@mguessan
Copy link
Owner

Fix available in trunk, can you please confirm (as soon as appveyor completes trunk build...)

@LiNk-NY
Copy link

LiNk-NY commented Apr 17, 2020

This works for me. Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants