newaliases fails on a system with no IPv4 address configured
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postfix (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: postfix
newaliases fails on a system with no IPv4 address configured, even when it has full connectivity on IPv6.
as can be seen, this box has NO IPv4 address, but both loopback and eth0 have an IPv6 address configured:
[22:10|root@ipv6 ~]
# ip addr ls
1: lo: <LOOPBACK,
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,
link/ether 54:52:00:4c:e9:e7 brd ff:ff:ff:ff:ff:ff
inet6 2001:7b8:
valid_lft 2591969sec preferred_lft 604769sec
inet6 fe80::5652:
valid_lft forever preferred_lft forever
Running newaliases fails:
[22:10|root@ipv6 ~]
# newaliases
newaliases: fatal: could not find any active network interfaces
Adding 127.0.0.1 to the loopback interface fixes it:
# ip addr add 127.0.0.1/8 dev lo
[22:13|root@ipv6 ~]
# newaliases
[22:14|root@ipv6 ~]
#
(tadaa.wav, no error)
This was tested on Ubuntu 9.04, haven't checked a 9.10 install yet.
# lsb_release -rd
Description: Ubuntu 9.04
Release: 9.04
PS: I totally understand that IPv6 only systems are still very uncommon and thus this bug will get a very low priority, but they won't be in a few years. I found this bug when testing systems with IPv6 only configured.
The solution to this is to add
inet_protocols = all
to main.cf
It would be useful to allow other protocols than just IPv4 in the default config, so the install of postfix doesn't fail on 'newaliases' when IPv4 is unavailable. Also, a better error message would be useful.