Skip to content

Connection Timeout Issues with Gmail SMTP on Ports 465 and 587

1

I am experiencing connection timeout issues when attempting to connect to Gmail's SMTP servers on ports 465 and 587. The nc command consistently fails with a timeout error.

Details: Command Used:

[root@mail ~]# nc -zv gmail-smtp-in.l.google.com 465 Ncat: Version 7.92 ( https://nmap.org/ncat ) Ncat: Connection to 2404:6800:4003:c1c::1b failed: TIMEOUT. Ncat: Trying next address... Ncat: TIMEOUT.

[root@mail ~]# nc -zv gmail-smtp-in.l.google.com 587 Ncat: Version 7.92 ( https://nmap.org/ncat ) Ncat: Connection to 2404:6800:4003:c1c::1b failed: TIMEOUT. Ncat: Trying next address... Ncat: TIMEOUT. Listening Ports:

[root@mail ~]# sudo lsof -iTCP -sTCP:LISTEN -P | grep 465 exim 410006 exim 5u IPv4 2581089 0t0 TCP *:465 (LISTEN)

[root@mail ~]# sudo lsof -iTCP -sTCP:LISTEN -P | grep 587 exim 410006 exim 4u IPv4 2581088 0t0 TCP *:587 (LISTEN)

System Information:

  • Operating System: AlmaLinux 8.10
  • SMTP Server: Exim 4.97

Steps Taken: Verified that Exim is listening on ports 465 and 587. Tried connecting to Gmail's SMTP server using both ports but encountered timeouts. No other network issues are apparent. Firewall rules have been checked and seem to allow traffic on the required ports.

Question:

What could be causing these connection timeout issues when trying to connect to Gmail's SMTP servers on ports 465 and 587, and how can I resolve this?

1 Answer
0

The connection timeout issues when trying to connect to Gmail's SMTP servers on ports 465 and 587 could be due to several potential factors. First, ensure that there are no firewall or network security group rules blocking outbound connections to these ports. Even if your server shows that Exim is listening on these ports, outbound connections might be restricted. Verify with your network administrator or cloud provider that traffic to these SMTP ports is allowed.

Another possible issue could be IPv6 connectivity problems. Your nc command is trying to connect to an IPv6 address (2404:6800:4003:c1c::1b), and if IPv6 is not properly configured on your server or network, the connection will fail. You can test connectivity over IPv4 by specifying an IPv4 address or disabling IPv6 temporarily to see if the connection works. If the issue persists, checking the Exim and system logs for any additional error messages might provide further insights into what is causing the timeouts.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.