newaliases fails on a system with no IPv4 address configured

Bug #492639 reported by Teun Vink
12
This bug affects 2 people
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,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
   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,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
   link/ether 54:52:00:4c:e9:e7 brd ff:ff:ff:ff:ff:ff
   inet6 2001:7b8:3:47:5652:ff:fe4c:e9e7/64 scope global dynamic
      valid_lft 2591969sec preferred_lft 604769sec
   inet6 fe80::5652:ff:fe4c:e9e7/64 scope link
      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.

Tags: ipv6
Teun Vink (teunvink)
tags: added: ipv6
Revision history for this message
Teun Vink (teunvink) wrote :

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.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Agreed it should work better than this in an IPv6 environment.

Changed in postfix (Ubuntu):
status: New → Confirmed
Revision history for this message
Scott Kitterman (kitterman) wrote :

inet_protocols = all is now the default for new installations.

Changed in postfix (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.