mguessan / davmail

DavMail POP/IMAP/SMTP/Caldav/Carddav/LDAP Exchange and Office 365 Gateway - Synced with main subversion repository at
http://davmail.sourceforge.net
GNU General Public License v2.0
558 stars 82 forks source link

Davmail not authenticating request to exchange #333

Open halvabner opened 4 months ago

halvabner commented 4 months ago

I am provided with firstname.lastname@student.university-name.edu.country-tld 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 commented 4 months ago

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

esabol commented 4 months ago

@halvabner : In your Thunderbird configuration, have you tried specifying firstname.lastname@student.university-name.edu.country-tld 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.