Plesk

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

Symptoms

Cause

The remote server thinks that he is sending mail to itself. Possible reasons:

Resolution

  1. Connect to the server via SSH.

  2. Make sure first that IP address of the recipient'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.
    # ip a | grep 203.0.113.2
    inet 203.0.113.2/32 brd 203.0.113.2 scope global venet0:0

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

    Correct the DNS setting to resolve the issue. If DNS is handled by a third-party name server, correct DNS settings in Plesk accordingly.

  3. In case IP address does not point to the same server, check myhostname on a source and compare with hostname from the 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

    If they are equal, it is required to change myhostname in /etc/postfix/main.cf file.

  4. As an additional step, it may be necessary to add a required domain name to mydestination line. It should look as follows:

    mydestination = localdomain, localhost, localhost.localdomain, localhost, example.com

    and restart postfix using the following command:

    # service postfix restart

Exit mobile version