pimalaya / himalaya

CLI to manage emails
https://pimalaya.org
MIT License
3.19k stars 97 forks source link

Wizard hotmail not generation valid config #501

Open mattiasbonte opened 2 weeks ago

mattiasbonte commented 2 weeks ago

When I try to add my hotmail account via the wizard it produces an error. I've basically chose all the defaults as well..

I have tried with my personal password, and then added 2fa and created an app password as well.

Both without success. Any idea what I might be doing wrong?

❯ himalaya
Cannot find configuration at ~/.config/himalaya/config.toml.
> Would you like to create one with the wizard? Yes

Configuring your default account

> Email address: xx@hotmail.com
> Account name: hotmail
> Full display name: xx
> Downloads directory: ~/Downloads
> Default backend: IMAP
> IMAP hostname: outlook.office365.com
> IMAP encryption: SSL/TLS
> IMAP port: 993
> IMAP login: xx@hotmail.com
> IMAP authentication strategy: Ask my password, then save it in the configuration file (not safe)
> IMAP password: ********
> Backend for sending messages: SMTP
> SMTP hostname: smtp.office365.com
> SMTP encryption: StartTLS
> SMTP port: 587
> SMTP login: xx@hotmail.com
> SMTP authentication strategy: Ask my password, then save it in the configuration file (not safe)
> SMTP password: ********
> Where to save the configuration? ~/.config/himalaya/config.toml
Writing configuration to ~/.config/himalaya/config.toml…
Done! Exiting the wizard…
Error:
   0: cannot build IMAP client
   1: cannot authenticate to IMAP server using LOGIN mechanism
   2: cannot resolve IMAP task
   3: unexpected NO response: LOGIN failed.

Note: Run with --debug to enable logs with spantrace.
Note: Run with --trace to enable verbose logs with backtrace.
soywod commented 2 weeks ago

Definitely looks like an authentication issue with Outlook. I tried with a outlook.com address and it works as expected, with my personal password. Could you try with imap-mail.outlook.com instead?

mattiasbonte commented 2 weeks ago

I've changed these a couple of times, while also switching up my password. I tried with both my personal password and the newly created app password but without success.

backend.host = "outlook.office365.com"
backend.host = "imap-mail.outlook.com"

Some warning from the trace

2024-11-12T09:11:11.677831Z  WARN client::build: email::imap: authentication failed mechanism=Plain err=ResolveTask(UnexpectedNoResponse(StatusBody { kind: No, code: None, text: Text("AUTHENTICATE failed.") }))

On a positive note, I was able to connect my gmail by following the wizard.. but with hotmail no success so fa.r

soywod commented 1 week ago

Could you share the --debug logs? We may find sth interesting about server capabilities or auth mechanism.