[Bug 294462] mail/postfix: default main.cf leads to warnings now

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 13 Apr 2026 08:44:04 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=294462

            Bug ID: 294462
           Summary: mail/postfix: default main.cf leads to warnings now
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: otis@FreeBSD.org
          Reporter: dim@FreeBSD.org
             Flags: maintainer-feedback?(otis@FreeBSD.org)
          Assignee: otis@FreeBSD.org

After a recent update, the default main.cf (and main.cf.sample) contain
duplicate inet_protocols= lines, which leads to warnings when starting postfix.
E.g.:

# service postfix start
postfix: warning: /usr/local/etc/postfix/main.cf, line 696: overriding earlier
entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
postsuper: warning: /usr/local/etc/postfix/main.cf, line 696: overriding
earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
/usr/local/sbin/postconf: warning: /usr/local/etc/postfix/main.cf, line 696:
overriding earlier entry: inet_protocols=all
postfix/postlog: warning: /usr/local/etc/postfix/main.cf, line 696: overriding
earlier entry: inet_protocols=all
postfix/postfix-script: starting the Postfix mail system

After "make patch" in the port, the main.cf.orig file (usually located at
/wrkdirs/usr/ports/mail/postfix/work-default/postfix-3.11.1/conf/main.cf.orig)
ends with:

```
# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/local/share/doc/postfix

# shlib_directory: The location of the Postfix *.so library files and
# database plugins.
shlib_directory =

# meta_directory: The location of non-executable files that are shared
# between multiple Postfix instances.
meta_directory = $config_directory

inet_protocols = ipv4
```

so after patching through files/patch-conf_main.cf, it becomes:

```
# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/local/share/doc/postfix
inet_protocols = all

# smtp CA path (default to system-wide location)
smtp_tls_CApath = /etc/ssl/certs
# shlib_directory: The location of the Postfix *.so library files and
# database plugins.
shlib_directory =

# meta_directory: The location of non-executable files that are shared
# between multiple Postfix instances.
meta_directory = $config_directory

inet_protocols = ipv4
```

There are now both `inet_protocols = all` and `inet_protocols = ipv4` lines,
which cause the warnings.

-- 
You are receiving this mail because:
You are the assignee for the bug.