Bug 228479

Summary: Postfix is configured for inet_protocols=all if selecting ipv4 only support during installation
Product: [openSUSE] openSUSE 10.2 Reporter: Lars Vogdt <lars.vogdt>
Component: InstallationAssignee: Martin Vidner <mvidner>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Enhancement    
Priority: P5 - None CC: gp, mrueckert, nathan, varkoly
Version: RC 5   
Target Milestone: ---   
Hardware: i386   
OS: SUSE Other   
Whiteboard:
Found By: Development Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Lars Vogdt 2006-12-14 00:03:24 UTC
During installation, you can now disable ipv6 support for your machine (fine ;-)
but postfix keeps configured for all inet_protocoll which results in warning messages in /var/log/messages like:

 Dec 11 23:59:26 travel ip-up: sendmail: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Dec 11 23:59:26 travel ip-up: sendmail: warning: inet_protocols: configuring for IPv4 support only
Dec 11 23:59:26 travel ip-up: postqueue: warning: inet_protocols: IPv6 support is disabled: Address family not supported by protocol
Dec 11 23:59:26 travel ip-up: postqueue: warning: inet_protocols: configuring for IPv4 support only

This can easily be fixed on the command line with
   postconf -e inet_protocols=ipv4

But perhaps we have more services which are configured for using ipv6 as default and ipv4 as fallback - so someone should decide:

1) if we disable the installation option 
2) if we add some SuSEconfig script (if necessary) for configuring services (like the postfix example above) for ipv4 or ipv6
3) if we handle this as bug for each package and develop "some magic (scripts)" which find out the correct setting for each package
4) if we live with the warnings in the logfiles and the possible delays in some services, which using ipv4 only as fallback

Currently I would prefer option 3, but as this comes up with the installation option in YaST, assigning it to yast2-maintainers for further investigation.
Comment 2 Peter Varkoly 2006-12-21 10:59:06 UTC
The problem is, following:
The SuSEconfig.postfix try to find out if ipv6 is enabled or not.

If you set "disable ipv6 support" during the installation or yast2 lan it works after reboot the system. I think it is a bug in yast2-network.

Have a look at:
ip addr show lo|grep inet6

In the past there was a variable USE_IPV6 in /etc/sysconfig/network/config.


(So we can not realy detect if ipv6 will be used or not.
 inet_protocols=all is harmless, important is inet_interfaces==
Comment 3 Martin Vidner 2006-12-21 11:49:47 UTC
(In reply to comment #2)
> The problem is, following:
> The SuSEconfig.postfix try to find out if ipv6 is enabled or not. 
> If you set "disable ipv6 support" during the installation or yast2 lan it works
> after reboot the system. I think it is a bug in yast2-network.
I think that we already have a bug open for that.
Comment 4 Peter Varkoly 2006-12-22 09:24:39 UTC
*** Bug 222940 has been marked as a duplicate of this bug. ***
Comment 5 Harald Langhammer 2007-01-11 09:26:44 UTC
Some more details with 10.2 final:

On a clean install with ipv6 disabled during installation postfix doesn't run because inet_interfaces is set to "127.0.0.1 ::1" and "::1" is not present. SuSEconfig would remove "::1" if USE_IPV6=no is found in /etc/sysconfig/network/config but this entry doesn't exist anymore.

On an older system updated to 10.2 the USE_IPV6 config entry is present from the former installation and inet_interfaces is set properly by SuSEconfig.

If you change inet_protocols to "ipv4" your postfix config isn't handled by SuSEconfig anymore as you changed it manually.

So there are two changes needed:

1. If a user chooses not to use IPV6 there should be USE_IPV6=no added to /etc/sysconfig/network/config like before

2. Depending on USE_IPV6 setting /sbin/conf.d/SuSEconfig.postfix should select between "inet_protocols=all" and "inet_protocols=ipv4" exactly like it does with "inet_interfaces" between "127.0.0.1 ::1" and "127.0.0.1"
Comment 6 Gerald Pfeifer 2007-01-25 11:30:36 UTC
According to Peter's and my reading of the Postfix documentation, "all"
is supposed to enable support for exactly those protocols the operating
systems supports (has currently enabled).

In the case IPv6 has been disabled in the operating system as is the case
here, it does not seem appropriate to issue a warning like this then.

So, our plan is to just remove those (bogus, in our opinion) warnings.
Comment 7 Peter Varkoly 2007-02-02 11:09:42 UTC
*** Bug 241223 has been marked as a duplicate of this bug. ***
Comment 8 Peter Varkoly 2007-02-02 11:12:57 UTC
The solution is:
Now we set both inet_protocols and inet_interfaces to all.
This means the available interfaces and protocols well be used.
To avoid bogus warnings inet_proto.c was patched.

I'll update it on openSUSE 10.2. 
I need SWAMPID.
Comment 10 Peter Varkoly 2007-03-27 13:25:47 UTC
fixed
Comment 11 Marcus Rückert 2007-04-02 19:12:36 UTC
imho patching out the warning is wrong. what if an user wants _ipv6_ and cant get the warning? now he has no hint where to look for.

imho we should use /proc/net/protocols to detect if ipv6 is working.