Sending email issue "SMTP timeout after initial connection: Connection timed out"

baggs1981

Verified User
Joined
Sep 18, 2006
Messages
70
Hi All,

Having issues with a server suddenly not sending emails to any domain, they get held in the mail queue.

Receiving emails is fine as is the rest of the server.

The main domain is batterytrader.com, but no domains can send out.

CheckStatusVerification
Local Port 25 OutboundOpenConfirmed via nc -zv to external mail servers.
Reverse DNS (rDNS)CorrectIP resolves perfectly to server01.bat01.net.
Exim Hostname MatchCorrectExim hostname (server01.bat01.net) matches the certificate's Common Name (CN).
SSL/TLS CertificateValidCertificate is not expired (notAfter=Nov 16 2025).

Exim is configured to use SNI, this isn't a new setting.
The server host says they are not suddenly blocking port 25 (why would they but checked anyway)
The IP and domain are not on any blacklists that I have found thus far. Google postmaster tools indicates no issues with the domain.
I disabled Firewall, CSF -x.

To try and fix, I have updated exim. Current version is 4.98.2, this hasn't helped.

The only clue so far is in /var/log/exim/mainlog every email out says:

SMTP timeout after initial connection: Connection timed out

I logged a ticket with directadmin support, we are in UK, I've no idea how quickly they respond (if anyone in DA Support reads this, please help asap, ticket: 67555 )

Any suggestions would be greatly appreciated.
 
Hello,

SMTP timeout after initial connection: Connection timed out

In most cases it indicates issues on outgoing connections, which are blocked either by a server provider or datacenter.
You might try and use telnet, something like:

Bash:
telnet gmail-smtp-in.l.google.com 25

example from my server:

Bash:
[root@server ~]# telnet gmail-smtp-in.l.google.com 25
Trying 2a00:1450:4025:401::1a...
Connected to gmail-smtp-in.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP a640c23a62f3a-b5ccd8b2e85si366430866b.692 - gsmtp
^]
telnet> Connection closed.
[root@server~]#
 
Thanks, I narrowed it down to outgoing port 25 not going through, DA support have connected on and so far concluded the same thing.

Server host says they 100% are not blocking port 25 suddenly so currently stuck in limbo while DA support look into it.

Anyone know of a 2rd party SMTP service and how I would setup the server to us this? Any cons to looking at this option?
 
Thanks, I have a 2nd DA server, which is working fine despite being in the same location, what would I need to do on that server to allow the problem one to relay through it?
 
which is working fine despite being in the same location
Just to be sure, since this is working and the server host says port 25 is not blocked.
You have csf -x but did you try with CSF active too?
Could it be for some reason some default firewall kicked in, maybe firewalld (should be disabled) or a 3rd party service blocking things like Immunify360 or something?
Probably DA support would have discovered this, but just asking to be sure or server host needs to doublecheck the port on the router/switch.
 
No nothing else, it was standard DA install just with CSF installed. I think DA support have given up as gone quiet on the ticket for a couple of hours now. I think I'm expected to now just try and setup 3rd party / other server which I'm not clear how to do.

I've done this: https://docs.directadmin.com/other-...ing-outbound-email-through-remote-mail-server but it doesn't describe what to do on the other server which is to be outgoing.
 
I don't think DA support can do very much is for some reason that port 25 is closed outgoing and open incoming. Still think it's a datacenter mistake.

Since I've never used a remote server of my own to send mail over, I can't help you further myself.
But I did found this thread:
and a piece of docs about it and referring to the thread:

I hope this helps you somehow, otherwise somebody else needs to come along and help you further.
 
Back
Top