![](https://seccdn.libravatar.org/avatar/f0ad86a443e23d8412160985c73d3b1b.jpg?s=120&d=mm&r=g)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2013-06-12 23:13, Bill Cole wrote:
On 10 Jun 2013, at 16:10, James Knott wrote:
Carlos E. R. wrote:
localhost is in hosts, twice at least.
There's no problem with having more than one line with a host name. Only the first one will be used.
That is not routinely true. Assuming a typical nsswitch.conf, both the traditional gethostbyname() and the modern getaddrinfo() calls that resolve names to addresses both return structures that include all addresses whose entries in /etc/hosts include the name as a value or all values provided by normal DNS resolution of the name, with no particular significance to the ordering of the addresses returned. If (as when setting Postfix's "inet_interfaces" parameter to a list of hostnames) a daemon's configuration tells it to listen on particular addresses by hostname, it is only rational for that daemon to see that as a directive to use all of the addresses to which the name resolves.
That's why this is a problem for Postfix: it is being told to open listeners using a name that resolves to 2 addresses: one that is bound to a configured network interface and 127.0.0.2, which isn't. A quirk of the Linux loopback implementation allows listeners to be opened on any address in 127/8 on the lo interface, but Postfix doesn't (and shouldn't) handle 127/8 specially and open listeners on arbitrary addresses that just happen to work. It sees that 127.0.0.2 isn't configured on any interface, reports its misconfiguration, and dies because that sort of error is severe for a MTA.
Thanks a lot for that detailed explanation :-)
The actual address used is the one that's assigned to the interface that is used to reach the destination.
It is common for interfaces to have many more than one IP address assigned to them, so "the one that's assigned to the interface" may be a meaningless phrase. More precisely: a target address uses a particular route which is bound to an interface and may use a specific source address. If you do not specify a source address for ping to use, it will use the source address specific to the route (if their is one) or the default address for the interface to which the route is bound.
Ok, right. I should have said "the ones", then :-) - -- Cheers / Saludos, Carlos E. R. (from 12.3 x86_64 "Dartmouth" at Telcontar) -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlG5dQAACgkQtTMYHG2NR9WQpACfbNdTdGuv3vKYAszXUtpszxJ3 5FcAn1VaOJ7fzFqb+4R1KdTo2LOP/Lf1 =jq4q -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org