Re: localhost name resolution problem
Hello! # host localhost localhost.my.domain is a nickname for my.domain my.domain has address 202.x.x.x Someone suggested I check localhost.: # host localhost. Host not found. AFAIK the host command doesn't use /etc/hosts. No matter what is specified in /etc/host.conf, the host command always uses DNS. I got bitten by the same thing a couple of weeks ago. To check whether localhost resolves to 127.0.0.1, try for example 'ping localhost' Given the contents of your hosts file, you should be OK. -- Toomas Aas | [EMAIL PROTECTED] | http://www.raad.tartu.ee/~toomas/ * Do infants enjoy infancy as much as adults enjoy adultery? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: localhost name resolution problem
From: Ryan Merrick [EMAIL PROTECTED] W. Sierke wrote: hosts contains ::1 localhost.my.domain localhost 127.0.0.1 localhost.my.domain localhost 192.168.100.1 this_machine.my.domain this_machine 192.168.100.2 another_machine.my.domain another_machine ... Your #/etc/hosts file should read for IPv4 localhost 127.0.0.1localhost.Your_local_domain.com localhost There should be another line in #/etc/hosts your host 192.168.100.1My_host.Your_local_domain.com My_host You can add as many lines as you want. with IP address, hostname, nickname. Indeed, but despite the presence of the (IPv4) localhost entry, sendmail was resolving localhost to my internet IP address, rather than 127.0.0.1. It was suggested to me that the name resolution method that sendmail uses would not use /etc/hosts anyway and since that matched my own experience I'm inclined to think it's true, that's why I resorted to adding bind to the system. After further investigation I've seen two approaches to resolving this issue, one to substitute 127.0.0.1 in place of 'localhost' in the sendmail config files[1], the other to add the sendmail config file /etc/mail/service.switch with the line hosts files dns. But now I'm curious about why these options aren't used in the default installation of sendmail on FreeBSD, given that my situation doesn't appear to be unusual. Does sendmail not use the hosts file by default as a security measure? In any case it just feels dirty to me to have to circumvent this issue on a case-by-case basis - i.e. my thinking at the moment is that a dns facility should resolve 'localhost' correctly. Is that a shared sentiment? Or am I just barking up the wrong tree altogether? Thanks, Wayne [1] - by having FEATURE(`msp', `[127.0.0.1]') in submit.mc ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
localhost name resolution problem
Hi, In the course of trying to resolve a problem with sendmail (refusing to deliver even local mail), I saw a note in the sendmail configuration docs which says host localhost must resolve to 127.0.0.1. However, when I checked my system I instead found (details obscured): # host localhost localhost.my.domain is a nickname for my.domain my.domain has address 202.x.x.x Someone suggested I check localhost.: # host localhost. Host not found. I'm not (wasn't) running a nameserver, my host.conf contains the entries hosts and bind in that order, resolv.conf has a single, automatic (from PPPoE) nameserver entry which works, hostname is set to this_machine.my.domain. hosts contains ::1 localhost.my.domain localhost 127.0.0.1 localhost.my.domain localhost 192.168.100.1 this_machine.my.domain this_machine 192.168.100.2 another_machine.my.domain another_machine ... The domain I'm using is one serviced by dyndns.org, and I have a dynamic IP address. I've now installed bind and have got to the point where localhost again resolves to 127.0.0.1 (and sendmail appears to be happy again). Notably in the process of doing this I've changed my domain name from something.fictitious to my.domain. Now, however, (in part): # host -v localhost Trying domain my.domain rcode = 3 (Non-existent domain), ancount=0 Trying domain domain rcode = 0 (Success), ancount=1 The following answer is not authoritative: The following answer is not verified as authentic by the server: localhost.domain 66929 INA 127.0.0.1 # host -v localhost. rcode = 3 (Non-existent domain), ancount=0 Host not found. Even though I've overcome my initial problem, I'm not happy and rather feel as though I've begun creating a monster (and that's the last thing I wanted to be doing when moving to FreeBSD). For example, I feel somewhat uncomfortable that localhost is now resolving from domain instead of my.domain. I'm also confused about how I should be configuring bind when dyndns.org handles the dns for my domain (and whether I should really be running it at all). But I've exhausted my pitiful knowledge and searching capabilities for the moment. The handbook doesn't appear to be complete (following its example doesn't appear to help with the localhost resolution issue) and all of the material I've trawled up from the 'net is either too hard to follow or too old. Thanks, Wayne ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: localhost name resolution problem
W. Sierke wrote: Hi, In the course of trying to resolve a problem with sendmail (refusing to deliver even local mail), I saw a note in the sendmail configuration docs which says host localhost must resolve to 127.0.0.1. However, when I checked my system I instead found (details obscured): # host localhost localhost.my.domain is a nickname for my.domain my.domain has address 202.x.x.x Someone suggested I check localhost.: # host localhost. Host not found. I'm not (wasn't) running a nameserver, my host.conf contains the entries hosts and bind in that order, resolv.conf has a single, automatic (from PPPoE) nameserver entry which works, hostname is set to this_machine.my.domain. hosts contains ::1 localhost.my.domain localhost 127.0.0.1 localhost.my.domain localhost 192.168.100.1 this_machine.my.domain this_machine 192.168.100.2 another_machine.my.domain another_machine ... Your #/etc/hosts file should read for IPv4 localhost 127.0.0.1localhost.Your_local_domain.com localhost There should be another line in #/etc/hosts your host 192.168.100.1My_host.Your_local_domain.com My_host You can add as many lines as you want. with IP address, hostname, nickname. -Ryan ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]