Menu

#282 Can't Authenticate

closed
nobody
5
2014-12-31
2011-03-02
Elias Kesh
No

Trying to use DavMail to get my exchange mail. I have build the SVN version as of today 03/02/2011 and my exchange server is Outlook Web Access version: 8.2.176.2 .

I have not been able to get the GUI working as I am using Kubuntu 11.04 and there seems to be problems with GTK on this version so I can set it to server and modified the davmail.properties file which is included. I have been trying to get this working for a day now with no luck. I would appreciate any help.

Line 21:
2011-03-02 11:06:28,553 ERROR [ImapConnection-58965] davmail.exchange.ExchangeSession - 404 Resource Not Found at /exchange/MyFirst.MyLast@MyCompany.com/

When I use my browser
https://mymail.MyCompany.com/exchange/MyFirst.MyLast@MyCompany.com/
I get page not found, however if I change exchange to owa the browser finds it.
https://mymail.MyCompany.com/owa/MyFirst.MyLast@MyCompany.com/

Here is the log:
2011-03-02 11:05:07,749 INFO [main] davmail - DavMail Gateway 3.9.0-1635-trunk listening on SMTP port 1025 POP port 1110 IMAP port 1143 CALDAV port 1080 LDAP port 1389
2011-03-02 11:05:08,856 DEBUG [CheckRelease] davmail.DavGateway - DavMail released version: 3.9.0-1630

2011-03-02 11:06:25,614 DEBUG [davmail.imap.ImapServer] davmail - Connection from /0:0:0:0:0:0:0:1 on port 1143
2011-03-02 11:06:27,199 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Test configuration status: 302
2011-03-02 11:06:27,202 DEBUG [ImapConnection-58965] davmail - > * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN] IMAP4rev1 DavMail 3.9.0-1635-trunk server ready
2011-03-02 11:06:27,205 DEBUG [ImapConnection-58965] davmail - < 1 authenticate login
2011-03-02 11:06:27,207 DEBUG [ImapConnection-58965] davmail - > + VXNlcm5hbWU6
2011-03-02 11:06:27,207 DEBUG [ImapConnection-58965] davmail - < ZWtlc2hpc2g=
2011-03-02 11:06:27,207 DEBUG [ImapConnection-58965] davmail - > + UGFzc3dvcmQ6
2011-03-02 11:06:27,208 DEBUG [ImapConnection-58965] davmail - < ********
2011-03-02 11:06:27,387 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/)
2011-03-02 11:06:27,427 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/auth/logon.aspx?url=https://mymail.MyCompany.com/owa/&reason=0 redirectCount:1
2011-03-02 11:06:27,459 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Form based authentication detected
2011-03-02 11:06:27,503 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f
2011-03-02 11:06:27,503 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f)
2011-03-02 11:06:27,571 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/owaauth.dll)
2011-03-02 11:06:27,615 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/ redirectCount:1
2011-03-02 11:06:27,719 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Current user email is MyFirst.MyLast@MyCompany.com, alias is ekeshish, mailPath is /exchange/MyFirst.MyLast@MyCompany.com/ on Exchange2007
2011-03-02 11:06:28,553 ERROR [ImapConnection-58965] davmail.exchange.ExchangeSession - 404 Resource Not Found at /exchange/MyFirst.MyLast@MyCompany.com/
2011-03-02 11:06:28,553 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Unable to get mail folder at /exchange/MyFirst.MyLast@MyCompany.com/, Webdav not available on Exchange server, retry with EWS
2011-03-02 11:06:28,634 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/)
2011-03-02 11:06:28,665 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/auth/logon.aspx?url=https://mymail.MyCompany.com/owa/&reason=0 redirectCount:1
2011-03-02 11:06:28,696 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Form based authentication detected
2011-03-02 11:06:28,699 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f
2011-03-02 11:06:28,699 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f)
2011-03-02 11:06:28,751 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/owaauth.dll)
2011-03-02 11:06:28,798 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/ redirectCount:1
2011-03-02 11:06:28,935 WARN [ImapConnection-58965] org.apache.commons.httpclient.HttpMethodDirector - Unable to respond to any of these challenges: {ntlm=NTLM, negotiate=Negotiate}
2011-03-02 11:06:28,936 DEBUG [ImapConnection-58965] davmail.http.DavGatewayHttpClientFacade - Received 401 unauthorized at /ews/exchange.asmx, retrying with NTLM
2011-03-02 11:06:29,296 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password
2011-03-02 11:06:29,419 ERROR [ImapConnection-58965] davmail.exchange.ExchangeSession - autodiscover.MyCompany.com
2011-03-02 11:06:29,419 ERROR [ImapConnection-58965] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password
2011-03-02 11:06:29,421 ERROR [ImapConnection-58965] davmail - Authentication failed: invalid user or password
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
at davmail.exchange.ews.EwsExchangeSession.checkEndPointUrl(EwsExchangeSession.java:148)
at davmail.exchange.ews.EwsExchangeSession.buildSessionInfo(EwsExchangeSession.java:188)
at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:200)
at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:118)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:122)
at davmail.imap.ImapConnection.run(ImapConnection.java:131)
2011-03-02 11:06:29,438 DEBUG [ImapConnection-58965] davmail - > 1 NO LOGIN failed
2011-03-02 11:06:29,439 DEBUG [ImapConnection-58965] davmail - < LOGIN ********
2011-03-02 11:06:29,507 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/)
2011-03-02 11:06:29,542 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/auth/logon.aspx?url=https://mymail.MyCompany.com/owa/&reason=0 redirectCount:1
2011-03-02 11:06:29,575 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Form based authentication detected
2011-03-02 11:06:29,593 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f
2011-03-02 11:06:29,593 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f)
2011-03-02 11:06:29,675 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/owaauth.dll)
2011-03-02 11:06:29,707 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/ redirectCount:1
2011-03-02 11:06:29,806 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Current user email is MyFirst.MyLast@MyCompany.com, alias is ekeshish, mailPath is /exchange/MyFirst.MyLast@MyCompany.com/ on Exchange2007
2011-03-02 11:06:31,915 ERROR [ImapConnection-58965] davmail.exchange.ExchangeSession - 404 Resource Not Found at /exchange/MyFirst.MyLast@MyCompany.com/
2011-03-02 11:06:31,915 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Unable to get mail folder at /exchange/MyFirst.MyLast@MyCompany.com/, Webdav not available on Exchange server, retry with EWS
2011-03-02 11:06:31,979 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/)
2011-03-02 11:06:32,009 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/auth/logon.aspx?url=https://mymail.MyCompany.com/owa/&reason=0 redirectCount:1
2011-03-02 11:06:32,039 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Form based authentication detected
2011-03-02 11:06:32,041 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Detected script based logon, redirect to form at https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f
2011-03-02 11:06:32,042 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fmymail.MyCompany.com%2fowa%2f)
2011-03-02 11:06:32,097 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects(https://mymail.MyCompany.com/owa/auth/owaauth.dll)
2011-03-02 11:06:32,136 DEBUG [ImapConnection-58965] davmail - executeFollowRedirects: https://mymail.MyCompany.com/owa/ redirectCount:1
2011-03-02 11:06:32,424 DEBUG [ImapConnection-58965] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password
2011-03-02 11:06:32,533 ERROR [ImapConnection-58965] davmail.exchange.ExchangeSession - autodiscover.MyCompany.com
2011-03-02 11:06:32,533 ERROR [ImapConnection-58965] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password
2011-03-02 11:06:32,533 ERROR [ImapConnection-58965] davmail - Authentication failed: invalid user or password
davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
at davmail.exchange.ews.EwsExchangeSession.checkEndPointUrl(EwsExchangeSession.java:148)
at davmail.exchange.ews.EwsExchangeSession.buildSessionInfo(EwsExchangeSession.java:188)
at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:200)
at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:118)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:122)
at davmail.imap.ImapConnection.run(ImapConnection.java:110)
2011-03-02 11:06:32,533 DEBUG [ImapConnection-58965] davmail - > 3 NO LOGIN failed

.davmail.properties file:
#DavMail settings
#Sun Feb 13 10:18:59 PST 2011
davmail.allowRemote=true
davmail.bindAddress=
davmail.caldavAlarmSound=
davmail.caldavPastDelay=90
davmail.caldavPort=1080
davmail.enableProxy=false
davmail.forceActiveSyncUpdate=false
davmail.imapAutoExpunge=true
davmail.imapIdleDelay=
davmail.imapPort=1143
davmail.keepDelay=30
davmail.ldapPort=1389
davmail.logFilePath=
davmail.popPort=1110
davmail.proxyHost=
davmail.proxyPassword=
davmail.proxyPort=
davmail.proxyUser=
davmail.sentKeepDelay=90
# ejk
davmail.server=true
davmail.server.certificate.hash=
davmail.showStartupBanner=true
davmail.smtpPort=1025
davmail.ssl.clientKeystoreFile=
davmail.ssl.clientKeystorePass=
davmail.ssl.clientKeystoreType=
davmail.ssl.keyPass=
davmail.ssl.keystoreFile=
davmail.ssl.keystorePass=
davmail.ssl.keystoreType=
davmail.ssl.nosecurecaldav=false
davmail.ssl.nosecureimap=false
davmail.ssl.nosecureldap=false
davmail.ssl.nosecurepop=false
davmail.ssl.nosecuresmtp=false
davmail.ssl.pkcs11Config=
davmail.ssl.pkcs11Library=
davmail.url=https\://mymail.MyCompany.com/owa/
davmail.useSystemProxies=true
log4j.logger.davmail=DEBUG
log4j.logger.httpclient.wire=WARN
log4j.logger.org.apache.commons.httpclient=WARN
log4j.rootLogger=WARN

Discussion

  • Mickael Guessant

    => Your Exchange server does not have Webdav enabled
    => What happens when you access /ews/exchange.asmx

     
  • Elias Kesh

    Elias Kesh - 2011-03-03

    It prompts me for a username/password then displays a blank page. New page is .../ews/Services.wsdl

     
  • Mickael Guessant

    Good news: this means EWS is available. Please enable EWS mode in DavMail and try again.

     
  • Elias Kesh

    Elias Kesh - 2011-03-08

    I changed .davmail.properties to:
    davmail.enableEws=true
    davmail.url=https\://mymail.mycompany.com/ews/
    ------------------------------------------------------------------------
    2011-03-07 20:11:50,184 INFO [main] davmail - DavMail Gateway 3.9.0-1635-trunk listening on SMTP port 1025 POP port 1110 IMAP port 1143 CALDAV port 1080 LDAP port 1389
    2011-03-07 20:11:50,812 DEBUG [CheckRelease] davmail.DavGateway - DavMail released version: 3.9.0-1630
    2011-03-07 20:12:07,270 DEBUG [davmail.imap.ImapServer] davmail - Connection from /0:0:0:0:0:0:0:1 on port 1143
    2011-03-07 20:12:09,468 WARN [ImapConnection-40087] org.apache.commons.httpclient.HttpMethodDirector - Unable to respond to any of these challenges: {ntlm=NTLM, negotiate=Negotiate}
    2011-03-07 20:12:09,485 DEBUG [ImapConnection-40087] davmail.exchange.ExchangeSession - Test configuration status: 401
    2011-03-07 20:12:09,486 DEBUG [ImapConnection-40087] davmail - > * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN] IMAP4rev1 DavMail 3.9.0-1635-trunk server ready
    2011-03-07 20:12:09,489 DEBUG [ImapConnection-40087] davmail - < 1 authenticate login
    2011-03-07 20:12:09,491 DEBUG [ImapConnection-40087] davmail - > + VXNlcm5hbWU6
    2011-03-07 20:12:09,491 DEBUG [ImapConnection-40087] davmail - < ZWtlc2hpc2g=
    2011-03-07 20:12:09,491 DEBUG [ImapConnection-40087] davmail - > + UGFzc3dvcmQ6
    2011-03-07 20:12:09,492 DEBUG [ImapConnection-40087] davmail - < ********
    2011-03-07 20:12:09,855 DEBUG [ImapConnection-40087] davmail - executeFollowRedirects(https://mymail.mycompany.com/ews/)
    2011-03-07 20:12:10,254 WARN [ImapConnection-40087] org.apache.commons.httpclient.HttpMethodDirector - Unable to respond to any of these challenges: {ntlm=NTLM, negotiate=Negotiate}
    2011-03-07 20:12:10,261 DEBUG [ImapConnection-40087] davmail.http.DavGatewayHttpClientFacade - Received 401 unauthorized at https://mymail.mycompany.com/ews/, retrying with NTLM
    2011-03-07 20:12:11,266 ERROR [ImapConnection-40087] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password
    2011-03-07 20:12:11,269 ERROR [ImapConnection-40087] davmail - Authentication failed: invalid user or password
    davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
    at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:181)
    at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:118)
    at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:116)
    at davmail.imap.ImapConnection.run(ImapConnection.java:131)
    2011-03-07 20:12:11,302 DEBUG [ImapConnection-40087] davmail - > 1 NO LOGIN failed
    2011-03-07 20:12:11,303 DEBUG [ImapConnection-40087] davmail - < LOGIN ********
    2011-03-07 20:12:11,743 DEBUG [ImapConnection-40087] davmail - executeFollowRedirects(https://mymail.mycompany.com/ews/)
    2011-03-07 20:12:13,017 ERROR [ImapConnection-40087] davmail.exchange.ExchangeSession - Authentication failed: invalid user or password
    2011-03-07 20:12:13,018 ERROR [ImapConnection-40087] davmail - Authentication failed: invalid user or password
    davmail.exception.DavMailAuthenticationException: Authentication failed: invalid user or password
    at davmail.exchange.ExchangeSession.<init>(ExchangeSession.java:181)
    at davmail.exchange.ews.EwsExchangeSession.<init>(EwsExchangeSession.java:118)
    at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:116)
    at davmail.imap.ImapConnection.run(ImapConnection.java:110)
    2011-03-07 20:12:13,020 DEBUG [ImapConnection-40087] davmail - > 3 NO LOGIN failed

     
  • Mickael Guessant

    => invalid credentials, you should probably provide windows domain name:
    domain\username

     
  • Cbris Sanner

    Cbris Sanner - 2011-03-08

    I'm in a similar pickle.
    almost identical in fact.
    our desktop support people tell me that we're using NTLM (And, in fact, the log messages suggest that) but only after I've made it through the insecure/plaintext hurdle

     
  • Elias Kesh

    Elias Kesh - 2011-03-15

    Well,
    I checked with my IT group and they tell me I have permissions to access ews. I've configured my android phone with Touchdown and roadsync and both applications work. Davmail, I have spent hours trying various combination is username domain, ews, owa and still can not get it to authenticate. Is it possible that I need a different set of permissions on the server ? Does anything else come to mind... I am about to give up.

    Thanks,

     
  • Mickael Guessant

    Your Android phone uses ActiveSync, not EWS, to access Exchange.

    You can check EWS access at: https://www.testexchangeconnectivity.com/

    Or through a web browser at /ews/exchange.asmx (you should get a redirect to the wsdl file).

     
  • Elias Kesh

    Elias Kesh - 2011-03-15

    It prompts me to login then redirects to ews/Services.wsdl and displays a long page of xml code.
    wsdl:definitions targetNamespace ......

     
  • Mickael Guessant

    This is good, you should be able to use DavMail with your Exchange server, please try to use https://mail.company.com/ews/exchange/asmx in DavMail OWA url field.

     
  • Elias Kesh

    Elias Kesh - 2011-04-06

    No luck.
    https://mail.company.com/ews/exchange/asmx fails in davmail and when I go to my browser with that URL I get prompted for a user/pass and then Page Not Found.

    Elias

     
  • Mickael Guessant

    You should probably retry with latest 3.9.1 version.

    It looks like your Exchange server does not have Webdav available, so please switch EWS on.

     
  • Mickael Guessant

    • status: open --> pending
     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     
  • SourceForge Robot

    • status: pending --> closed
     

Log in to post a comment.