Articles in this section

[BUG] Qmail: Error connecting to SMTP server: TLS 1.2

kb: bug Plesk Obsidian for Linux

Applicable to:

  • Plesk Obsidian for Linux

Symptoms

  • Qmail is selected as SMTP server
  • All mail clients throw the error with the inability to connect to SMTP, Roundcube shows:

    CONFIG_TEXT: SMTP Error (-1): Connection to server failed

  • The SSL It! extension is installed
  • The TLS versions and ciphers management option is set to Modern
  • There are such errors in the /var/log/maillog file:

    CONFIG_TEXT: websrv04 /var/qmail/bin/relaylock[1779]: /var/qmail/bin/relaylock: mail from 203.0.113.2:52396 (not defined)
    websrv04 /var/qmail/bin/relaylock[1781]: /var/qmail/bin/relaylock: mail from 0000:0000:0000:0000:0000:0000:0000:0000:42884 (not defined)

  • If Roundcube is used there are such errors in the /var/log/plesk-roundcube/errors file:

    CONFIG_TEXT: ERROR: stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) (0)
    ERROR: Failed to connect socket: stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) ()
    SMTP Error: Connection failed: Failed to connect socket: stream_socket_client(): unable to connect to ssl://localhost:465 (Unknown error) in /usr/share/psa-roundcube/program/lib/Roundcube/rcube.php on line 1667 (POST /?_task=mail&_unlock=loading1583560215548&_lang=en_US&_framed=1&_action=send)

  • If Horde is used there are such errors in the file:

    CONFIG_TEXT: ERR: HORDE [imp] Error connecting to SMTP server. [0] [pid 27450 on line 1160 of "/usr/share/psa-horde/imp/lib/Compose.php"]

Cause

Qmail does not support modern TLS ciphers.
To find possible workaround there was created bug #PPPM-11723: Mail does not work with Qmail and enabled Modern TLS ciphers.

Resolution

Set lower TLS cipher version    (potential risk: since SSL It! 1.15.5, TLS versions and ciphers management is not manageable by default: https://docs.plesk.com/release-notes/obsidian/change-log/#ssl-it-1.15.5)
  1. Log into Plesk
  2. Go to Tools & Settings > TLS versions and ciphers management
  3. Set the TLS versions and ciphers by Mozilla option to Intermediate or Old

Switch from Qmail to Postfix as explained here: How to install/change a local mail server in Plesk for Linux

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.