Bobcares

Smtp: starttls failed – Here’s how to fix it

by | Jan 7, 2019

Problems with website mail module can be really critical. It can end up in the loss order mails, feedback from customers and so on.

Often, bad configuration in custom mail forms or mail module in applications like OsTicket, CiviCRM can show the error “SMTP: STARTTLS failed“.

At Bobcares, we help customers to fix these mail errors as part of our Server Support for web hosts.

Today, we’ll see the top reasons for the “SMTP: STARTTLS failed” error and how our Support Engineers fix them.

 

What is STARTTLS?

Let’s first see what STARTTLS is.

Mail communication can be set up as secure or insecure. STARTTLS is a way to take an existing insecure connection and upgrade it to a secure connection using SSL/TLS.

Usually, the servers that offer message submission over port 587 require mail clients to use STARTTLS feature.

 

What causes SMTP: STARTTLS failed error?

We’ve now seen the details of STARTTLS. But, many times STARTTLS failure can block mails. Let’s discuss the top causes for the STARTTLS failed error.

 

1. Certificate mismatch

From our experience in managing servers, our Support Engineers often see STARTTLS problems due to the server SSL certificate.  When the SMTP server has a self-signed certificate, it can show up the “SMTP: STARTTLS failed” error.

For example, servers having PHP 5.6 will verify peer certificates and host names by default when using SSL/TLS. Therefore, it is a requirement that the certificate name and hostname should match.

Also, our Support Engineers see problems with the certain versions of apps like CiviCRM, where PEAR SMTP package does not support TLS.

 

2. SMTP Configuration errors

Yet another reason for the STARTTLS failed error can be bad configuration of the mail aka SMTP server. Recently, we saw this error when the server was sending the SMTP EHLO command as “localhost” instead of the real hostname. This made PHP’s verification to fail and report error.

Again, the error can pop up when the SMTP server name is wrongly configured in the application as well.

 

3. Port restrictions

Port restrictions in the server firewall can also cause this error.

Recently, in one of the servers, the reason for error sending mail was port 587 blocked in the firewall. Here, the mails from the website form failed with the error:

Authentication failure [SMTP: STARTTLS failed (code: 220, response: TLS go ahead)]

 

How we fix SMTP: STARTTLS failed error?

So far, we saw the various reasons for the SMTP: STARTTLS failed error. Let’s now see how we fix this error.

When customers report problems with mail functionality, we first check the mail server logs. This gives us a clue on the exact settings that create problems.

And, the fixes vary according to the cause.

 

1. Correcting SMTP settings

Firstly, we check and verify the SMTP settings used in the app. We check and correct the typos in the mail server name, username, password etc.

For example, when one of customers reported “SMTP: STARTTLS failed” error in their mail app, our Support Engineers had to put “ssl://” in front of the SMTP server name. This fixed the problem and the mail started working.

The same fix was applicable when a customer reported problem with osTicket help-desk too.

 

2. Correcting firewall

Similarly, another customer started receiving this error, soon after a server reboot. Here, customer confirmed that he did not do any modifications in the mail script. From our side, we checked and confirmed that the versions of PHP was fine too.

On a detailed check, our Support Engineers found that the server firewall was causing the issue here. It was blocking access to port 587 of the mail server. To fix the problem, we had to reload the firewall. And mail started working again.

 

3. Fixing SSL Certificate

Last, but not the least, proper SSL certificate for the mail server is also needed for mail to work. Therefore, our Security Engineers set up mail server with valid SSL certificate that matches the server name.

Additionally, when server uses PEAR packages, we ensure that the module Net_SMTP do support TLS too.

[Are you having problems with your mail server? We can fix it for you.]

 

Conclusion

SMTP: STARTTLS failed is an error that happens when using mail functionality in various applications. Today, we’ve seen the top reasons for the error and how our Support Engineers fix it.

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.

SEE SERVER ADMIN PLANS

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

2 Comments

  1. DIANNE SCULLION

    I am getting STARTTLS on every email I try to send I don’t understand or know what to do I am 70 years old, please help. I am getting incoming emails only

    Reply
    • Hiba Razak

      Hi Dianne,
      Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom).

      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