Get your free beta license ↗
Mail · Postfix

Mail bounces with “loops back to myself”

Last updated 30 Nov 2026
Summary

Mail to a domain bounces with loops back to myself when its MX record points to this server but the server does not handle the domain's mail. To fix the Postfix bounce, set up mail for the domain on this server or point its MX record to the host that handles its mail.

Symptoms

Mail to the domain bounces. The mail log at /var/log/maillog on AlmaLinux or /var/log/mail.log on Ubuntu shows this entry.

Output
postfix/smtp[2548]: 789CB10BBF2B: to=<user@example.com>, relay=none, delay=0.02, delays=0.01/0.01/0/0, dsn=5.4.6, status=bounced (mail for example.com loops back to myself)

Cause

Postfix sends mail for a domain it does not handle to the domain's MX host. When the MX host is this server, delivery would send the message back to Postfix itself, so it bounces the message.

This happens when the domain's MX record points to this server and the domain either lacks a mail setup on this server or has its mail routing set to remote.

Resolution

  1. Check where the domain's MX record points.

    dig +short MX example.com
  2. If this server should handle the domain's mail, add the domain for mail or set its mail routing to local.

    urbestack-mail-domain-set --name example.com --routing local
  3. If another host handles the domain's mail, change the MX record at the domain's DNS host to point to that mail host.

  4. Send the message again.