mail forwarding loop error

Created:

2016-11-16 13:19:50 UTC

Modified:

2017-08-16 16:16:59 UTC

0

Was this article helpful?


Have more questions?

Submit a request

mail forwarding loop error

Applicable to:

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

Symptoms

  • Domains example1.com and example2.com placed on the same server. Email forwarding from john.doe@example1.com to john.doe@example2.com returns the following mail:

    This is the mail system at host example1.com.

    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.

    For further assistance, please send mail to postmaster.

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    <john.doe@example2.com>: mail forwarding loop for john.doe@example2.com
  • The following in maillog:

    /var/log/maillog.processed:Mar 17 14:09:28 server postfix/pipe[13814]: 58419AAA05: to=<john.doe@example1.com>, relay=plesk_virtual, delay=0.23, delays=0.15/0/0/0.08, dsn=5.4.6, status=bounced (mail forwarding loop for john.doe@example1.com)

Cause

Domain example1.com is a symbolic link to the example2.com under mailnames folder:

[root@server ~]# ls -la /var/qmail/mailnames/
total 24
drwxr-xr-x 6 root root 4096 Jan 1 18:26 .
drwxr-xr-x 4 root root 4096 Jan 11 2013 ..
lrwxrwxrwx 1 root root 10 May 1 2014 example1.com -> example2.com
...

Due to this, forwarding rule john.doe@example2.com was added to /var/qmail/mailnames/example2/john.doe/.qmail instead of /var/qmail/mailnames/example1/john.doe/.qmail and caused the mail forwarding loop.

Resolution

  1. Make sure that all domains' folders are directories and not symlinks in /var/qmail/mailnames/ :

    # find  /var/qmail/mailnames/ -type l
    /var/qmail/mailnames/example1.com`
  2. If there are any symbolic link, then remove it:

    `# rm -f /var/qmail/mailnames/example1.com`
  3. Copy content of linked folder:

    `# cp -r  /var/qmail/mailnames/example2.com  /var/qmail/mailnames/example1.com`
  4. Re-apply the email forwarding rules:

    # /usr/local/psa/admin/bin/mchk --without-spam
Have more questions? Submit a request
Please sign in to leave a comment.