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)

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:

The domainname program:

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:

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
; our hostnames, in alphabetical order
ansil.local.net0.           A
bjp.local.net0.             A
reader.local.net0.          A
fw.local.net0.              A
harvey.local.net0.          A
mob2.local.net0.            A


Reverse pointers file:

; reverse pointers for subnet
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  IN NS reader.local.net0. reader.reader.local.net0.
; our hosts, in numeric order  IN PTR  mob2.local.net0.  IN PTR  reader.local.net0. IN PTR  bjp.local.net0. IN PTR  fw.local.net0. IN PTR  ansil.local.net0. IN PTR  harvey.local.net0.

More information about the bind-users mailing list