From: John Summerfield <summer(_at_)os2(_dot_)ami(_dot_)com(_dot_)au>
Jun 22 02:16:57 dugite fetchmail[9435]: SMTP connect to localhost failed
The above message has caused me some days of aggravation and an hour or two
resolving.
Everyone knows localhost is 127.0.0.1, and I could connect with it with
telnet,
no worries.
Yup, all people know that, but it's just a name. Computers don't work with
hostnames but IP addresses (and MAC addresses before somebody get's smart
:>).
It wasn't until I ran the wretched thing under strace I discovered it was
trying
to connect to 126.0.0.1.
From there a few seconds to fix /etc/hosts (that popped up in strace too).
I don't know why, in my setup, it's consulting /etc/hosts, but that's a
question
for another day.
Because it has to turn the name "localhost" into an IP address. That
"localhost" resolves to "127.0.0.1" is a convention. It really doesn't have
to (though you'd either have to be nuts to make that change deliberately).
I suggest that the message be changed to reflect the IP address it's trying
to
connect to (and maybe it should use the standard "connection refused"
message
too).
Having the IP as well as the name probably wouldn't hurt. It does help
people spot problems such as yours (typos in /etc/hosts etc).
The message however is perfectly clear. Changing it to "connection refused"
would muddy the waters. "Connection failed" says "nothing answered",
"connection refused" says "something answered and told me to go away". If
the above error had said "connection refused" then it would have suggested
an access problem on the mail server, not a typo in /etc/hosts.
Please don't CC me on anything sent to mailing lists or send
me email directly unless it's a privacy issue, thanks.
Reply-to mangled to assist those who don't read the above :)
--
Rob | Ask questions the smart way:
http://www.tuxedo.org/~esr/faqs/smart-questions.html
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com