On Sat, 17 Jun 2000, Tom Rauschenbach wrote:
> I've lived with the classic "sendmail hangs for 3 minutes at boot" for
> long enough.
[...]
> For example, the notion of "my domain".  What's that?
[...]
> My email address is [EMAIL PROTECTED]
[...]
> As far as I know my computer has a name "grumpers".
[...]

  What we've got here is a common confusion between your computer's hostname,
it's registered DNS name (if any), and your mail domain.

  What follows is a long explanation.  If you just want the damn thing to
work, skip ahead to "THE SOLUTION".

  First, Unix (and most other OSes, as it happens) have a concept called your
"hostname".  It can be "fred", it can be "rogue", it can be "asdfjkl".  It
does not matter what your hostname actually is, as far as Unix ix concerned.  
It is simply a handle for us humans to use when talking about a particular box
in the rack.

  Things got a little more complicated when the Domain Name System (DNS) was
invented.  DNS adds a structured hierarchy of domains and names.  The idea was
that you would register your machine's hostname in your organization's domain,
and thus your machine's name would automatically be known to the whole
network.  Thus, if your machine was "fred", and you worked for a company with
domain "foo.com", your machine's Fully Qualified Domain Name (FQDN) was
"fred.foo.com".

  However, there is no requirement, at the OS level, for your machine's
hostname to have a connection to your FQDN.  Your hostname could be "fred"
while your FQDN was "barney.foo.com".  Confusing, but legal.

  Things get even more complex (as they always do) when you start adding
application level software.  sendmail, the bane of Unix system administrators
everywhere, needs to know your FQDN so it can talk to other mail hosts out on
the 'net.  Unless you configure it manually, sendmail uses your machine's
hostname to determine this.  It uses the Unix DNS client, called the resolver,
to lookup your hostname in the DNS.  If this isn't immediately available (for
one reason or another), sendmail will hang while it, the resolver, and the DNS
try over and over again to figure out who the heck they are.  Eventually, all
the different pieces give up, and sendmail moves on, in sort of an anonymous
mode where it doesn't know its own FQDN.

  There are two problems with your particular setup:

  The first is that you've got a transient connection to the net.  Thus, when
your machine boots up, DNS isn't working yet, because the name server(s)
cannot be reached.  The resolver doesn't know this, and tries sending queries,
and has to wait for them to time out.  Then it tries again a few times before
failing the call back to sendmail.  sendmail then waits and tries again a few
more times before *it* gives up.

  The second is that your machine's hostname, "grumpers", isn't registered
with the DNS at all.  Even when your net connection is up, the resolver is
just doing to get a "Non-existent host/domain" error, causing sendmail to
sleep and retry for a few minutes (again).

  What's the solution?  Well, it depends on what you're trying to do.  If you
actually want to have your own mail domain, such that one can send e-mail to
you at "[EMAIL PROTECTED]", then you've got problems.  But I
don't think that is what you are trying to do.

THE SOLUTION

  As root, open up /etc/hosts in your favorite text editor.  Look for a line
that looks like this

        127.0.0.1       localhost

and change it to look like this

        127.0.0.1       localhost.localdomain localhost grumpers

Save and exit.  That should fix things.

MORE EXPLANATION

  You see, before the resolver tries your DNS server(s), it checks the
/etc/hosts file to see if the answer is there.  The first entry on a line
(after the IP address) is the authoritive name, and the ones after it are
aliases.  By putting your unqualified hostname in there as an alias, the
resolver will answer "localhost.localdomain" when sendmail asks "Who is
'grumpers'?".

  You asked what "your domain" is.  You technically don't have one.  Domains
are part of the DNS.  Your dialup provider, TIAC, has the domain "tiac.net",
but your machine isn't registered as part of it.

  If you want a registered DNS domain name, you need to look into dynamic DNS
services, as you have a dynamic IP address.  An Internet search for "dynamic
DNS" should yield results.

  Also worth noting is that your email address, "[EMAIL PROTECTED]", has
nothing to do with any of this.  The DNS lists "smtp-mx-1.tiac.net" as the MX
(mail exchanger) host for the TIAC.NET domain.  All mail for that domain goes
to that host.  You then must request your mail using a protocol like POP3, and
neither sendmail nor the DNS gets involved in that (not directly, anyway).

  Hope this helps!

-- 
Ben Scott <[EMAIL PROTECTED]>
| "You may have a fresh start any moment you choose, for this thing we call   |
| 'failure' is not the falling down, but the staying down."  -- Mary Pickford |


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to