O'Reilly logo

Postfix: The Definitive Guide by Kyle D. Dent

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Common Problems

The following error messages in the mail log files indicate host lookup problems:

mail for domain loops back to myself

This is one of the most common errors related to DNS. It happens when you have configured your Postfix server as an MX host in your DNS server, but you have not told your Postfix server that it is the final destination for the domain. Add the domain in question to the mydestination parameter, or configure it as a virtual domain or a relay domain. If your Postfix server is behind a proxy or NAT device, it may not realize that it is an MX host for the domain. In that case, add the proxy device's IP address to proxy_interfaces. Log entries for this error resemble the following:

postfix/qmgr[3981]: 2CC3B229: from=<heloise@ora.com>, \
      size=306, nrcpt=1 (queue active)
postfix/smtp[3983]: warning: mailer loop: best MX host for \
      example.com is local
postfix/smtp[3983]: 2CC3B229: to=<abelard@example.com>, \
      relay=none, delay=0, status=bounced (mail for example.com \
      loops back to myself)
Host found but no data record of requested type

The domain's DNS configuration has no MX records and there is no A record for the domain itself. You will have to contact an administrator of the domain to fix the problem. For your own domains, be sure they all include MX records pointing to your mail server. Log entries for this error resemble the following:

postfix/qmgr[3818]: D31CD20F: from=<heloise@ora.com>, \ size=312, nrcpt=1 (queue active) postfix/smtp[3824]: D31CD20F: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required