Why does sendmail think its host is named `localhost' is it named?

Harry Putnam reader at newsguy.com
Mon Feb 6 23:01:32 UTC 2006


NOVICE alert!

Setup: Gentoo linux (kernel 2.6.15)
       bind-9.3.2
       sendmail-8.13.4

I've just started running bind-9 and learning what I need to know to
serve a small home lan as an Authenticating nameserver.

It seems to be working ok and I can do lookups of my own (private)
hosts, then anything that needs to go outside my network works too.

I see one phenomena that puzzles me.  My sendmail logs show that
sendmail thinks my host is named `localhost'.
It can also be seen in the righthand side of local mail like:
  reader at localhost.local.net0
And the message ids of command line mail are (simulated):
   Message-ID: 0970707070707 at localhost.local.net0

My hosts name is reader.local.net0

The hostname program:
    hostname
     reader

The domainname program:
    domainname
     local.net0

Both know how this host is named.  I wondered if sendmail would be
getting what it uses for hostname from a dns lookup instead of what is
returned by hostname?  And if so why `named' is telling it `localhost'.

Almost certainly some novice error on my part... but what?

======================================
zone file:

$TTL 1D
local.net0.     IN SOA    reader.local.net0.  hostmaster (
                        200405191 ; serial
                        8H        ; refresh
                        4H        ; retry
                        4W        ; expire
                        1D )      ; minimum
; define the authoritative name server
local.net0.     IN     NS      reader.local.net0.
; [HP 01/30/06 09:56 The 10 indicates priority [lower is higher]]
                MX      10 reader.local.net0
; define domain functions with CNAMEs
;[HP 01/29/06 08:29  ]depot           CNAME   stallman
;[HP 01/29/06 08:29  ]www             CNAME   cerf
;localhost.local.net0.		CNAME		reader.local.net0.
;tic.local.net0.        	CNAME    reader.local.net0.
smtp.local.net0.         CNAME		reader.local.net0.

; just in case someone asks for localhost.local.net0
localhost.local.net0.        A       127.0.0.1
; our hostnames, in alphabetical order
ansil.local.net0.           A       192.168.0.21
bjp.local.net0.             A       192.168.0.16
reader.local.net0.          A       192.168.0.4
fw.local.net0.              A       192.168.0.20
harvey.local.net0.          A       192.168.0.22
mob2.local.net0.            A       192.168.0.3

====================

Reverse pointers file:

;
; reverse pointers for 192.168.0.0 subnet
;
$TTL 1D
0.168.192.in-addr.arpa.  IN SOA  reader.local.net0. reader.reader.local.net0. (
              200405190  ; serial
              28800      ; refresh (8 hours)
              14400      ; retry (4 hours)
              2419200    ; expire (4 weeks)
              86400      ; minimum (1 day)
              )
; define the authoritative name server
4.0.168.192.in-addr.arpa.  IN NS reader.local.net0. reader.reader.local.net0.
; our hosts, in numeric order
1.3.0.168.192.  IN PTR  mob2.local.net0.
2.4.0.168.192.  IN PTR  reader.local.net0.
3.16.0.168.192. IN PTR  bjp.local.net0.
4.20.0.168.192. IN PTR  fw.local.net0.
5.21.0.168.192. IN PTR  ansil.local.net0.
6.22.0.168.192. IN PTR  harvey.local.net0.



More information about the bind-users mailing list