Unable to connect to SMTP server using port 465 with SSL encryption

Created:

2016-11-16 13:05:56 UTC

Modified:

2017-08-16 17:18:37 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to connect to SMTP server using port 465 with SSL encryption

Applicable to:

  • Plesk 12.5 for Linux
  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Unable to send emails via SMTP with SSL encryption on port 465. This can be verified with the following command:

openssl s_client -crlf -connect localhost:465

But it is possible to send emails via SMTP with TLS encryption on port 465:

openssl s_client -starttls smtp -crlf -connect localhost:465

Cause

Postfix configuration file was changed manually. Postfix works with either SSL or TLS encryption (not with both at the same time). By default Plesk uses SSL. This is the default configuration:

/etc/postfix/main.cf file contains the following entries:

smtp_tls_security_level = may
smtpd_sasl_auth_enable = yes
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = /etc/postfix/postfix_default.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes

/etc/postfix/master.cf contains the following options:

plesk_saslauthd unix y y n - 1 plesk_saslauthd status=5 listen=6 dbpath=/var/spool/postfix/plesk/passwd.db
smtps inet n - n - - smtpd -o smtpd_tls_wrappermode=yes
submission inet n - n - - smtpd -o smtpd_enforce_tls=yes -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtp inet n - n - - smtpd

Resolution

Change Postfix configuration to default:

  1. Backup current configuration files:

    # cp /etc/postfix/main.cf{,.orig}
    # cp /etc/postfix/master.cf{,.orig}
  2. Change options in /etc/postfix/main.cf and /etc/postfix/master.cf files to default.

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