Menu

#54 Exchange 2010 EWS Connection Not Working

closed
nobody
None
5
2010-08-17
2010-07-26
Ben Franske
No

Hello, I am trying to use DavMail 3.8.0b1-1273 with our (recently upgraded) Exchange 2007 server. The only place I saw that should be set differently for EWS support is using /owa/ instead of /exchange/ which I have done. I thought it was working for a minute but now my log is filling with errors like:

Date: Sun Jul 25 21:24:49 CDT 2010 (1280111089218)
Thread: ImapConnection-54300
Message #: 33
Level: ERROR
NDC:
Category: davmail
Message: Unable to get mail folder at /exchange/BFransk@inverhills.mnscu.edu/, Webdav not available on Exchange server
Location: davmail.ui.tray.DavGatewayTray.displayMessage(DavGatewayTray.java:113)
Thrown:
davmail.exception.DavMailAuthenticationException: Unable to get mail folder at /exchange/BFransk@inverhills.mnscu.edu/, Webdav not available on Exchange server
at davmail.exchange.dav.DavExchangeSession.getWellKnownFolders(DavExchangeSession.java:334)
at davmail.exchange.dav.DavExchangeSession.buildSessionInfo(DavExchangeSession.java:189)
at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:174)
at davmail.exchange.dav.DavExchangeSession.<init>(DavExchangeSession.java:181)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:117)
at davmail.imap.ImapConnection.run(ImapConnection.java:101)

and I am not able to connect. Any suggestions/new builds would be appreciated as I really miss having DavMail access to the server, I can't stand OWA! Thanks for the great software which worked like a charm with our old Exchange 2003 infrastructure.

I have attached a copy of my davmail.log file with passwords and encrypted strings removed.

-Ben

Discussion

  • Ben Franske

    Ben Franske - 2010-07-26

    DavMail log file with passwords removed

     
  • Ben Franske

    Ben Franske - 2010-07-26
    • summary: Echange 2007 EWS Connection Not Working --> Exchange 2007 EWS Connection Not Working
     
  • Mickael Guessant

    To enable experimental EWS support, set the hidden davmail.enableEws property to true in davmail.properties

     
  • Ben Franske

    Ben Franske - 2010-07-26

    I have set the property as you indicated and it seems to be attempting an EWS connection now but is still unsuccessful.

    I get a:

    Date: Mon Jul 26 10:16:08 CDT 2010 (1280157368101)
    Thread: ImapConnection-51759
    Message #: 28
    Level: DEBUG
    NDC:
    Category: davmail
    Message: executeFollowRedirects(/ews/services.wsdl)
    Location: davmail.ui.tray.DavGatewayTray.displayMessage(DavGatewayTray.java:96)
    Thrown:

    Followed by a warning:
    Date: Mon Jul 26 10:16:08 CDT 2010 (1280157368303)
    Thread: ImapConnection-51759
    Message #: 29
    Level: WARN
    NDC:
    Category: davmail.exchange.ExchangeSession
    Message: All network interfaces down or host unreachable !
    Location: davmail.exchange.ExchangeSessionFactory.handleNetworkDown(ExchangeSessionFactory.java:207)
    Thrown:

    Though I can clearly reach the host as it detects a script based logon and follows several redirects.

    Any assistance is appreciated!

    -Ben

     
  • Mickael Guessant

    Are you able to access Exchange Web Service endpoint at:
    /ews/services.wsdl
    ?

     
  • Ben Franske

    Ben Franske - 2010-07-27

    No, I receive a 404 error when I try to visit /owa/ews/services.wsdl I CAN hit /ews/services.wsdl without the /owa/ and I CAN also hit the older style EWS at /owa/ews/exchange.asmx

     
  • Mickael Guessant

    Please update to 3.8.0b2 or latest trunk if you have an Exchange 2010 server and add davmail.enableEws=true in davmail.properties

     
  • Ben Franske

    Ben Franske - 2010-07-30

    I am using 3.8.0b1-1291 with enable.Ews and am still having the problem:

    Date: Thu Jul 29 23:50:22 CDT 2010 (1280465422951)
    Thread: SmtpConnection-49359
    Message #: 34
    Level: ERROR
    NDC:
    Category: davmail
    Message: All network interfaces down or host unreachable !
    Location: davmail.ui.tray.DavGatewayTray.displayMessage(DavGatewayTray.java:111)
    Thrown:

    I am running Windows 7 Enterprise on my system if it makes any difference.

    Thanks!

     
  • Ben Franske

    Ben Franske - 2010-07-30
    • summary: Exchange 2007 EWS Connection Not Working --> Exchange 2010 EWS Connection Not Working
     
  • Ben Franske

    Ben Franske - 2010-08-01

    Sorry, in my last message I meant I was using 3.8.0b2-1291. Still the same problem.

     
  • Mickael Guessant

    Then you can either have a look at trunk 1323 that is working with a test Exchange 2010 server or send a log file to mguessan@free.fr or both.

     
  • Ben Franske

    Ben Franske - 2010-08-02

    I just downloaded and built trunk. Still having problems but the error has changed to "EWS end point not available". I think it is a problem with the URL that DavMail is trying to hit. See my previous message...

    I receive a 404 error when I try to visit /owa/ews/services.wsdl I CAN
    hit /ews/services.wsdl without the /owa/ and I CAN also hit the older style
    EWS at /owa/ews/exchange.asmx

    I have also attached to this bug a copy of my current (trunk) generated log file (cleaned of passwords).

    Thanks!

     
  • Ben Franske

    Ben Franske - 2010-08-02

    DavMail log file (running trunk 2010-07-02)

     
  • Mickael Guessant

    According to the new log file, this is an authentication issue.
    Form Based Authentication against OWA is successfull, but access to EWS endpoint at /ews/exchange.asmx is denied (403)

    Do you use your email address or username to logon ?

     
  • Ben Franske

    Ben Franske - 2010-08-05

    I normally use my username in domain\username format. I have tried all possibilites though (username alone without domain, email address, etc.) with the same result.

    My reading of the log file is that DavMail is attempting to connect to /ews/exchange.asmx which does not exist on my server (403) per my previous message. I have the same problem if I try to visit this URL in a web browser (403 error).

    I think I need to get DavMail to access either /owa/ews/exchange.asmx (for the older style interface) or /ews/services.wsdl (for the newer style interface). I can successfully access both of these URLs from a web browser.

    Is it possible for you to add another hidden property so I can specify the full path for the exchange.asmx or services.wsdl? I think this may fix the problem.

    Thanks!

     
  • Mickael Guessant

    I would say your Exchange admins just disabled EWS access to your server: AFAIK, there is no /owa/ews path on any Exchange server, /ews is the root since the first release of EWS on Exchange 2007

     
  • Anonymous

    Anonymous - 2010-08-16

    I would like to try out EWS, but can't get it to work either. It does connect to the server and seem to find login forms and other stuff, then it fails the username/password combo, no matter what I try.

    If I login to the webmail, I use only username+password with no domain, but otherwise the domain should be "office", though it used to be "NET", so I tried that as well. I'm attaching a log of my own, so you can see the redirects and so on that DavMail does.

    Should there by another url or something, I'm using the "/owa" one now?

    It's exchange 2010, company just upgraded and I'm missing my thunderbird! :)

    Thank you,

    / Kristoffer

     
  • Anonymous

    Anonymous - 2010-08-16

    Ummm can't seem to find a way to attach file, but it's all variations on the below, except that it doesn't suggest I add domain\ when I try with domains. :)

    2010-08-16 14:53:49,008 DEBUG [davmail.imap.ImapServer] davmail - Connection from /0:0:0:0:0:0:0:1 on port 1143
    2010-08-16 14:53:49,013 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Test configuration status: 301
    2010-08-16 14:53:49,013 DEBUG [ImapConnection-59036] davmail - > * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN] IMAP4rev1 DavMail server ready
    2010-08-16 14:53:49,015 DEBUG [ImapConnection-59036] davmail - < 1 authenticate login
    2010-08-16 14:53:49,017 DEBUG [ImapConnection-59036] davmail - > + VXNlcm5hbWU6
    2010-08-16 14:53:49,017 DEBUG [ImapConnection-59036] davmail - < S3Jpc3RvZmZlci5MdW5kZW4=
    2010-08-16 14:53:49,017 DEBUG [ImapConnection-59036] davmail - > + UGFzc3dvcmQ6
    2010-08-16 14:53:49,018 DEBUG [ImapConnection-59036] davmail - < ********
    2010-08-16 14:53:49,046 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa)
    2010-08-16 14:53:49,049 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: /owa/ redirectCount:1
    2010-08-16 14:53:49,056 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/&reason=0 redirectCount:2
    2010-08-16 14:53:49,061 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Form based authentication detected
    2010-08-16 14:53:49,062 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f
    2010-08-16 14:53:49,062 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f)
    2010-08-16 14:53:49,076 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth.owa)
    2010-08-16 14:53:49,084 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/auth.owa&reason=2 redirectCount:1
    2010-08-16 14:53:49,092 ERROR [ImapConnection-59036] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password, retry with domain\user
    2010-08-16 14:53:49,092 ERROR [ImapConnection-59036] davmail - Authentication failed: invalid user or password, retry with domain\user
    davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password, retry with domain\user
    at davmail.exchange.ExchangeSession.throwAuthenticationFailed(ExchangeSession.java:483)
    at davmail.exchange.ExchangeSession.checkFormLoginQueryString(ExchangeSession.java:475)
    at davmail.exchange.ExchangeSession.formLogin(ExchangeSession.java:428)
    at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:166)
    at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:73)
    at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:115)
    at davmail.imap.ImapConnection.run(ImapConnection.java:120)
    2010-08-16 14:53:49,093 DEBUG [ImapConnection-59036] davmail - > 1 NO LOGIN failed
    2010-08-16 14:53:49,098 DEBUG [ImapConnection-59036] davmail - < 2 login "Kristoffer.Lunden" "[masked]"
    2010-08-16 14:53:49,111 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa)
    2010-08-16 14:53:49,115 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: /owa/ redirectCount:1
    2010-08-16 14:53:49,125 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/&reason=0 redirectCount:2
    2010-08-16 14:53:49,129 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Form based authentication detected
    2010-08-16 14:53:49,130 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f
    2010-08-16 14:53:49,130 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f)
    2010-08-16 14:53:49,147 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth.owa)
    2010-08-16 14:53:49,156 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/auth.owa&reason=2 redirectCount:1
    2010-08-16 14:53:49,162 ERROR [ImapConnection-59036] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password, retry with domain\user
    2010-08-16 14:53:49,162 ERROR [ImapConnection-59036] davmail - Authentication failed: invalid user or password, retry with domain\user
    davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password, retry with domain\user
    at davmail.exchange.ExchangeSession.throwAuthenticationFailed(ExchangeSession.java:483)
    at davmail.exchange.ExchangeSession.checkFormLoginQueryString(ExchangeSession.java:475)
    at davmail.exchange.ExchangeSession.formLogin(ExchangeSession.java:428)
    at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:166)
    at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:73)
    at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:115)
    at davmail.imap.ImapConnection.run(ImapConnection.java:101)
    2010-08-16 14:53:49,166 DEBUG [ImapConnection-59036] davmail - > 2 NO LOGIN failed
    2010-08-16 14:53:49,169 DEBUG [ImapConnection-59036] davmail - < 3 authenticate login
    2010-08-16 14:53:49,170 DEBUG [ImapConnection-59036] davmail - > + VXNlcm5hbWU6
    2010-08-16 14:53:49,170 DEBUG [ImapConnection-59036] davmail - < S3Jpc3RvZmZlci5MdW5kZW4=
    2010-08-16 14:53:49,170 DEBUG [ImapConnection-59036] davmail - > + UGFzc3dvcmQ6
    2010-08-16 14:53:49,170 DEBUG [ImapConnection-59036] davmail - < ********
    2010-08-16 14:53:49,190 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa)
    2010-08-16 14:53:49,193 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: /owa/ redirectCount:1
    2010-08-16 14:53:49,200 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/&reason=0 redirectCount:2
    2010-08-16 14:53:49,207 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Form based authentication detected
    2010-08-16 14:53:49,208 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f
    2010-08-16 14:53:49,208 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f)
    2010-08-16 14:53:49,220 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth.owa)
    2010-08-16 14:53:49,228 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/auth.owa&reason=2 redirectCount:1
    2010-08-16 14:53:49,235 ERROR [ImapConnection-59036] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password, retry with domain\user
    2010-08-16 14:53:49,235 ERROR [ImapConnection-59036] davmail - Authentication failed: invalid user or password, retry with domain\user
    davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password, retry with domain\user
    at davmail.exchange.ExchangeSession.throwAuthenticationFailed(ExchangeSession.java:483)
    at davmail.exchange.ExchangeSession.checkFormLoginQueryString(ExchangeSession.java:475)
    at davmail.exchange.ExchangeSession.formLogin(ExchangeSession.java:428)
    at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:166)
    at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:73)
    at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:115)
    at davmail.imap.ImapConnection.run(ImapConnection.java:120)
    2010-08-16 14:53:49,235 DEBUG [ImapConnection-59036] davmail - > 3 NO LOGIN failed
    2010-08-16 14:53:49,239 DEBUG [ImapConnection-59036] davmail - < 4 login "Kristoffer.Lunden" "[masked]"
    2010-08-16 14:53:49,254 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa)
    2010-08-16 14:53:49,257 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: /owa/ redirectCount:1
    2010-08-16 14:53:49,270 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/&reason=0 redirectCount:2
    2010-08-16 14:53:49,281 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Form based authentication detected
    2010-08-16 14:53:49,281 DEBUG [ImapConnection-59036] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f
    2010-08-16 14:53:49,282 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fwebmail.netent.com%2fowa%2f)
    2010-08-16 14:53:49,291 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects(https://webmail.netent.com/owa/auth.owa)
    2010-08-16 14:53:49,296 DEBUG [ImapConnection-59036] davmail - executeFollowRedirects: https://webmail.netent.com/owa/auth/logon.aspx?url=https://webmail.netent.com/owa/auth.owa&reason=2 redirectCount:1
    2010-08-16 14:53:49,306 ERROR [ImapConnection-59036] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password, retry with domain\user
    2010-08-16 14:53:49,306 ERROR [ImapConnection-59036] davmail - Authentication failed: invalid user or password, retry with domain\user
    davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password, retry with domain\user
    at davmail.exchange.ExchangeSession.throwAuthenticationFailed(ExchangeSession.java:483)
    at davmail.exchange.ExchangeSession.checkFormLoginQueryString(ExchangeSession.java:475)
    at davmail.exchange.ExchangeSession.formLogin(ExchangeSession.java:428)
    at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:166)
    at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:73)
    at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:115)
    at davmail.imap.ImapConnection.run(ImapConnection.java:101)
    2010-08-16 14:53:49,306 DEBUG [ImapConnection-59036] davmail - > 4 NO LOGIN failed
    2010-08-16 14:54:00,159 INFO [SWT] davmail - DavMail gateway stopped

     
  • Mickael Guessant

    To Stoffe: reason=2 definitely means authentication failed.
    For Exchange 2010, pleas make sure you use latest trunk revision (3.8.0b2 does not work)

     
  • Mickael Guessant

    • status: open --> closed
     
  • Anonymous

    Anonymous - 2010-08-17

    Ok, thanks!

    Trunk works to authenticate, but only... seems to keep one message in each folder. No real error messages. But guess it's getting there? Calendar does not work but gives a million error popups that I can't read. :)

    Keep it up, hope to get this workig soon... :)

     

    Last edit: Anonymous 2017-01-18

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.