[NBLUG/talk] Setting up RH 9

Ron Wickersham rjw at alembic.com
Fri Oct 3 15:30:04 PDT 2003


On Fri, 3 Oct 2003, Todd Cary wrote:

> Ron -
>
> Here are my entries in hosts and resolv.conf:
>
> ; generated by /sbin/dhclient-script
> search localdomain
> nameserver 208.201.224.11
> nameserver 208.201.224.33
>
>
> # Do not remove the following line, or various programs
> # that require network functionality will fail.
> 127.0.0.1    localhost.localdomain    localhost
> 192.168.0.12    linux
> 192.168.0.20    bluethunder
> 192.168.0.22    tlix
> 192.168.0.11    firewall
>
> getname returns "linux", the name of the box at 192.168.0.12

sendmail is looking for the fully qualified hostname and is looking at
208.201.224.11 for the reverse lookup of 192.168.0.12.   i've never set
up a system with no name server for a private address so can't give you
an answer based on experience.

but after the machine times out and finally comes up take a look at
telnet localhost 25

sendmail (or any rfc compliant SMTP server) will answer with a numeric
code of 220 and the host name it thinks it is.

looking up the mx record for aristesoftware.com (your e-mail address) i
got mx.sonic.net for the mail server.  here's what an interactive login
to that server looks like:

[rjw at libcat t]# telnet mx.sonic.net 25
Trying 209.204.159.4...
Connected to eth0.b.mx.sonic.net (209.204.159.4).
Escape character is '^]'.
220 b.mx.sonic.net ESMTP Sendmail 8.12.10/8.12.7; Fri, 3 Oct 2003 14:57:47 -0700
helo libcat.alembic.net
250 b.mx.sonic.net Hello libcat.alembic.net [66.182.11.243], pleased to meet you
quit
221 2.0.0 b.mx.sonic.net closing connection
Connection closed by foreign host.

in this case the reverse lookup of 209.204.159.4 is eth0.b.mx.sonic.net
but sendmail reports its name as b.mx.sonic.net.   (you can hard-code
the hostname in sendmail.conf but that is deprecated since you have to
change it there if you ever change the host in the future).

i typed in the helo line and b.mx.sonic.net looked up the pointer for
66.182.11.243 and found libcat.alembic.net (in this case the name agrees
with the name i gave it in the helo command, but i could have put anything
in the helo and it would have responded with the reverse lookup host name).

then i closed the session by sending quit.

sendmail is very interested in getting its hostname right, since it's
important when you are relaying mail to another machine.  when sendmail
runs its mail queue, it looks up the mx record of the domain the mail is
addressed to and contacts the mail exchanger host specfied in DNS.  it then
contacts that machine and uses its idea of its own hostname in the helo
greeting.  if it says localhost.localdomain in the helo, many relays are
configured to reject the mail, and even if it did accept the message, it
would have no way to send an error message back if it was unable to
handle the mail.  so sendmail works very hard to get its hostname (fully
qualified) so it can play well with others on the internet.

so let's see what your sendmail daemon thinks it host name is.

possibly, you could enter a domain name in /etc/hosts after the short
host "linux" entry and sendmail would look there...but that depends on
how Red-Hat 9 is configured.  historically, many machines were set up
to look in hosts first and then DNS but these days there are mechanisms
to use NIS, LDAP and other systems and you can configure to ignore what's
in hosts.  i don't know what Red-Hat does by default.

-ron




More information about the talk mailing list