Bobcares

Roundcube SMTP error 250 authentication failed – Here’s how to fix it

by | Feb 28, 2019

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";

6 Comments

  1. John

    I’m not all that excited about your suggestions of PLAIN and blank u/p, but you hit the nail on the head with using FQDN in the host fields. “localhost” isn’t likely in your cert, but “mail.mydomain.com” is, so use a name that’s in the cert.

    Reply
    • Ken C

      Exactly. Solved my problem as well. Thank you.

      Reply
  2. Mr Regis

    Thanks a lot. Finally I have my Roundcube + Postfix3 + Dovecot working fine with ssl and disabling 143 port (SSL auth only)

    Reply
  3. Alex

    In Roundcube could be possible to execute “bin/update.sh” – this could be fixed also some problems with configuration and other issues like SMTP error. Some naming config option has been changed.

    < $config['smtp_host'] = 'localhost'; $config[‘smtp_server’] = ‘localhost’; <= old option

    Reply
  4. Bernd

    Thanks a bunch, Bob, this solved my issue.

    I actually had

    $config[‘smtp_server’] = ‘localhost;

    in my config, but since postfix offers AUTH only after STARTTLS, roundcube threw me the error. Change to tls:// and the FQDN and now it works like a charm.

    Thanks Bob

    Cheers from Germany

    Reply
    • Hiba Razak

      Hi Bernd,
      Thanks for the feedback. We are glad to know that our article helps you solves the issue 🙂 .

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

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

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF