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: ...

Get Postfix: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.