NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: disabling warnings when booting w/o IPv6 in kernel (AKA postfix idiot question)



Hi, Hubert--

On Jul 1, 2009, at 10:02 AM, Hubert Feyrer wrote:
The other day, I booted a kernel without opsions INET6, and got a number of warnings (see below). I think it's be nice if they didn't show up in the first place. Is there a way to disable them when no IPv4 is found?
Funny enough, it's only postfix that complains...

See postfix-2.6.2/README_FILES/IPV6_README:

* The first new parameter is called inet_protocols. This specifies what protocols Postfix will use when it makes or accepts network connections, and also controls what DNS lookups Postfix will use when it makes network
    connections.

        /usr/local/etc/postfix/main.cf:
# You must stop/start Postfix after changing this parameter.
            inet_protocols = ipv4       (DEFAULT: enable IPv4 only)
inet_protocols = all (enable IPv4, and IPv6 if supported)
            inet_protocols = ipv4, ipv6 (enable both IPv4 and IPv6)
            inet_protocols = ipv6       (enable IPv6 only)

By default, Postfix uses IPv4 only, because most systems aren't attached to
    an IPv6 network.

o On systems with combined IPv4/IPv6 stacks, attempts to deliver mail via IPv6 would always fail with "network unreachable", and those attempts
        would only slow down Postfix.

o Linux kernels don't even load IPv6 protocol support by default. Any
        attempt to use it would fail immediately.

Note 1: you must stop and start Postfix after changing the inet_protocols
    configuration parameter.

Note 2: if you see error messages like the following, then you're running Linux and need to turn on IPv6 in the kernel: see http://www.ipv6.org/ for hints and tips. Unlike other systems, Linux does not have a combined stack for IPv4 and IPv6, and IPv6 protocol support is not loaded by default.

postconf: warning: inet_protocols: IPv6 support is disabled: Address
        family not supported by protocol
postconf: warning: inet_protocols: configuring for IPv4 support only

Note 3: on older Linux and Solaris systems, the setting "inet_protocols = ipv6" will not prevent Postfix from accepting IPv4 connections. Postfix will present the client IP addresses in IPv6 format, though. In all other cases, Postfix always presents IPv4 client IP addresses in the traditional
    dotted quad IPv4 format.


If tweaking inet_protocols doesn't help, it's possible that rebuilding the postfix binary (or even the system libraries plus userland binaries) in your IPv4-only context might work. The messages come from src/util/inet_proto.c; the docs discuss a #define NO_IPV6....

Regards,
--
-Chuck



Home | Main Index | Thread Index | Old Index