Wietse Venema:
> After I made "inet_protocols=all" the default on your request, I
> received notice that Postfix no longer would build on freebsd.org
> "build" systems, and that it would be removed from ports. These
> build environments have IPv6 in the kernel but they have no IPv6
> interfaces.  Basically, these are IPv4-only boxes with can IPv6
> configuration that violates the RFCs.

Attached is a postfix-install patch that works with conf/main.cf
as distributed, on systems without IPv4 support.

This adds one new question to the install dialog, so people
who run automated builds may want to take notice.

To install Postfix from scratch, answer with "ipv6" or "all" to the
question for "inet_protocols". For best performance specify "ipv6"
as this eliminates useless IPv4 DNS lookups and useless connection
attempts.

        Wietse

*** postfix-install     Sat Nov 19 18:09:16 2011
--- /tmp/postfix-install        Tue Dec 27 17:48:43 2011
***************
*** 147,152 ****
--- 147,155 ----
  # .IP readme_directory
  #     The destination directory for the Postfix README files.
  #     This parameter setting is recorded in the installed main.cf file.
+ # .IP inet_protocols
+ #     The supported Internet protocols: "ipv4", "ipv6" or all".
+ #     This parameter setting is recorded in the installed main.cf file.
  # SEE ALSO
  #     post-install(1) post-installation procedure
  # FILES
***************
*** 359,364 ****
--- 362,372 ----
  html_directory_prompt="the destination directory for the Postfix
  HTML files. Specify \"no\" if you do not want to install these files."
  
+ inet_protocols_prompt="the Internet protocols that Postfix will
+ support.  Specify \"ipv4\", \"ipv6\", or \"all\". Specify \"all\"
+ only if you have both IPv4 and IPv6 connectivity, otherwise mail
+ delivery performance will suffer."
+ 
  # Default settings, just to get started.
  
  : ${install_root=/}
***************
*** 422,428 ****
  
  CONFIG_PARAMS="command_directory daemon_directory data_directory \
  html_directory mail_owner mailq_path  manpage_directory newaliases_path \
! queue_directory readme_directory sendmail_path setgid_group"
  
  # Extract parameter settings from the installed main.cf file.
  
--- 430,436 ----
  
  CONFIG_PARAMS="command_directory daemon_directory data_directory \
  html_directory mail_owner mailq_path  manpage_directory newaliases_path \
! queue_directory readme_directory sendmail_path setgid_group inet_protocols"
  
  # Extract parameter settings from the installed main.cf file.
  
***************
*** 520,525 ****
--- 528,543 ----
      }
  done
  
+ case "$inet_protocols" in
+  ipv4|ipv6|all)
+     ;;
+  *) (echo $0: Error: the inet_protocols parameter requires a value \"ipv4\",
+      echo \"ipv6\", or \"all\". Try again with \"inet_protocols=name\" on
+      echo the command line or execute \"make install\" and specify
+      echo inet_protocols interactively.) | ${FMT} 1>&2
+      exit 1;;
+ esac
+ 
  test -d $tempdir || mkdir -p $tempdir || exit 1
  
  trap "rm -f $tempdir/junk" 0 1 2 3 15
***************
*** 738,743 ****
--- 756,762 ----
      "manpage_directory = $manpage_directory" \
      "sample_directory = $sample_directory" \
      "readme_directory = $readme_directory" \
+     "inet_protocols = $inet_protocols" \
  || exit 1
  
  # If Postfix is being installed locally from source code, do the

Reply via email to