Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: stopguardias24h on July 31, 2022, 04:23:38 PM

Title: Could not connect to SMTP host: 110 : Connection timed out
Post by: stopguardias24h on July 31, 2022, 04:23:38 PM
I'm trying to configure mail for SMF, in order to make the users registration. I send you a screenshot with my configuration (but I tried so many other options), that I think it should be the correct one.

The error is also attached in error_log.png:

2: fsockopen(): unable to connect to mail.stopguardias24h.com:25 (Connection timed out)
Could not connect to SMTP host: 110 : Connection timed out

Any idea?

Thank you!
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: Doug Heffernan on July 31, 2022, 04:39:01 PM
Quote from: stopguardias24h on July 31, 2022, 04:23:38 PM2: fsockopen(): unable to connect to mail.stopguardias24h.com [nofollow]:25 (Connection timed out)
Could not connect to SMTP host: 110 : Connection timed out

I do not think that this is related to Smf. That timout indicicates that your SMTP server is not accepting connections from your server.

Another reason could be that a firewall is blocking your requests.

Do you have SSH access to the server?
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: stopguardias24h on July 31, 2022, 04:54:16 PM
Quote from: Doug Heffernan on July 31, 2022, 04:39:01 PM
Quote from: stopguardias24h on July 31, 2022, 04:23:38 PM2: fsockopen(): unable to connect to mail.stopguardias24h.com [nofollow]:25 (Connection timed out)
Could not connect to SMTP host: 110 : Connection timed out

I do not think that this is related to Smf. That timout indicicates that your SMTP server is not accepting connections from your server.

Another reason could be that a firewall is blocking your requests.

Do you have SSH access to the server?


Hey, thank you for your reply.

Well, I was talking with my host, and tried to change configuration to a secure one, and tried tons of options, without success. Also tried 465 secure port with my host secure connection and SMTP TLS, no success.
:-(

Yes, I ve SSH access.

ty
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: stopguardias24h on July 31, 2022, 05:49:57 PM
It doesn't work even with a gmail account settings and another mail server. Any idea? maybe some issue with this?

thank you!
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: Chief of Nothing on July 31, 2022, 10:56:37 PM
Port 110 is reserved for POP, that is receiving mail, not sending it. I don't know why SMF has code for trying to send on port 110 built in.

Generally speaking port 25 is these days reserved for mail servers to communicate with each other, not for end users to send email on however there are still hosts that configure their servers to accept mail from end users on this port.

When you were trying the secure port, did you:


If you tried to use STARTTLS in SMF then don't, leave it as just SMTP and prepend the mail server as above.

Make sure you have the SMTP username correct, it is the username of the mail account and usually is in the form of the complete email address, ie, [email protected] or stopguardias24h+stopguardias24h.com

Gmail is a strange one and requires setting up something in Gmail now to accept mail submission so don't be surprised that one didn't work.
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: stopguardias24h on August 01, 2022, 03:16:26 AM
Quote from: Chief of Nothing on July 31, 2022, 10:56:37 PMPort 110 is reserved for POP, that is receiving mail, not sending it. I don't know why SMF has code for trying to send on port 110 built in.

Generally speaking port 25 is these days reserved for mail servers to communicate with each other, not for end users to send email on however there are still hosts that configure their servers to accept mail from end users on this port.

When you were trying the secure port, did you:

  • Prepend tls:// or ssl:// to your mail server, ie tls://mail.stopguardias24h.com ?
  • Try both of the secure ports? 465 and 587 ?

If you tried to use STARTTLS in SMF then don't, leave it as just SMTP and prepend the mail server as above.

Make sure you have the SMTP username correct, it is the username of the mail account and usually is in the form of the complete email address, ie, [email protected] or stopguardias24h+stopguardias24h.com

Gmail is a strange one and requires setting up something in Gmail now to accept mail submission so don't be surprised that one didn't work.


Hey, ty for your reply. In fact, i give admin access to my technical support of my hosting, we check everything, and the server is not receiving any connection try, even if for error connection. So, no connection tries are recieved for the host server.

I also tried the same configuration for thunderbird, and it works fine. Maybe some issue? What could it happen?

Thank you all
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: Arantor on August 01, 2022, 06:19:32 AM
The 110 is nothing to do with port 110 or POP, that's the SMTP error code for could not connect.

When you say "it works with Thunderbird", what *exactly* are you doing with it?
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: stopguardias24h on August 01, 2022, 10:32:06 AM
Quote from: Arantor on August 01, 2022, 06:19:32 AMThe 110 is nothing to do with port 110 or POP, that's the SMTP error code for could not connect.

When you say "it works with Thunderbird", what *exactly* are you doing with it?

I am putting the configuration that I put in SMF in Thunderbird, just to make sure that it is not my mail server (the one of the hosting) that is giving me problems.

thank you.
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: Chief of Nothing on August 01, 2022, 10:44:33 AM
Ah my bad Arantor, I didn't catch that as an error code, because there is code for POP on port 110 in SMF and thought - somehow - it was being used.

What error would be thrown if fsockopen was not available?

OP, do come back to us with what settings are working in Thunderbird (you can obfuscate details of course).
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: stopguardias24h on August 01, 2022, 11:15:05 AM
Hello there!

Configuration in Thunderbird is:

SERVER SMTP:
name: stopguardias24h-com.correoseguro.dinaserver.com
port 465
Security: SSL/TLS
password method: normal.
user's name: [email protected]

This is the configuration that works for outgoing mail in Thunderbird, and with which SMF returns the error:

Could not get mail server response codes

It gives me the impression that simply SMF is not sending the mail, because no request is detected from the hosting, not even if it is wrong (the request would be received, even if there were errors in the log or in the password). However, if the send request comes from a client like Thunderbird, then it does arrive and if successful, it is sent.
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: Chief of Nothing on August 01, 2022, 11:33:44 AM
Ok, that's a pretty standard setup. So, did you try this in SMF?

Mail Type: SMTP (Not SMTP - STARTTLS)
SMTP server: tls://stopguardias24h-com.correoseguro.dinaserver.com
SMTP port: 465
SMTP username: [email protected]

and your password of course.

You an also try ssl://stopguardias24h-com.correoseguro.dinaserver.com if the tls:// version doesn't work.
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: tinoest on August 01, 2022, 11:37:32 AM
Connection timed out sounds more like a firewall issue.

If the port and server are correct.
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: stopguardias24h on August 01, 2022, 11:45:10 AM
With the TLS:// and SMTP STARTLS it works correctly and it already sends the mails.
I can't believe what was missing was the TLS://, I had no idea it was needed. A suggestion for the developers of this great forum: in the error message please note this problem, I'm sure I'm not the only one this may have happened to.

Thank you!!
Title: Re: Could not connect to SMTP host: 110 : Connection timed out
Post by: Chief of Nothing on August 01, 2022, 12:09:49 PM
Your welcome.

I already have an issue open for this where the developers hang out.