Re: [exim] Exim + Debian Etch Ignores Hosts entries?

Top Page
Delete this message
Reply to this message
Author: Jeroen van Aart
Date:  
To: exim-users
Subject: Re: [exim] Exim + Debian Etch Ignores Hosts entries?
Erik Cummings wrote:
> 127.0.0.1 localhost localhost.localdomain
> 127.0.1.1 myhost myhost.mydomain
>
> If I use /etc/mailname of 'localhost.localdomain' or 'myhost.mydomain'
> then mail will get forwarded (via my smarthost) to : USERNAME@???
> or USERNAME@???.
>
> This behavior is ignoring my /etc/aliases entries:
>
> root: netops@???


I am sure the owner of myotherdomain.com will be very pleased to receive
your email. ;-) http://www.ietf.org/rfc/rfc2606.txt

Unless you own that domain I doubt you'd like email for root to be
delivered there. But you never know...

To partially answer your question, I believe exim uses the
"gethostbyname" function to retrieve IP addresses from hostnames:

http://linux.die.net/man/3/gethostbyname
"The gethostbyname() function returns a structure of type hostent for
the given host name. Here name is either a host name, or an IPv4 address
in standard dot notation, or an IPv6 address in colon (and possibly dot)
notation. (See RFC 1884 for the description of IPv6 addresses.) If name
is an IPv4 or IPv6 address, no lookup is performed and gethostbyname()
simply copies name into the h_name field and its struct in_addr
equivalent into the h_addr_list[0] field of the returned hostent
structure. If name doesn't end in a dot and the environment variable
HOSTALIASES is set, the alias file pointed to by HOSTALIASES will first
be searched for name (see hostname(7) for the file format). The current
domain and its parents are searched unless name ends in a dot."