Closed xianwenchen closed 10 months ago
@xianwenchen wrote:
The davmail version is 6.0.1-trunk.
Well, 6.2.0 is the latest release. Try upgrading to that.
But I imagine you need to talk to your email administrator. They've probably changed something with how your email service is configured.
Just check the O365Interactive authenticator is still working, Microsoft didn't break it (yet).
Can you please provide more details from the errors in davmail.log (or forward the whole file to mguessan@free.fr)?
An alternative it to switch to O365Manual and use your native browser to authenticate
Thanks. The log was simple, using the interactive mode:
2023-12-22 13:05:31,360 WARN [AWT-EventQueue-0] davmail.exchange.auth.O365InteractiveAuthenticatorFrame - Unable to register protocol handler
2023-12-22 13:06:13,544 ERROR [JavaFX Application Thread] davmail.exchange.auth.O365InteractiveAuthenticatorFrame - java.lang.Throwable: Malformed URL Malformed URL
2023-12-22 13:06:14,357 ERROR [ImapConnection-58902] davmail.exchange.auth.O365InteractiveAuthenticator - Authentication failed Malformed URL
2023-12-22 13:06:14,357 ERROR [ImapConnection-58902] davmail - Authentication failed Malformed URL
davmail.exception.DavMailException: Authentication failed Malformed URL
at davmail.exchange.auth.O365InteractiveAuthenticator.authenticate(O365InteractiveAuthenticator.java:181)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:182)
at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:97)
at davmail.imap.ImapConnection.run(ImapConnection.java:128)
The key is there: Unable to register protocol handler
That's the interceptor for the urn: url
=> you have a recent java version, you need to allow access to internal java API with:
--add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
The winrun4j wrappers already include this, if you launch DavMail manually you need to include the option above in the command line
Thank you. I run it on Debian.
The content of /usr/bin/davmail is
#!/bin/sh
export SWT_GTK3=0
exec /usr/bin/java \
-jar /usr/share/davmail/davmail.jar "$@"
I tried running
davmail --add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED ~/data/archive/davmail/config/davmail.com.office.outlook.spoofed_client_id.properties
However, I still got the same error.
What version of Java are you using? And do you have OpenJDK or Oracle JDK? Maybe there's a difference....
I'm using OpenJDK:
openjdk 17.0.9 2023-10-17
OpenJDK Runtime Environment (build 17.0.9+9-Debian-1deb12u1)
OpenJDK 64-Bit Server VM (build 17.0.9+9-Debian-1deb12u1, mixed mode, sharing)
And java -version
?
This is probably silly, but I would try putting the --add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
arguments before the -jar /usr/share/davmail/davmail.jar
arguments in your java
command.
Thank you!
Your were right that I shall put --add-exports java.base/sun.net.www.protocol.https=ALL-UNNAMED
arguments before -jar /usr/share/davmail/davmail.jar
!
So that worked? Wonderful!
Hi!
I haven't been able to use davmail since about one week ago.
I am still prompt with a authenticator number. I confirm it on the authenticator. Then I'm asked "Are you trying to sign in to Microsoft Office". I clicked continue, then davmail notifies me the error "Authentication failed Malformed URL".
The davmail version is 6.0.1-trunk.
Here is the configuration: