-
Notifications
You must be signed in to change notification settings - Fork 71
Closed
Labels
Description
Steps to reproduce
- Setup an IMAP server using TLS on port 993
- Set up config.php with imap support with TLS
'user_backends' => array(
array(
'class' => 'OC_User_IMAP',
'arguments' => array(
'imap.server.co', 993, 'tls', 'server.co', true, false
),
),
),
- Attempt to log in to nextcloud
Expected behaviour
Log in should complete successfully
Actual behaviour
Login is timing out.
Affected Authentication backend
IMAP using TLS
Server configuration
version 20.0.2
Fresh install
Logs
Nextcloud log (data/nextcloud.log)
Nextcloud log
`ERROR: Could not connect to imap server via curl: Operation timed out`
Found the problem and fix:
Line 88 in 8a4e57b
| $protocol = ($this->sslmode === "ssl") ? "imaps" : "imap"; |
It only sets the protocol to imaps for ssl, not tls. Changing the line to the following fixes the issue:
$protocol = ($this->sslmode === "ssl" || $this->sslmode === "tls") ? "imaps" : "imap";
Seems loosely related to #140
thomb89