Horde login failed: Could not open secure TLS connection to the IMAP server

Created:

2017-08-09 05:17:32 UTC

Modified:

2017-08-09 05:24:49 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Horde login failed: Could not open secure TLS connection to the IMAP server

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 12.0 for Linux

Symptoms

Horde webmail login failed.

Log /var/log/psa-horde/psa-horde.log contains the following error:

2017-07-31T17:15:30+00:00 WARN: HORDE [imp] [login] Could not open secure TLS connection to the IMAP server. [pid 1467 on line 730 of "/usr/share/psa-horde/imp/lib/Imap.php"]
2017-07-31T17:15:30+00:00 ERR: HORDE [horde] FAILED LOGIN for john.doe@example.com (john.doe@example.com) [203.0.113.2] to horde [pid 1467 on line 216 of "/usr/share/psa-horde/login.php"]

Attempt to log in via CLI produces the following error:

~#  php -r '$user="john.doe@example.com";$pass="<PASSWORD>";imap_open( "{127.0.0.1:143/imap/tls/novalidate-cert}", $user, $pass, OP_DEBUG);'
PHP Warning: imap_open(): Couldn't open stream {127.0.0.1:143/imap/tls/novalidate-cert} in Command line code on line 1
PHP Notice: Unknown: TLS/SSL failure for 127.0.0.1: SSL negotiation failed (errflg=2) in Unknown on line 0

 IMAPd SSL certificate looks like below:

# cat /usr/share/imapd.pem

▒Tm▒▒2m▒▒m3▒p3 ▒▒@3 ▒▒@3▒▒▒d▒▒4▒▒▒▒▒▒▒▒▒~▒8 ▒▒▒▒▒▒▒▒▒▒▒▒▒▒p▒▒▒`▒▒▒▒▒▒ ▒▒▒0▒▒▒▒▒▒▒▒▒▒▒▒▒▒@▒▒▒P▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒О▒▒▒▒▒ ▒▒▒▒▒▒

Cause

Corrupted IMAPd SSL certificate.

Resolution

Replace the corrupted certificate:

1. Login to the server via SSH.

2. Back up the original file:

# mv /usr/share/imapd.pem /usr/share/imapd.pem.bak

3. Copy POP3d certificate:

# cp -a /usr/share/pop3d.pem /usr/share/imapd.pem

4. Restart the service:

# service dovecot restart

or

# service courier-imapd restart

Additional information

Horde login failed: Could not open secure TLS connection to the IMAP server

Have more questions? Submit a request
Please sign in to leave a comment.