Sendmail connection timeout

Solution 1:

The standard mail troubleshooting steps apply here... From the log, we see that you're able to resolve the MX/DNS records for the gmail.com destination you're sending to. So this isn't a DNS or routing issue.

Since this is a basic SMTP delivery, try using telnet to port 25 to make sure you're able to connect to the destination host...

I'd follow this sequence:

dig mx gmail.com
# Look for the mail destination IP in the output - "209.85.225.27" in this case

telnet 209.85.225.27 25
# This is an attempt to telnet to port 25 (smtp) on the recipient's server...

You should see something similar to:

Trying 209.85.225.27...
Connected to iy-in-f27.1e100.net (209.85.225.27).
Escape character is '^]'.
220 ***************************************

If you do not see the above, your outbound port 25 smtp traffic is being blocked either at the machine level (check iptables, etc.) or at the network level (check network firewall or ISP policies).

If you do see a similar message, then you're able to pass mail and shouldn't be receiving timeout errors.