davmail icon indicating copy to clipboard operation
davmail copied to clipboard

Davmail not authenticating request to exchange

Open halvabner opened this issue 1 year ago • 2 comments

I am provided with [email protected] as my address. I can access the mailbox associated with that address as provided by my university at https://mail.university-name.edu.country-tld. It prompts me to log in with the credentials of the form:

firstname.lastname
password

like so: mailbox1 then I am greeted with mailbox this is what I see when I log out mailbox2

I have been told that I can connect to it with Davmail. I launch Davmail with the following configuration:

davmail.ssl.keystoreType=
davmail.ssl.keystorePass=
davmail.proxyPassword=
davmail.smtpPort=1025
davmail.enableKerberos=false
davmail.folderSizeLimit=
davmail.forceActiveSyncUpdate=false
davmail.imapAutoExpunge=true
davmail.useSystemProxies=false
davmail.proxyUser=
davmail.ssl.nosecuresmtp=false
davmail.caldavPastDelay=0
davmail.ssl.keyPass=
log4j.logger.httpclient.wire=WARN
davmail.noProxyFor=
davmail.server=false
davmail.popMarkReadOnRetr=false
davmail.ssl.nosecureimap=false
davmail.disableTrayActivitySwitch=false
davmail.caldavAutoSchedule=true
davmail.enableProxy=false
davmail.proxyPort=
davmail.mode=EWS
davmail.smtpSaveInSent=true
davmail.bindAddress=
davmail.ssl.nosecurepop=false
davmail.ssl.pkcs11Library=
log4j.rootLogger=WARN
davmail.ssl.keystoreFile=
log4j.logger.davmail=DEBUG
davmail.ssl.clientKeystoreType=
davmail.clientSoTimeout=
davmail.ssl.pkcs11Config=
davmail.imapPort=1143
davmail.ssl.clientKeystorePass=
davmail.url=https://mail.university-name.edu.country-tld/EWS/Exchange.asmx
davmail.sentKeepDelay=0
davmail.ssl.nosecureldap=false
davmail.imapAlwaysApproxMsgSize=false
davmail.ssl.nosecurecaldav=false
davmail.popPort=1110
davmail.showStartupBanner=true
log4j.logger.httpclient=WARN
davmail.proxyHost=
davmail.ldapPort=1389
davmail.server.certificate.hash=
davmail.disableGuiNotifications=false
davmail.imapIdleDelay=
davmail.allowRemote=false
davmail.disableUpdateCheck=false
davmail.caldavPort=1080
davmail.enableKeepAlive=false
davmail.ssl.clientKeystoreFile=
davmail.logFilePath=
davmail.carddavReadPhoto=true
davmail.keepDelay=30
davmail.caldavAlarmSound=
davmail.oauth.tenantId=
davmail.logFileSize=
log4j.logger.org.apache.http.conn.ssl=WARN
log4j.logger.org.apache.http=WARN
davmail.defaultDomain=
davmail.caldavEditNotifications=false
davmail.oauth.redirectUri=
log4j.logger.org.apache.http.wire=WARN
davmail.oauth.clientId=

I then start Thunderbird and configure it as follows: image image I get the following messages in the logs: image image Furthermore, after decrypting traffic between Davmail and the exchange, I find this: image I can do GET /EWS/Exchange.asmx from my browser but it prompts me with a basic HTTP auth, which after I feed my credentials, redirects me to this thing that looks like an XML image Davmail instead receives 401 Unauthorized because it doesn't authenticate with the credentials I typed in Thunderbird. How can I make Davmail use my username and password in the HTTP requests to the exchange? Is there something wrong with the way I'm using it? Thank you in advance

halvabner avatar Feb 14 '24 11:02 halvabner

Why is there no feedback at all, did I say something wrong :sob:

halvabner avatar Feb 22 '24 21:02 halvabner

@halvabner : In your Thunderbird configuration, have you tried specifying [email protected] for the username instead of firstname.lastname? I know firstname.lastname doesn't work with my DavMail/O365 setup and IMAP client.

Also, I'm not sure about davmail.mode=EWS, but I don't think the currently released version of DavMail supports a davmail.url property setting that looks like *.country-tld for davmail.mode=O365Manual or O365Interactive. The next version should though as changes for this have already been committed to the code repository.

esabol avatar Feb 22 '24 23:02 esabol