Nextcloud version (eg, 20.0.5): 23.0.4
Operating system and version (eg, Ubuntu 20.04): Debian 11
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.53
PHP version (eg, 7.4): 8.0.17
The issue you are facing:
After upgraded to Nextcloud 23.0.4, from version 23.0.3, unable to connect to Gmail and Yahoo Mail using IMAP setting.
Receive similar error => Creating account failed: Connection to IMAP at imap.gmail.com:933 Failed. Error Connecting to mail server.
No problem using other email client like Evolution and Microsoft Outlook.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Manual setup mail account
The output of your Nextcloud log in Admin > Logging:
Creating account failed: Connection to IMAP at imap.gmail.com:933 Failed. Error Connecting to mail server.
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'logfile' => '/zdata/nextcloud/log/nextcloud.log',
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'memcache.local' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.0,
),
'instanceid' => 'oclqtxgucl4s',
'passwordsalt' => '**********************************',
'secret' => '***************************************',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '*************************',
2 => '172.16.8.76',
),
'datadirectory' => '/zdata/nextcloud/data',
'dbtype' => 'pgsql',
'version' => '23.0.4.1',
'overwrite.cli.url' => '**************************',
'dbname' => 'tsgnextcloud',
'dbhost' => '172.16.8.47:5432',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'nextcloud',
'dbpassword' => '***************',
'installed' => true,
'maintenance' => false,
'onlyoffice' =>
array (
'verify_peer_off' => true,
'jwt_header' => 'AuthorizationJwt',
),
'allow_local_remote_servers' => true,
'logtimezone' => 'Asia/Singapore',
'log_rotation_size' => 10485760,
'default_locale' => 'en_US',
'theme' => '',
'default_phone_region' => 'SG',
'app.mail.transport' => 'php-mail',
'mail_from_address' => 'is',
'mail_smtpmode' => 'smtp',
'mail_sendmailmode' => 'smtp',
'mail_domain' => '***********',
'mail_smtpauthtype' => 'PLAIN',
'mail_smtphost' => '172.16.15.6',
'mail_smtpport' => '25',
'has_rebuilt_cache' => true,
'loglevel' => '1',
'lost_password_link' => '*********************************',
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
'tempdirectory' => '/zdata/nextcloud/tmp',
'log_type' => 'file',
'log.condition' =>
array (
'apps' =>
array (
0 => 'admin_audit',
),
),
'admin_audit' =>
array (
'logfile' => '/zdata/nextcloud/log/audit.log',
),
'remember_login_cookie_lifetime' => '1800',
'log_rotate_size' => '10485760',
'trashbin_retention_obligation' => 'auto, 60',
'versions_retention_obligation' => 'auto, 180',
'activity_expire_days' => '120',
'simpleSignUpLink.shown' => false,
'updater.secret' => '*************************************',
);
The output of your Apache/nginx/system log in /var/log/____
:
PASTE HERE
[Wed Apr 27 15:23:05.382632 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.199:59948] AH01797: client denied by server configuration: /var/www/nextcloud/ocs/v2.php
[Wed Apr 27 15:23:05.382867 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.199:59948] AH01797: client denied by server configuration: /var/www/nextcloud/apps/notifications/api
[Wed Apr 27 15:23:13.455074 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.199:59952] AH01797: client denied by server configuration: /var/www/nextcloud/ocs/v2.php
[Wed Apr 27 15:23:13.455304 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.199:59952] AH01797: client denied by server configuration: /var/www/nextcloud/apps/notifications/api
[Wed Apr 27 15:23:17.281279 2022] [access_compat:error] [pid 6204:tid 140558328866560] [client 172.16.8.76:60602] AH01797: client denied by server configuration: /var/www/nextcloud/index.php
[Wed Apr 27 15:23:17.281496 2022] [access_compat:error] [pid 6204:tid 140558328866560] [client 172.16.8.76:60602] AH01797: client denied by server configuration: /var/www/nextcloud/apps/logreader/poll
[Wed Apr 27 15:23:26.215976 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.76:60602] AH01797: client denied by server configuration: /var/www/nextcloud/ocs/v2.php
[Wed Apr 27 15:23:26.216206 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.76:60602] AH01797: client denied by server configuration: /var/www/nextcloud/apps/notifications/api
[Wed Apr 27 15:23:29.470066 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.199:59961] AH01797: client denied by server configuration: /var/www/nextcloud/index.php
[Wed Apr 27 15:23:29.470308 2022] [access_compat:error] [pid 6204:tid 140558354044672] [client 172.16.8.199:59961] AH01797: client denied by server configuration: /var/www/nextcloud/apps/mail/api
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
{"reqId":"ihgQlKkes0cusVZ4Qt6S","level":1,"time":"2022-04-27T15:16:01+08:00","remoteAddr":"172.16.8.199","user":"ncadmin","app":"mail","method":"POST","url":"/index.php/apps/mail/api/accounts","message":"Setting up manually configured account","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0","version":"23.0.4.1"}
{"reqId":"ihgQlKkes0cusVZ4Qt6S","level":3,"time":"2022-04-27T15:16:01+08:00","remoteAddr":"172.16.8.199","user":"ncadmin","app":"mail","method":"POST","url":"/index.php/apps/mail/api/accounts","message":"Creating account failed: Connection to IMAP at imap.gmail.com:993 failed. Error connecting to mail server.","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0","version":"23.0.4.1"}