Connection error to local imap server


i use nextcloud 18.0.3 with the newest mail app. If i try to create a account, i get the following error message
Creating account failed: Could not connect to IMAP: Error connecting to mail server.

The mail server is a local imap server. The settings in the app are the same like on thunderbird - which is working.
Also i set 'app.mail.verify-tls-peer' => 'false', in the config.php.

Could anybody help to get the mail app working with the local imap server?


Try false instead of 'false'. It should be a boolean.

1 Like

it could be so simple… :roll_eyes:

It´s working, thanks alot

1 Like


I have almost the same problem.

IMAP and SMTP did not work on the mail app.
I have no TLS, No ssl on my local serveur, where NextCloud 18.04 is installed.

Thunderbird works fine, but not the mail app.

I tried your trick, but still not enought.

Please open a new topic, though.

The Nextcloud mail app offers an extensive logging system to make it easier identifying and tracking down bugs. Please enable debug mode and set the log level to debug in your admin settings. Then, try to reproduce your issue and take another look at data/nextcloud.log, data/horde_imap.log and data/horde_smtp.log.


I don’t exactly what I did, but it works now.
I do some changes in my postfix/

I am new in nextcloud.

I am also facing the same problem while i ma trying to add my gmail account. I have added the command in config.php
‘app.mail.verify-tls-peer’ => false,

afterward, new error shows “Request failed with status code 504”

Please open a new topic

ok, I will open. Currently, can’t log in to my Gmail account, I have already turned off 2FA in my Gmail settings.