Subject: Re: sendmail inappropriately tries to externally relay local mail
To: Christian Hattemer <>
From: Chuck Swiger <>
List: netbsd-users
Date: 08/31/2005 18:42:03
Christian Hattemer wrote:
> I have a 3.0_BETA box, installed from source dated June, 15.
> Everything was fine, until lately the name "" appeared in
> DNS. Since that sendmail tries to relay local mail (e.g. reports from
> /etc/daily) via "". It seems the name is built from my
> hostname "" by taking "localhost" and appending the hostname
> minus the first part.

Doesn't "dig localhost." and "dig localhost" and "dig" all 

> I haven't changed anything myself when the problem occured. Generally the
> related parts should be mostly unchanged from installation.
> It seems that sendmail is misconfigured and always looks for such strange
> localhosts. But unless there is one everything works ok.

Perhaps your sendmail is misconfigured.  You should set the canonical hostname 
to be a fully-qualified value, and you should ensure that sendmail sees this.

Consider the output of:

	echo "3,0 user@localhost" | sendmail -d0.1 -bt

> On a look at Google I saw a lot of descriptions of the symptoms but no
> working cure. It also seems to be a game amongst DNS admins to put such a
> localhost in their zones since I saw a lot of these.

It is normal and encouraged to map to via an A 
record.  This helps misconfigured clients which can't resolve localhost without 
doing a DNS query get a reasonable answer immediately, rather than querying 
each domain (and subdomain, perhaps, for especially broken resolvers) in their 
search list.