Bug#284755: acknowledged by developer (Re: Bug#284755: exim4: Default localhost description in /etc/hosts causes Exim to send HELO localhost.localdomain)
Ivar Zarans
Ivar Zarans <ivar@init.ee>, 284755@bugs.debian.org
Wed, 8 Dec 2004 18:18:34 +0200
On Wed, Dec 08, 2004 at 07:38:44AM -0800, Debian Bug Tracking System wrote:
> > then Exim uses "localhost.localdomain" as name in HELO command.
> [...]
>
> No, it does not. It uses the hostname of the local machine, as given
> by
> hostname --fqdn
> and set in /etc/hostname.
>
> If your machine thinks its FQDN is localhost.localdomain it is
> misconfigured.
My apologies, it appears to be bug (or misunderstanding) in hostname and
/etc/hosts file. At some moment we added "gw" as alias to 127.0.0.1.
If /etc/hosts has local host name (here "gw") as one of aliases for
127.0.0.1, then hostname gets confused.
Examples:
/etc/hosts: 127.0.0.1 localhost.localdomain localhost gw
$ hostname --fqdn
$ localhost.localdomain
/etc/hosts: 127.0.0.1 localhost.localdomain localhost test
$ hostname --fqdn
$ gw.reisiekspert.ee
/etc/hosts: 127.0.0.1 localhost.localdomain localhost test gw
$ hostname --fqdn
$ localhost.localdomain
/etc/hosts: 127.0.0.1 localhost.localdomain localhost
$ hostname --fqdn
$ gw.reisiekspert.ee
/etc/hosts: 127.0.0.1 localhost
$ hostname --fqdn
$ gw.reisiekspert.ee
--
Best regards,
Ivar Zarans