Symptoms
-
Emails cannot be sent via the Rouncube webmail with the following error message:
SMTP Error (535): Authentication failed.
-
Emails cannot be sent via a PHP script:
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 OkFatal error: Uncaught exception 'phpmailerException' with message 'SMTP Error: Could not authenticate.' in
-
The following error message appears in
/var/log/messages
: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
-
Connect to a Plesk server via SSH.
-
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
-
Comment out the lines
smtpd_sasl_security_options
andsmtpd_tls_auth_only
by placing a # (hash) character at the beginning of each line:#smtpd_sasl_security_options = noplaintext
#smtpd_tls_auth_only = yes -
Save the changes and close the file.
-
Restart Postfix:
# service postfix restart