Unable to send the mails with configured SMTP routes in Qmail: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection

Refers to:

  • Plesk 12.5 for Linux
  • Plesk Onyx for Linux
  • Plesk 11.0 for Linux
  • Plesk 11.5 for Linux
  • Plesk 12.0 for Linux

Created:

2016-11-16 12:49:33 UTC

Modified:

2017-01-19 20:52:51 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to send the mails with configured SMTP routes in Qmail: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection

Symptoms

SMTP service doesn't work on a Linux server with Qmail - messages are queued and not delivered:

# /var/qmail/bin/qmail-qstat
messages in queue: 3675

The /usr/local/psa/var/log/maillog has the following error:

Jan  8 07:18:05 dar qmail: 1389154685.614241 delivery 26753: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/
Jan 8 07:18:05 dar qmail: 1389154685.614296 status: local 0/10 remote 0/20

Cause

smtproutes are misconfigured on the server. For example:

    [root@hostname]# cat /var/qmail/control/smtproutes
#host.tld: 203.0.113.1:25
#host2.tld: 203.0.113.2:25
:host3.tld


The record `:host3.tld` means that all messages, regardless of the destination domain, are relayed to `host3.tld`. But `host3.tld` does not accept connections to TCP port 25:

# telnet host3.tld 25
Trying 203.0.113.3...
telnet: connect to address 203.0.113.3: Connection timed out
telnet: Unable to connect to remote host: Connection timed out

Resolution

  1. Check connectivity to the remote server specified in smtproutes :

    # telnet <host> 25

    1.1. If the connection is timed out, please, comment out the line with the remote server:

    # cat /var/qmail/control/smtproutes
    #host.tld: 203.0.113.1:25
    #host2.tld: 203.0.113.2:25
    #host3.tld

    1.2. If the connection to the relay host is established, verify that the IP address used to send emails is not blacklisted on the destination host:

    # dig mx <destination host>
    # telnet <destination mx host> 25
  2. Restart Qmail service:

    # /etc/init.d/qmail restart
  3. Check the maillog and Qmail queue to make sure that mail is being delivered and Qmail queue is decreasing:

    # less /usr/local/psa/var/log/maillog
    # /var/qmail/bin/qmail-qstat
Have more questions? Submit a request
Please sign in to leave a comment.