Re: [Exim] Problems caused by localhost entry in Received

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Exim User's Mailing List
Dátum:  
Címzett: Giuliano Gavazzi
CC: Toralf Lund, Exim Mailing List
Tárgy: Re: [Exim] Problems caused by localhost entry in Received
[ On Tuesday, January 6, 2004 at 13:41:13 (+0100), Giuliano Gavazzi wrote: ]
> Subject: Re: [Exim] Problems caused by localhost entry in Received
>
> in particular
> because every nameserver will give a different result for the
> 127.0.0.1 PTR.


That is the case in many scenarios, unfortunately. However it's not
supposed to be the case and it need not be the case if everyone would
take a tiny bit of care in configuring their nameservers.

(not that it really matters for the purposes of understanding received
headers, but....)

Every nameveserver should of course be loaded with a "localhost" zone
that has _only_ a single A record and of course at least one NS record
and an SOA record.

If, and only if, you really want a "localhost.your.domain" name as well
then you really should make that a CNAME in your local zone.

I.e. at minimum the following:

    $ORIGIN localhost.
    $TTL 24w
    .        IN SOA    localhost. hostmaster.localhost. (
                    1 8h 2h 24w 16h )
    .        IN NS    localhost.
    .        IN A    127.0.0.1


    $ORIGIN 127.in-addr.arpa.
    $TTL 24w
    1.0.0.127.in-addr.arpa.        IN PTR    localhost.


The only other valid records for those zones would be those supporting
RFC 1101 network naming.

Then if you really want a "localhost" hostname in your domain you may
also add the following to your local zone:

    $ORIGIN your.domain.
    localhost.your.domain.    IN CNAME localhost.


Note all of the the trailing dots. Their presence id critically important

This way the PTR for 127.0.0.1 will always point to the one valid domain
name which is just plain "localhost", and the hostname validation for
localhost will always work properly.

You can find a complete set of documented template configs and default
master files for localhost and other highly recommended default zones
for BIND here:

    ftp://ftp.weird.com/pub/local/named-sample-conf.src.shar


As for having "localhost" in a received header, well that's entirely
valid. There's absolutely nothing wrong with it at all.

--
                        Greg A. Woods


+1 416 218-0098                  VE3TCP            RoboHack <woods@???>
Planix, Inc. <woods@???>          Secrets of the Weird <woods@???>