Articles in this section

Unable to send emails via the Roundcube webmail or a PHP script on a Plesk server: encryption needed to use mechanism

Plesk for Linux kb: technical ABT: Group A

Applicable to:

  • Plesk for Linux

Symptoms

  • Emails cannot be sent via the Rouncube webmail with the following error message:

    PLESK_INFO: SMTP Error (535): Authentication failed.

  • Emails cannot be sent via a PHP script:

    PLESK_INFO: SMTP -> ERROR: AUTH not accepted from server: 535 5.7.8 Error: authentication failed: encryption needed to use mechanism
    SMTP -> FROM SERVER:250 2.0.0 Ok

    Fatal error: Uncaught exception 'phpmailerException' with message 'SMTP Error: Could not authenticate.' in

  • The following error message appears in /var/log/messages:

    CONFIG_TEXT: postfix/smtpd[21524]: warning: localhost.localdomain[::1]: SASL PLAIN authentication failed: encryption needed to use mechanism

Cause

The current Postfix configuration does not allow the use of mechanisms that transmit unencrypted username and password.

Resolution

  1. Connect to a Plesk server via SSH.

  2. Open the file /etc/postfix/main.cf in a text editor. In this example, we are using the vi editor:

    # vi /etc/postfix/main.cf

  3. Comment out the lines smtpd_sasl_security_options and smtpd_tls_auth_only by placing a # (hash) character at the beginning of each line:

    CONFIG_TEXT: #smtpd_sasl_security_options = noplaintext
    #smtpd_tls_auth_only = yes

  4. Save the changes and close the file.

  5. Restart Postfix:

    # service postfix restart

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.