Mail delivery to an external domain fails: mail loops back to myself

Created:

2016-11-16 12:51:15 UTC

Modified:

2017-08-16 16:12:33 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Mail delivery to an external domain fails: mail loops back to myself

Applicable to:

  • Plesk 11.x for Linux
  • Plesk 12.0 for Linux

Symptoms

Mail to anexternal domain is not delivered. The following information can be found in /usr/local/psa/var/log/maillog :

# status=bounced (mail for example.com loops back to myself)

or

# postfix/smtp[30738]: warning: host mail.example.com[129.168.0.1]:25 greeted me with my own hostname c1.example.com

Cause

Remote server thinks that he is sending mail to himself. Possible reasons:

  • IP Address of MX record for recepient's domain points to Plesk server
  • myhostname parameter is the same on both sender and recipient servers

Resolution

1. Make sure first that IP address of the recepient's domain does not belong to the Plesk server:

# host example.com
example.com has address 203.0.113.2
example.com mail is handled by 0 example.com.
# ifconfig | grep 203.0.113.2
inet addr:203.0.113.2 Bcast:203.0.113.15 Mask:255.255.255.0
# cat /etc/sysconfig/network-scripts/ifcfg-eth0-range0
IPADDR_START=203.0.113.1
IPADDR_END=203.0.113.14
NETMASK=255.255.255.0
CLONENUM_START=0

On the example above IP address 203.0.113.2 belongs to sender server. That is why Postfix falls in loop.

In this case, delete IP address 203.0.113.2 from Plesk server and restart network service:

# service network restart

After that, make sure that IP address 203.0.113.2 does not point to the server anymore.

2. In case IP address does not point to the same server, check myhostname on source and compare with hostname from log:

# postconf | grep myhostname
myhostname = c1.example.com
# postfix/smtp[30738]: warning: host mail.example.com[129.168.0.1]:25 greeted me with my own hostname c1.example.com

As you see they are equal. You need to change myhostname in /etc/postfix/main.cf file.

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