Unable to send emails: connection timeout / connection refused / I_wasn't_able_to_establish_an_SMTP_connection

Created:

2016-11-16 13:07:58 UTC

Modified:

2017-04-24 11:03:34 UTC

1

Was this article helpful?


Have more questions?

Submit a request

Unable to send emails: connection timeout / connection refused / I_wasn't_able_to_establish_an_SMTP_connection

Applicable to:

  • Plesk for Linux

Symptoms

One of the following errors appear while trying to send an email from Plesk mail server to an external mail server:

connection timeout

or

connection refused

The following error can be found in /usr/local/psa/var/log/maillog :

postfix/smtp[27746]: E3B24978700: to=<example@gmail.com>, relay=none, delay=537, delays=446/0.02/91/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[10.10.10.10]:25: Connection timed out)

or

postfix/smtp[15684]: connect to external.ms[10.10.10.10]:25: Connection timed out

or

qmail: 1491974064.856278 delivery 8214: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/

It is possible to send an email from outside to the server.

When trying to connect to port 25, No route to host is returned:

    # telnet mta5.am0.yahoodns.net 25
Trying 66.196.118.37...
telnet: connect to address 66.196.118.37: No route to host
Trying 66.196.118.33...
telnet: connect to address 66.196.118.33: No route to host
Trying 66.196.118.35...
telnet: Unable to connect to remote host: No route to host

# telnet alt2.gmail-smtp-in.l.google.com 25
Trying 173.194.219.26...
telnet: connect to address 173.194.219.26: No route to host
Trying 2607:f8b0:4002:c03::1b...
telnet: connect to address 2607:f8b0:4002:c03::1b: Network is unreachable
telnet: Unable to connect to remote host: Network is unreachable

25 port is shown as filtered:

# nmap -p 25 mta5.am0.yahoodns.net
Starting Nmap 6.40 ( http://nmap.org ) at 2016-10-30 21:29 CET
Nmap scan report for mta5.am0.yahoodns.net (98.138.112.34)
Host is up (0.12s latency).
Other addresses for mta5.am0.yahoodns.net (not scanned): 66.196.118.240 98.138.112.33 98.136.217.202 63.250.192.45 98.138.112.32 66.196.118.34 66.196.118.35
rDNS record for 98.138.112.34: mta-v3.mail.vip.ne1.yahoo.com
PORT STATE SERVICE
25/tcp filtered smtp

Traceroute to port 25 shows the following:

[root@server ~]# traceroute -T -p 25 gmail-smtp-in.l.google.com
traceroute to gmail-smtp-in.l.google.com (74.125.22.27), 30 hops max, 60 byte packets
1 example.com (203.0.113.2) 0.055 ms 0.015 ms 0.012 ms
2 example2.com (203.0.113.3) 0.181 ms example2.com (203.0.113.4) 0.170 ms example2.com (203.0.113.5) 0.168 ms
3 example3.com (203.0.113.5) 0.925 ms 1.105 ms example3.com (203.0.113.6) 1.380 ms
4 * * *
5 * * *
6 * * *
7 * * *
8 * * *

Cause

Remote SMTP server connectivity issues.

Resolution

  1. Make sure that correct IP address and port number combination are used for the SMTP server in mail client preferences.

  2. If the domain name is used instead of the mail server IP address, make sure that the domain can be resolved into correct IP address .

  3. Make sure Plesk SMTP service is running on the server
  4. Check the firewall settings

Ultimately, stop any firewall running on the Plesk server and try to send an e-mail again. If this does not work, then the SMTP port is blocked from somewhere else in network. Contact your ISP or network administrator for assistance.

Have more questions? Submit a request
Please sign in to leave a comment.