Machine name: localhost

David Abrahams dave at
Sat Sep 9 21:08:35 UTC 2006

"Eamonn Sullivan" <eamonn.sullivan at> writes:

> On 9/9/06, David Abrahams <dave at> wrote:
>> "Eamonn Sullivan" <eamonn.sullivan at> writes:
>> >
>> > localhost is a standard name.
>> Sure.
>> > You want it in there.
>> Hmm, not so sure about that.  Whatever is sticking it on every line of
>> /var/log/syslog, at least, expects to find a more useful name I'm
>> sure.  Every machine is localhost to itself.  I'm pretty sure those
>> syslogs are supposed to identify the machine usefully.
>> > What are you using
>> > to send the email? It looks like (from above) that you're using emacs,
>> > is that correct?
>> Gnus/emacs.  And I have used it successfully it to send through that
>> server for years (from NTEmacs, i.e. on a windoze box).  I never see
>> localhost in my mail headers sent from that machine, even when mail
>> comes back to me for whatever reason.
> One other thing just occured to me. It's possible that the new SMTP
> server you're connecting to is configured to work only with its own
> domain. On Windows, are you connecting to the network any differently,
> such as through a VPN?

It's not an on-windows/on-linux thing.  I'd probably see the same
thing if I pulled out a Windows box here, except that something about
where message-mail gets the hostname from probably arranges to insert
something more intelligent than "localhost."  It's something about the
state of this machine, which is masked by my usual cable provider's
server, but is revealed where I am.

I've enclosed headers from when I send email to the same address (and
Cc myself) in the two situations.

What I notice is that when it doesn't work, the Return-Path and Sender
headers are "dave at localhost."

And note that I'm not just arbitrarily siezing on "localhost" as the
problem.  This is in response to:

504 <dave at localhost>: Sender address rejected: need fully-qualified address

> Also, most services on Ubuntu are configured to connect only through
> localhost, unless you change that, so that's why you're seeing so many
> instances of "localhost" in /var/log/syslog.

Hm.  Most syslogs I see posted by users of other distros have the
local machine name in them.

Dave Abrahams
Boost Consulting

More information about the ubuntu-users mailing list