Getting "IMAP server is not reachable" error on set up

Hello! I am trying to connect to my email server and use nextcloud Mail app for emails. Some details about the installation:

  1. Dockerized installation
  2. Running behind nginx proxy
  3. Mail server is on a different server and network and I am using the settings from the mail provider that work with other mail clients
  4. The smtp settings for notifications from nextcloud work through the same server with a different account

Steps that lead to error :

  1. Install Mail app
  2. Go to set up account
  3. Manual set up all configuration since automatically doesn’t work
  4. Use settings from mail provider (SSL/TLS)
  5. Get error “Manual config failed. IMAP server is not reachable.”

Error log shows :

{“reqId”:“RZt1vs3EBKVr2zXKF2Zm”,“level”:3,“time”:“2022-10-02T06:26:24+00:00”,“remoteAddr”:“{MY-IP}”,“user”:“{MY-USERNAME}”,“app”:“core”,“method”:“PROPFIND”,“url”:“/remote.php/dav/files/{MY-USERNAME}/”,“message”:“User backend OC_User_IMAP not found.”,“userAgent”:“Mozilla/5.0 (Windows) mirall/3.4.0stable-Win64 (build 20211129) (Nextcloud, windows-10.0.19042 ClientArchitecture: x86_64 OsArchitecture: x86_64)”,“version”:“24.0.5.1”,“data”:{“app”:“core”}}

This I have tried already :

  1. Defining user_backends in config.php
  2. Added ‘app.mail.verify-tls-peer’ => false in config.php
  3. Manually adding the IP from my mail server in /etc/hosts (which is totally not required since smtp works)
  4. Installing php imap using :
apt-get update
apt-get install -y --no-install-recommends libc-client-dev libkrb5-dev
docker-php-ext-configure imap --with-kerberos --with-imap-ssl
docker-php-ext-install imap

And in the end I restarted the whole container, just to be sure.

Still the same thing happens.

Did you ever find the solution to your problem? I have hit the same wall.

Could it be related to this bug?

Same problem here. “IMAP server is not reachable”. This is a fresh install of 27.0.1. I have another nextcloud running on the same network (older install) and it works fine, I checked I have similar config.
Steps I’ve done:

  1. Enable https in my apache config
  2. add those app.mail timeout settings mentioned in the bug thread.
  3. connection to the email server imap port 993 and smtp 465 work and produce viable cert.

openssl s_client -crlf -connect mail.server.com:993

I dont need app.mail.verify-tls-peer or allow_local_remote_servers but I tried them too.

1 Like

same problem here
NC 27.1.3
E-Mail 3.4.4