25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

25% off on first invoice for all services*

SPRING SALE

Use coupon

*Offer valid for new customers only

Need help?

Our experts have had an average response time of 11.43 minutes in March 2024 to fix urgent issues.

We will keep your servers stable, secure, and fast at all times for one fixed price.

Quick fix for SMTP Error (-1) : Connection to server failed

by | Oct 15, 2019

SMTP Error (-1): Connection to server failed.

That was an error message our customer recently got while trying to send mails via Roundcube.

Usually, this error occurs due to firewall restrictions, mail server malfunctioning, and so on.

At Bobcares, we often get requests to fix SMTP errors, as a part of our Server Management Services.

Today, let’s have a look into the error and see how our Support Engineers fix it.

 

What is SMTP error -1?

Basically, SMTP is the Simple Mail Transfer Protocol. The mail server connects with each other using this protocol. Since mail services are critically important, errors in this can be totally frustrating.

One of our customers had a LAMP server, with Postfix and Roundcube for mail services. But, while trying to send a mail via Roundcube, he got the error:

SMTP error -1 in Roundcube

The error message clearly indicated that the Mail client could not connect with the server. Initially, we checked the mail log. This gave more details about the error.

 

Causes and fixes for the SMTP error -1

Usually, there are several reasons that lead to the SMTP error. Let’s see how our Support Engineers fix these causes.

 

1. SSL/TLS certificate expired

Some customers approach us with the SMTP error -1 when they try to send mails using mail clients. Here the first login to the Mail client shows the error message.

Connection to storage server failed

And when the user tries to send an email, they get the SMTP error -1.

Most often, this situation indicates that the SSL/TLS certificate expired.

So, we check the certificate of the mail server. If it was found expired, we update it.

 

2. Errors in Mail server

In some cases, if the mail server do not work properly, then the same error shows up. Our Support Engineers first check the Mail server status.

For instance, for the Postfix mail server, we use the command:

service postfix status

If the status is found improper, we restart it using the command:

service postix restart

Most often this fixes the error.

 

3. Settings in the CSF firewall

In another instance, our customer using the LAMP server got the error while sending mail via Roundcube. When we checked the reason, we found that the error was with the CSF firewall setting.

So, we edited the CSF configuration. In Linux systems, the CSF configuration file is at  /etc/csf/csf.conf. We replace the values of SMTP parameters as follows:

SMTP_BLOCK = 1

SMTP_ALLOWLOCAL = 1

Finally, we restarted the CSF service. That fixed the error and mail started sending from the mail client.

 

4. SMTP port block

Similarly, an incorrect SMTP port setting in the Mail client configuration file also causes SMTP error -1.

For instance, for mail client Roundcube, we open the file wamp/roundcubemail/config/defaults.inc.php.

And we modify the line,

$config['smtp_port'] = 465;

Here server uses 465 as the SMTP port. Later we restart the service and this resolves the error.

 

[Having trouble in fixing SMTP errors? – We are available 24/7.]

 

Conclusion

In short, SMTP error -1 indicates that the connection to the server failed. This is because of many reasons like TLS certificate expiry, errors with the mail server or mail clients, SMTP port block, firewall restrictions and so on. Today, we saw how our Support Engineers fix this error.

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

0 Comments

Submit a Comment

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

Categories

Tags

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

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid

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