Outgoing emails stuck in the queue due to routing failure of emails through the domain IP

Created:

2016-11-16 12:55:16 UTC

Modified:

2017-04-24 11:04:27 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Outgoing emails stuck in the queue due to routing failure of emails through the domain IP

Applicable to:

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

Symptoms

Outgoing emails are staying in mail queue and the following error appears in /var/log/maillog :

connect to alt2.gmail-smtp-in.l.google.com[1.2.3.4]:25: Connection timed out
BF8DD84260: to=, relay=none, delay=90, delays=0.03/0/90/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com[1.2.3.4]:25: Connection timed out)

Cause

  • Postfix is not able to route emails through the domain IP (2.2.2.2), because it is not configured to work on this IP. It can be checked by trying to connect to the remote mail server from the domain IP:

    telnet alt2.gmail-smtp-in.l.google.com 25 -b 2.2.2.2

    Trying 74.125.137.27...

  • Server firewall is blocking connection

Resolution

Add the following value for smtp_bind_address parameter in /etc/postfix/master.cf :

# grep bind /etc/postfix/master.cf
2.2.2.2- unix - n n - - smtp -o smtp_bind_address=2.2.2.2 -o smtp_bind_address6= -o smtp_address_preference=ipv4

Additionally, please, check the article "How to configure the IP address for outgoing mail in Postfix" .

Since Plesk 12.0.18 it is possible to choose IP addresses for sending emails: Tools & Settings > Mail Server Settings > Outgoing mail mode > Send from the specified IP addresses

External IP can be specified instead of internal one.

If everythnig is configured in Postfix correctly, check server firewall using iptables -L

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