Smtp error authentication failure smtp server does not support authentication

Hello, I get the error when trying to send mail: [27-Dec-2019 00:16:41 +0200]: SMTP Error: Authentication failure: SMTP server does not support authentication (Code: ) in /usr/share/nginx/html/webm...

Piping in late on a two-year-old closed thread, but since I have also encountered the same error, I’d like just to add my .02 …

Under PHP 7.4/Roundcube 1.4.3, ‘clearing’ those variables really means:

$config['smtp_user'] = '';
$config['smtp_pass'] = '';

Setting them to null will not work.

Under Ubuntu 20.04, Roundcube will be installed with at least a defaults.inc.php which gets loaded before config.inc.php (as it should be). So, skipping those two settings will not work, since defaults.inc.php has the following settings:

$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';

So these two configuration variables must be explicitly overwritten in config.inc.php with the empty string '', or else SMTP will refuse to authenticate.

Of course, some Roundcube configurations may be even more convoluted and include several other configuration files beyond these. Actually, I had a few of those around, which I thought weren’t being included, but, to be on the safe side, I backed them up and deleted them — just keeping defaults.inc.php around, since it’s expectable that it will be overwritten with sensible defaults when Roundcube 1.4.4 ships. In other words, if the only configuration file you have is defaults.inc.php, do not touch it, but keep it intact, and just override what you wish/need on config.inc.php. I believe that at least those two are guaranteed to work, but it’s possible that some configurations only ship with defaults.inc.php (and you need to add your own config.inc.php) or possible just config.inc.php, filled in with all possible configuration values, which you may change — until the next Roundcube version comes around and wipes it clean…

An extra 👍 on the request for documenting this properly! After all, it might just require an extra comment line on defaults.inc.php… as @johnnyutahh so well mentioned, there are at least 3 ways to interpret ‘clearing’, according to context (i.e. each configuration variable may be ‘cleared’ differently…).

Authentication errors are always annoying, especially when you’re sure the logins are correct.

One such error in Roundcube is “SMTP error 250 authentication failed“.

This usually happens when customers try to send emails from their Roundcube webmail client.

At Bobcares, we resolve these email errors as part of Dedicated Support Services to our customers.

Today, we’ll discuss the top 3 reasons for this error and how we fix them.

Roundcube SMTP error 250 authentication failed – A Brief idea

Most web hosts now use SMTP AUTH on their servers. This prevents the server from being used as open relays and spam.

SMTP authentication allows the email sender to login to the email server using an authentication mechanism. In other words, only trusted users can send data via the SMTP server.

Customers usually see this error when they try to send emails using Roundcube email client. For instance, the complete error looks like this:

An error has occurred!
SMTP Error (250): Authentication failed.

So, our Support Experts check the mail server logs(/var/log/maillog or /var/log/exim_mainlog) and roundcube error logs. In addition to that, we enable SMTP debugging in roundcube configuration file. For example, on Plesk servers, we add the following code in the roundcube configuration file /usr/share/psa-roundcube/config/defaults.inc.php to enable SMTP debugging.

$config['debug_level'] = 1;
$config['smtp_debug'] = true;

This helps us to identify the origin of the issue.

Roundcube SMTP error 250 authentication failed – Causes & Fixes

Now, let’s see the common reasons for this error and how our Dedicated Engineers fix them.

1) Incorrect authentication settings in SMTP server

Roundcube SMTP error 250 authentication failed usually occurs when there is incorrect SMTP authentication setting in the email server configuration.

For example, one of the common mistakes that we see on Postfix servers is that users enable complex authentication methods such as CRAM MD5 in Postfix mail server. But, Roundcube doesn’t support this authentication. That is, users set the following authentication option in Postifx configuration file /etc/postifx/main.cf.

smtpd_sasl_security_options = noanonymous, noplaintext

This means that the server won’t support normal authentication mechanisms such as LOGIN, PLAIN, etc and roundcube throws this error.

Similarly, on Plesk servers, we’ve seen instances where Postifx is configured for SMTP authentication over TLS, but it’s not configured correctly. This can also create problems.

How we fix?

In such cases, our Support Engineers fix this by enabling PLAIN and LOGIN authentication mechanisms. For example, on Postfix servers, we add the following line.

smtpd_sasl_security_options = noanonymous

Customers can then login and send emails via Roundcube using the username and password.

Moreover, on Plesk servers, we ensure that SMTP authentication is enabled from Tools & Settings > Mail Server Settings > Relay options > Relaying.

In addition to that, we enable SMTP service on port 587 for all IPs from Tools & Settings > Mail Server Settings.

Also, we make sure that the following parameters are disabled in the Postifx configuration file.

smtpd_tls_exclude_ciphers
smtpd_sasl_security_options
smtpd_tls_auth_only
tls_ssl_options

2) Certificate mismatch issues

This usually happens when the mail server is configured to use SSL/TLS, but roundcube is not configured to use the proper certificate.

For example, one of the common mistakes that we see on cPanel servers is that customers setup Roundcube to use TLS for sending.

$config['smtp_server'] = 'tls://localhost;

However, this can sometimes conflicts with the SSL host value in /etc/exim.cert file and create problems.

How we fix?

In such case, our Support Engineers add the server hostname in the Rouncube configuration file.

$config['smtp_server'] = 'tls://serverhostname.com';

Therefore, we confirm that the hostname matches the SSL host in /etc/exim.cert file.

3) Roundcube configuration issues

Most web hosts use port 587 for SMTP authentication. We’ve seen instances where roundcube configuration settings aren’t properly configured to support SMTP authentication.

How we fix?

Here, our Support Engineers ensure that Roundcube is configured properly to support SMTP authentication. Most importantly, we make sure that the following parameters in Roundcube configuration file config.inc.php are set correctly.

$config['default_host'] = 'tls://server.hostname.com';
$config['smtp_port'] = 587;
$config['smtp_auth_type'] = 'LOGIN';

In addition to that, we tweak the following entries in Roundcube configuration file.

$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';

In the above setting, Rouncube uses the current user and current user’s password for logging in. This can sometimes create problems. So, for a safer side, we set blank entries for these parameters.

$config['smtp_user'] = ' ';
$config['smtp_pass'] = ' ';

[Need an Expert to look into your annoying email errors? Our Support Engineers are here 24/7].

Conclusion

In short, roundcube SMTP error 250 authentication failed can mainly occur due to SMTP authentication settings in the mail server or in the Roundcube email client. Today, we’ve discussed the main reasons for this error and how our Dedicated Engineers fix them.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = «owonCMyG5nEQ0aD71QM»;

Topic: Why SMTP Error (250): Authentication failed?  (Read 29214 times)

Hello.
Roundcube is configured like this:

$rcmail_config[‘smtp_server’] = ‘localhost’;
$rcmail_config[‘smtp_port’] = 25;
$rcmail_config[‘smtp_user’] = ‘%u’;
$rcmail_config[‘smtp_pass’] = ‘%p’;
$rcmail_config[‘smtp_auth_type’] = »;
$rcmail_config[‘smtp_auth_cid’] = null;
$rcmail_config[‘smtp_auth_pw’] = null;
$rcmail_config[‘smtp_helo_host’] = ‘localhost.localdomain’;
$rcmail_config[‘smtp_timeout’] = 0;

when trying to send mail, an error occurs:
SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /usr/share/roundcubemail/program/include/rcmail.php on line  (POST /mail/?_unlock=loading1369676645733&_lang=ru?_task=mail&_action=send)

Please, help.


Logged


your SMTP server does not support authentication so you should set:

$rcmail_config[‘smtp_user’] = »;
$rcmail_config[‘smtp_pass’] = »;

PS. what version of roundcube are you running? $rcmail_config was depreciate and replaced with $config in version 1.0


Logged


Roundcube 1.3.8.
I tried
$rcmail_config[‘smtp_user’] = »;
$rcmail_config[‘smtp_pass’] = »;

And now messages are sent, but inbox of addressee are empty. Why?


Logged


Authentication might be disabled on insecure channel. I would rather propose to try with:
$rcmail_config[‘smtp_server’] = ‘tls://localhost’;
$rcmail_config[‘smtp_port’] = 587;
$rcmail_config[‘smtp_user’] = ‘%u’;
$rcmail_config[‘smtp_pass’] = ‘%p’;


Logged


Authentication might be disabled on insecure channel. I would rather propose to try with:
$rcmail_config[‘smtp_server’] = ‘tls://localhost’;
$rcmail_config[‘smtp_port’] = 587;
$rcmail_config[‘smtp_user’] = ‘%u’;
$rcmail_config[‘smtp_pass’] = ‘%p’;

I tried that. As a result, there was another error sending the message.


Logged



Logged


And now messages are sent, but inbox of addressee are empty. Why?

I’m sorry but I’m not sure what this means, please could you explain a little more?

I tried that. As a result, there was another error sending the message.

What error?

Are you sure your SMTP server is working correctly, are you able to send messages with other clients? If so have you checked the SMTP server log for more details when trying to send messages using roundcube. Also you could turn on smtp_debug in the roundcube config and check that log for any more details.


Logged


And now messages are sent, but inbox of addressee are empty. Why?

I’m sorry but I’m not sure what this means, please could you explain a little more?

I tried that. As a result, there was another error sending the message.

What error?

smtp error (250) authentication failed

Are you sure your SMTP server is working correctly, are you able to send messages with other clients? If so have you checked the SMTP server log for more details when trying to send messages using roundcube. Also you could turn on smtp_debug in the roundcube config and check that log for any more details.

My SMTP server is localhost. I tried from differents accounts.
when trying to send mail, an error occurs:
SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /usr/share/roundcubemail/program/include/rcmail.php on line  (POST /mail/?_unlock=loading1369676645733&_lang=ru?_task=mail&_action=send)


Logged


Are you sure your SMTP server is working correctly?


Logged


Are you sure your SMTP server is working correctly?

I don’t know.  :- :(


Logged


Hello again. This promblem still here  :(

If my config are:
$rcmail_config[‘smtp_server’] = ‘localhost’;
$rcmail_config[‘smtp_port’] = 25;
$rcmail_config[‘smtp_user’] = ‘%u’;
$rcmail_config[‘smtp_pass’] = ‘%p’;

Then I have a SMTP Error (250): Authentication failed?
log: SMTP Error: SMTP error: Authentication failure: SMTP server does not support authentication (Code: ) in /usr/share/roundcubemail/program/include/rcmail.php on line  (POST /mail/?_unlock=loading1369676645733&_lang=ru?_task=mail&_action=send)

If my config are:
$rcmail_config[‘smtp_user’] = »;
$rcmail_config[‘smtp_pass’] = »;

Then messages are sent, but the recipient does not receive the email message.

Also recipient does not receive the email message from another emails (not mydomain).

P.S. I found two files of config (config.inc and defaultts.inc) , but I think its not a problem.

Pls help with this.

« Last Edit: February 20, 2019, 03:44:43 AM by maximise »


Logged


Then messages are sent, but the recipient does not receive the email message.

Have you checked your SMTP logs to see what happened to the message after it left Roundcube?


Logged


Then messages are sent, but the recipient does not receive the email message.

Have you checked your SMTP logs to see what happened to the message after it left Roundcube?

In errors of roundcube nothing

In «sendmail» :

[20-Feb-2019 11:08:23 +0300]: <sa3b> User admin@*** [192.168.XX]; Message for admin@***; 250: 2.0.0 Ok: queued as CD77522C30


Logged


It sounds like roundcube is working properly and that log entry says that sendmail queued the message for delivery. I think you are going to have to keep tracing the message through the delivery process to find out where its gone. Perhaps the sendmail community can help you.


Logged


Turn on debugging and check the Roundcube logs. Maybe you overwrote your config file? And the defaults are hitting the wrong port on the server that doesn’t support authentication.

Did you git pull from a release tag or master?


Logged


Понравилась статья? Поделить с друзьями:

Читайте также:

  • Smtp error 421 exchange
  • Smtp connection format error
  • Slmgr ato ошибка активация не выполнена
  • Smtp 501 syntax error in parameters or arguments
  • Slippery slope логическая ошибка

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии