SOLVED Email Connection Timing Out

Joef

Member
Jan 15, 2017
16
2
3
usa
cPanel Access Level
Root Administrator
Hi,

I just installed VPS CENTOS 6.8 x86_64 kvm – server WHM 60.0 (build 34) and everything is working great except sending emails. All outgoing emails go into queue and can't be sent.

I've tried sending to gmail, hotmail, and yahoo.

When I try to delivery it through Mail Queue Manager I get this:

Code:
delivering 1cSjWB-0006L0-SA
Connecting to gmail-smtp-in.l.google.com [173.194.198.26]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=gmail-smtp-in.l.google.com [173.194.198.26] Connection timed out
Connecting to alt1.gmail-smtp-in.l.google.com [173.194.205.26]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=alt1.gmail-smtp-in.l.google.com [173.194.205.26] Connection timed out
Connecting to alt2.gmail-smtp-in.l.google.com [74.125.141.27]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=alt2.gmail-smtp-in.l.google.com [74.125.141.27] Connection timed out
Connecting to alt3.gmail-smtp-in.l.google.com [64.233.186.27]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=alt3.gmail-smtp-in.l.google.com [64.233.186.27] Connection timed out
Connecting to alt4.gmail-smtp-in.l.google.com [209.85.202.26]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=alt4.gmail-smtp-in.l.google.com [209.85.202.26] Connection timed out
LOG: MAIN
  == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (110): Connection timed out
When I run this but it's not my ip. My ip :
Code:
[[email protected] ~]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 108.61.10.10
Code:
[[email protected] ~]# exim -bt [email protected]
[email protected]
  router = lookuphost, transport = remote_smtp
  host mx1.hotmail.com [65.55.33.119]   MX=5
  host mx1.hotmail.com [65.55.37.72]    MX=5
  host mx1.hotmail.com [65.55.92.136]   MX=5
  host mx1.hotmail.com [104.44.194.234] MX=5
  host mx1.hotmail.com [65.54.188.126]  MX=5
  host mx1.hotmail.com [104.44.194.235] MX=5
  host mx1.hotmail.com [65.54.188.72]   MX=5
  host mx1.hotmail.com [65.55.92.168]   MX=5
  host mx1.hotmail.com [65.55.33.135]   MX=5
  host mx1.hotmail.com [104.44.194.231] MX=5
  host mx1.hotmail.com [104.44.194.233] MX=5
  host mx1.hotmail.com [207.46.8.167]   MX=5
  host mx1.hotmail.com [65.55.37.88]    MX=5
  host mx1.hotmail.com [104.44.194.236] MX=5
  host mx1.hotmail.com [65.55.92.184]   MX=5
  host mx1.hotmail.com [104.44.194.232] MX=5
  host mx1.hotmail.com [104.44.194.237] MX=5
  host mx1.hotmail.com [134.170.2.199]  MX=5
  host mx1.hotmail.com [65.55.37.104]   MX=5
  host mx4.hotmail.com [65.55.37.120]   MX=5
  host mx4.hotmail.com [65.54.188.110]  MX=5
  host mx4.hotmail.com [65.55.92.152]   MX=5
  host mx4.hotmail.com [207.46.8.199]   MX=5
  host mx4.hotmail.com [65.54.188.94]   MX=5
Code:
[[email protected] ~]# exigrep [email protected] /var/log/exim_mainlog
2017-01-15 04:03:04 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [65.55.92.152] Connection timed out
2017-01-15 04:04:07 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [104.44.194.237] Connection timed out
2017-01-15 04:05:10 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [104.44.194.232] Connection timed out
2017-01-15 04:06:13 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [207.46.8.199] Connection timed out
2017-01-15 04:07:16 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [65.54.188.94] Connection timed out
2017-01-15 04:07:16 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 04:13:34 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.33.135] Connection timed out
2017-01-15 04:14:37 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.235] Connection timed out
2017-01-15 04:15:40 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.92.184] Connection timed out
2017-01-15 04:16:43 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.37.104] Connection timed out
2017-01-15 04:17:46 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [207.46.8.167] Connection timed out
2017-01-15 04:17:46 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 05:13:34 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.54.188.126] Connection timed out
2017-01-15 05:14:37 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.33.119] Connection timed out
2017-01-15 05:15:40 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [134.170.2.199] Connection timed out
2017-01-15 05:16:43 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.37.72] Connection timed out
2017-01-15 05:17:46 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.233] Connection timed out
2017-01-15 05:17:46 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 06:13:34 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [104.44.194.232] Connection timed out
2017-01-15 06:14:37 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [65.55.37.72] Connection timed out
2017-01-15 06:15:40 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [104.44.194.235] Connection timed out
2017-01-15 06:16:43 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [65.54.188.94] Connection timed out
2017-01-15 06:17:46 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [65.55.92.184] Connection timed out
2017-01-15 06:17:46 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 06:45:59 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.235] Connection timed out
2017-01-15 06:47:02 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.231] Connection timed out
2017-01-15 06:48:05 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.237] Connection timed out
2017-01-15 06:49:08 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.233] Connection timed out
2017-01-15 06:50:11 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.54.188.72] Connection timed out
2017-01-15 06:50:11 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 07:16:28 1cSbsi-0005mZ-Uj removed by root
2017-01-15 07:16:28 1cSbsi-0005mZ-Uj Completed
Code:
[[email protected] ~]# cat /var/log/exim_mainlog | grep 1cSbsi-0005mZ-Uj
2017-01-15 04:03:04 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [65.55.92.152] Connection timed out
2017-01-15 04:04:07 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [104.44.194.237] Connection timed out
2017-01-15 04:05:10 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [104.44.194.232] Connection timed out
2017-01-15 04:06:13 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [207.46.8.199] Connection timed out
2017-01-15 04:07:16 1cSbsi-0005mZ-Uj H=mx3.hotmail.com [65.54.188.94] Connection timed out
2017-01-15 04:07:16 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 04:13:34 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.33.135] Connection timed out
2017-01-15 04:14:37 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.235] Connection timed out
2017-01-15 04:15:40 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.92.184] Connection timed out
2017-01-15 04:16:43 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.37.104] Connection timed out
2017-01-15 04:17:46 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [207.46.8.167] Connection timed out
2017-01-15 04:17:46 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 05:13:34 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.54.188.126] Connection timed out
2017-01-15 05:14:37 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.33.119] Connection timed out
2017-01-15 05:15:40 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [134.170.2.199] Connection timed out
2017-01-15 05:16:43 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.55.37.72] Connection timed out
2017-01-15 05:17:46 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.233] Connection timed out
2017-01-15 05:17:46 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 06:13:34 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [104.44.194.232] Connection timed out
2017-01-15 06:14:37 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [65.55.37.72] Connection timed out
2017-01-15 06:15:40 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [104.44.194.235] Connection timed out
2017-01-15 06:16:43 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [65.54.188.94] Connection timed out
2017-01-15 06:17:46 1cSbsi-0005mZ-Uj H=mx4.hotmail.com [65.55.92.184] Connection timed out
2017-01-15 06:17:46 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 06:45:59 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.235] Connection timed out
2017-01-15 06:47:02 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.231] Connection timed out
2017-01-15 06:48:05 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.237] Connection timed out
2017-01-15 06:49:08 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [104.44.194.233] Connection timed out
2017-01-15 06:50:11 1cSbsi-0005mZ-Uj H=mx1.hotmail.com [65.54.188.72] Connection timed out
2017-01-15 06:50:11 1cSbsi-0005mZ-Uj == [email protected] R=lookuphost T=remote_smtp defer (110): Connection timed out
2017-01-15 07:16:28 cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -Mrm 1cSbsi-0005mZ-Uj
2017-01-15 07:16:28 1cSbsi-0005mZ-Uj removed by root
2017-01-15 07:16:28 1cSbsi-0005mZ-Uj Completed
When I test for open ports I get this:

Code:
21 ftp Open 35
  22 ssh Open 34
  23 telnet Filtered 0
  25 smtp Open 34
  53 dns Open 33
  80 http Open 35
  110 pop3 Open 34
  111 portmapper, rpcbind Filtered 0
  135 Microsoft RPC services Filtered 0
  139 netbios Filtered 0
  143 imap Open 33
  389 ldap Filtered 0
  443 https Open 33
  445 SMB directly over IP Filtered 0
  587 msa-outlook Open 35
  1025 IIS, NFS, or listener RFS remote_file_sharing Filtered 0
  1352 lotus notes Filtered 0
  1433 sql server Filtered 0
  1723 Point-to-point tunnelling protocol Filtered 0
  3306 my sql Open 33
  3389 remote desktop Filtered 0
  5060 Session Initiation Protocol (SIP) Filtered 0
  5900 Virtual Network Computer display 0 Filtered 0
  6001 X Window server Filtered 0
  8080 webcache Refused (RST) 0
Thank you
 
Last edited by a moderator:

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Hello,

Please try to use Google's nameserver. You have to add below nameservers in the /etc/resolv.conf file

nameserver 8.8.8.8
nameserver 8.8.4.4
 

Joef

Member
Jan 15, 2017
16
2
3
usa
cPanel Access Level
Root Administrator
Hello,

Please try to use Google's nameserver. You have to add below nameservers in the /etc/resolv.conf file

nameserver 8.8.8.8
nameserver 8.8.4.4

I added the Google nameservers, strange because I added them when I first installed the program.
Code:
[[email protected] etc]# cat /etc/resolv.conf
; generated by /sbin/dhclient-script
nameserver 8.8.8.8
nameserver 8.8.4.4
But I still get timed out:
Code:
LOG: MAIN
  cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1cT3NK-0005rv-AW
delivering 1cT3NK-0005rv-AW
Connecting to mx2.hotmail.com [104.44.194.231]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=mx2.hotmail.com [104.44.194.231] Connection timed out
Connecting to mx2.hotmail.com [104.44.194.232]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=mx2.hotmail.com [104.44.194.232] Connection timed out
Connecting to mx2.hotmail.com [65.55.37.88]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=mx2.hotmail.com [65.55.37.88] Connection timed out
Connecting to mx2.hotmail.com [104.44.194.234]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=mx2.hotmail.com [104.44.194.234] Connection timed out
Connecting to mx2.hotmail.com [65.55.92.136]:25 from xx.xx.27.198 ... failed: Connection timed out (timeout=5m)
LOG: MAIN
  H=mx2.hotmail.com [65.55.92.136] Connection timed out
LOG: MAIN
  == [email protected] R=dkim_lookuphost T=dkim_remote_smtp defer (110): Connection timed out
I tried sending them out from Magento (shopping cart) and through the Webmail interface but still they go into queue. What else can I check?

Thanks
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
India
cPanel Access Level
Root Administrator
Twitter
Hello,

This does look to be a firewall or network issue as something is denying outbound connections on port 25 from your server:

Also, Please provide me following command output.

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

Joef

Member
Jan 15, 2017
16
2
3
usa
cPanel Access Level
Root Administrator
Yeah, that's what I thought but I haven't installed any firewalls thou.

Here is the telnet results:
Code:
[[email protected] ~]# telnet gmail-smtp-in.l.google.com 25
Trying 173.194.196.26...
telnet: connect to address 173.194.196.26: Connection timed out
Trying 2607:f8b0:4001:c1a::1b...
telnet: connect to address 2607:f8b0:4001:c1a::1b: Network is unreachable
Something does seems to be blocking it.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
Hello,

I recommend reaching out to your data center or hosting provider to verify if there's anything filtering port 25 traffic in their network or firewall rules. Providers will often block port 25 as a SPAM prevention technique.

Thank you.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
Weird that the port tester shows it's open.
It's possible the testing application you are using might be testing for incoming traffic over port 25. The issue you are facing relates to outgoing traffic over port 25.

Thanks!
 

Joef

Member
Jan 15, 2017
16
2
3
usa
cPanel Access Level
Root Administrator
It's working!

Code:
LOG: MAIN
  cwd=/usr/local/cpanel/whostmgr/docroot 4 args: /usr/sbin/exim -v -M 1cTDju-000272-Mk
delivering 1cTDju-000272-Mk
Connecting to mx2.hotmail.com [104.44.194.236]:25 from xx.xx.xx.198 ... connected
  SMTP<< 220 SNT004-MC10F2.hotmail.com Sending unsolicited commercial or bulk e-mail to Microsoft's computer network is prohibited. Other restrictions are found at http://privacy.microsoft.com/en-us/anti-spam.mspx. Mon, 16 Jan 2017 12:22:26 -0800
  SMTP>> EHLO example.com
  SMTP<< 250-SNT004-MC10F2.hotmail.com (3.21.0.266) Hello [xx.xx.xx.198]
         250-SIZE 36909875
         250-PIPELINING
         250-8bitmime
         250-BINARYMIME
         250-CHUNKING
         250-STARTTLS
         250-AUTH LOGIN
         250-AUTH=LOGIN
         250 OK
  SMTP>> STARTTLS
  SMTP<< 220 SMTP server ready
  SMTP>> EHLO example.com
  SMTP<< 250-SNT004-MC10F2.hotmail.com (3.21.0.266) Hello [xx.xx.xx.198]
         250-SIZE 36909875
         250-PIPELINING
         250-8bitmime
         250-BINARYMIME
         250-CHUNKING
         250-AUTH LOGIN
         250-AUTH=LOGIN
         250 OK
  SMTP>> MAIL FROM:<[email protected]> SIZE=31853
  SMTP>> RCPT TO:<[email protected]>
  SMTP>> DATA
  SMTP<< 250 [email protected] OK
  SMTP<< 250 [email protected]
  SMTP<< 354 Start mail input; end with <CRLF>.<CRLF>
  SMTP>> writing message and terminating "."
  SMTP<< 250  <[email protected]> Queued mail for delivery
  SMTP>> EHLO example.com
  SMTP>> QUIT
LOG: MAIN
  => [email protected] R=dkim_lookuphost T=dkim_remote_smtp H=mx2.hotmail.com [104.44.194.236] X=TLSv1.2:ECDHE-RSA-AES256-SHA384:256 CV=yes C="250  <[email protected]> Queued mail for delivery"
LOG: MAIN
  Completed
Thanks
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,245
463
Hello,

I'm happy to see the issue is now resolved. Thank you for updating us with the outcome.
 

jpontang

Registered
Feb 4, 2022
1
0
1
indonesia
cPanel Access Level
Root Administrator
@anoopk350 - did you also check port 25 outbound from the server? One easy test to check that would be to run this command:

Code:
telnet mx1.cpanel.net 25
Does that command let you connect to the cPanel mail server when you run it from your server?

[[email protected] ~]# telnet mx1.cpanel.net 25
Trying 208.74.121.68...
Connected to mx1.cpanel.net.
Escape character is '^]'.
220-mx1.cpanel.net ESMTP Exim 4.94.2 #2 Wed, 16 Mar 2022 21:03:54 -0500
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.

if it's like this why.??
 

atlantis21

Well-Known Member
Sep 18, 2012
51
0
56
cPanel Access Level
Root Administrator
@atlantis21 - just to be sure, what if you try another machine, like one of Google's servers:

Code:
telnet gmail-smtp-in.l.google.com 25
If that also doesn't respond, that would indicate the port is blocked.
OK thanks, But it work's now.

Not sure what helped, but I think adding port 26 solved my problem
Anyway, so far so good!
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,032
1,741
363
cPanel Access Level
Root Administrator
Adding port 26 would allow users with mail clients like Outlook and Thunderbird to connect to your server, but it wouldn't change anything with mail handling on the system. It could be there was just a temporary problem on the machine, but I'm glad to hear things are working well now!
 

MohammedSaeed

Registered
Aug 2, 2022
2
0
1
iraq
cPanel Access Level
Website Owner
i have the same issue when i run this code

telnet mx1.cpanel.net 25 it gives this message

Trying 208.74.121.68...
telnet: connect to address 208.74.121.68: Connection timed out

and also i run this code telnet gmail-smtp-in.l.google.com 25 it gives this code

Trying 74.125.140.26...
telnet: connect to address 74.125.140.26: Connection timed out
Trying 2a00:1450:400c:c08::1b...
telnet: connect to address 2a00:1450:400c:c08::1b: Network is unreachable