cypht icon indicating copy to clipboard operation
cypht copied to clipboard

Unable to save this server, are the username and password correct?

Open XargonWan opened this issue 2 years ago • 10 comments

💬 Question

Whatever server I add, I got the following error: Unable to save this server, are the username and password correct?. I tried google login, google IMAP, microsoft IMAP without any success.

I am running a test server with the default composer file:

version: '3'
services:
  db:
    image: mariadb:10
    volumes:
      - ./db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=root_password
      - MYSQL_DATABASE=cypht
      - MYSQL_USER=cypht
      - MYSQL_PASSWORD=cypht_password
  cypht:
    image: sailfrog/cypht-docker:latest
    volumes:
      - ./cypht/users:/var/lib/hm3/users
    ports:
      - "8888:80"
    environment:
      - CYPHT_AUTH_USERNAME=admin
      - CYPHT_AUTH_PASSWORD=admin_password
      - CYPHT_DB_CONNECTION_TYPE=host
      - CYPHT_DB_HOST=db
      - CYPHT_DB_NAME=cypht
      - CYPHT_DB_USER=cypht
      - CYPHT_DB_PASS=cypht_password
      - CYPHT_SESSION_TYPE=DB

I don't know where the logs are located as with docker logs it prompt me the nginx logs.

Any help?

XargonWan avatar Jul 04 '23 12:07 XargonWan

Hi, I just tested the stock docker-compose running on port 8888 and it sucessfullu connects with an IMAP server. It also displays the emails just fine. Google driver might need some special auth, I suggest you first test with another IMAP server.

The error message you see is connected with a failure to authenticate with remote IMAP server with provided credentials. There are no more logs that could be helpful. You can basically run Cypht in debug mode and have the logs appear either on-screen or logged to the standard php error log.

kroky avatar Jul 04 '23 14:07 kroky

Hi, I just tested the stock docker-compose running on port 8888 and it sucessfullu connects with an IMAP server. It also displays the emails just fine. Google driver might need some special auth, I suggest you first test with another IMAP server.

The error message you see is connected with a failure to authenticate with remote IMAP server with provided credentials. There are no more logs that could be helpful. You can basically run Cypht in debug mode and have the logs appear either on-screen or logged to the standard php error log.

Thanks for your prompt reply.

How can I run it in debug mode?

XargonWan avatar Jul 04 '23 14:07 XargonWan

The debug mode is documented in https://github.com/cypht-org/cypht/blob/master/INSTALL

FYI, Google and Microsoft nowadays usually restrict traditional IMAP access. My suggestions:

  1. See https://github.com/cypht-org/cypht/wiki/OAUTH2-over-IMAP
  2. As Victor indicated, "first test with another IMAP server."
  3. Make sure Google and Microsoft are set up for traditional IMAP with another mail client (ex.: Claws Mail)

marclaporte avatar Jul 05 '23 01:07 marclaporte

I found GMX that is serving IMAP, it's working on my Thunderbird but not on Cypht: I got Authentication failure and even in debug mode I got no clues why. Basically what I'm trying to understand is if Cypht is retaining the emails in the database or not as I need to do some operations on my emails.

XargonWan avatar Jul 05 '23 08:07 XargonWan

Yes, that's odd. Might be problems with SSL and docker or another thing - I see their IMAP is pretty standard (https://support.gmx.com/pop-imap/imap/server.html)

Note that cypht is a client only - it doesn't store messages, so it relies 100% on the remote IMAP server to read and display messages.

kroky avatar Jul 06 '23 09:07 kroky

@XargonWan If you can provide SSH access to an environment with the issue, a Cypht team member (@josaphatim) can troubleshoot.

marclaporte avatar Jul 07 '23 03:07 marclaporte

Unfortunately not, however I set it up on an azure linux vm and even there I had the same issue, both native and docker.

XargonWan avatar Jul 11 '23 18:07 XargonWan

@XargonWan I really want to help and to do so, I need SSH access to an environment exhibiting the issue.

marclaporte avatar Jul 12 '23 14:07 marclaporte

@XargonWan please

marclaporte avatar May 06 '24 21:05 marclaporte