]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.6-20080201
authorWietse Venema <wietse@porcupine.org>
Fri, 1 Feb 2008 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:33:56 +0000 (06:33 +0000)
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/conf/post-install
postfix/src/global/mail_version.h

index 862d2f53c691b11453b60a6a82d245db9008c416..bc501244027ffeb54ce518efd68c1dd4eca2e0b9 100644 (file)
@@ -14280,10 +14280,11 @@ Apologies for any names omitted.
 
 20080125
 
-       Bugfix: missing {} in the LDAP client broke OpenLDAP TLS.
-       The setting tls_require_cert=no was further broken because
-       Postfix used OpenLDAP incorrectly. Victor Duchovni.  This
-       broke tls_require_cert=no File: global/dict_ldap.c.
+       Bugfix (introduced 20071216): missing {} in the LDAP client
+       broke OpenLDAP TLS.  The setting tls_require_cert=no was
+       further broken because Postfix used OpenLDAP incorrectly.
+       Victor Duchovni.  This broke tls_require_cert=no File:
+       global/dict_ldap.c.
 
 20080126
 
@@ -14303,3 +14304,14 @@ Apologies for any names omitted.
        Bugfix (introduced 20080126): the new "do not execute
        directly" test in post-install got broken during code
        cleanup.  File: conf/post-install.
+
+20080201
+
+       Workaround: undo the changes that require that post-install
+       is invoked via the postfix command, because this breaks
+       when "postfix start" is invoked with an obsolete postfix
+       command that doesn't export the new data_directory parameter.
+
+       Workaround: pick up a missing data_directory setting from
+       main.cf when "postfix start" is invoked with an obsolete
+       postfix command. File: conf/post-install.
index 7f4ae50c5150cc60724270f725f732026c1dd7cb..190b2fb498ff3058a2d7797ed360b3ecaa493502 100644 (file)
@@ -16,11 +16,3 @@ Incompatibility with Postfix 2.4 and earlier
 
 If you upgrade from Postfix 2.4 or earlier, read RELEASE_NOTES-2.5
 before proceeding.
-
-Incompatible changes with snapshot 20080127
-===========================================
-
-The post-install script now requires explicitly that it is invoked
-via the postfix(1) command. This was the intended usage since Postfix
-version 2.1, but it was never enforced.  The internal documentation
-for package maintainers has been updated accordingly.
index 833685c790bf5a39fac69a098ff3ad9f36968522..c09fdfa3255574277126645512c821cd7bb96b21 100644 (file)
@@ -9,7 +9,7 @@
 # SUMMARY
 #      Postfix post-installation script
 # SYNOPSIS
-#      postfix post-install [name=value] command ...
+#      post-install [name=value] command ...
 # DESCRIPTION
 #      The post-install script performs the finishing touch of a Postfix
 #      installation, after the executable programs and configuration
@@ -90,7 +90,7 @@
 #      copy the configuration files from the primary Postfix instance to
 #      a secondary configuration directory and execute:
 #
-#      postfix post-install config_directory=secondary-config-directory \e
+#      post-install config_directory=secondary-config-directory \e
 # .in +4
 #              queue_directory=secondary-queue-directory \e
 # .br
 #      To upgrade a secondary Postfix installation on the same machine,
 #      execute:
 #
-#      postfix post-install config_directory=secondary-config-directory \e
+#      post-install config_directory=secondary-config-directory \e
 # .in +4
 #              upgrade-permissions upgrade-configuration
 # INSTALLATION PARAMETER INPUT METHODS
 # .IP command_directory
 #      The directory for Postfix administrative commands. This
 #      directory should be in the command search path of adminstrative users.
-# .IP data_directory
-#      The directory for Postfix writable data files (caches, etc.).
 # .IP queue_directory
 #      The directory for Postfix queues.
+# .IP data_directory
+#      The directory for Postfix writable data files (caches, etc.).
 # .IP sendmail_path
 #      The full pathname for the Postfix sendmail command.
 #      This is the Sendmail-compatible mail posting interface.
 #      The directory for the Postfix on-line manual pages.
 # .IP sample_directory
 #      The directory for the Postfix sample configuration files.
+#      This feature is obsolete as of Postfix 2.1.
 # .IP readme_directory
 #      The directory for the Postfix README files.
 # SEE ALSO
@@ -199,8 +200,6 @@ MOST_PARAMETERS="command_directory daemon_directory data_directory
 
 USAGE="Usage: $0 [name=value] command
     create-missing          Create missing queue directories.
-    set-permissions         Update file permission and ownership.
-    upgrade-configuration   Update configuration files.
     upgrade-source          When installing or upgrading from source code.
     upgrade-package         When installing or upgrading from pre-built package.
     first-install-reminder  Remind of mandatory first-time configuration steps.
@@ -236,20 +235,18 @@ test -n "$create$upgrade_conf$first_install_reminder" || {
     exit 1
 }
 
-for name in config_directory $MOST_PARAMETERS
-do
-    eval test -n \"\${$name}\" || {
-       echo "$0: Error: do not invoke this command directly" 1>&2
-       echo Re-run this command as: postfix $0 ... 1>&2
-       exit 1
-    }
-done
+# Bootstrapping problem.
 
-POSTCONF="$command_directory/postconf"
+if [ -n "$command_directory" ]
+then
+    POSTCONF="$command_directory/postconf"
+else
+    POSTCONF="postconf"
+fi
 
 $POSTCONF -d mail_version >/dev/null 2>/dev/null || {
     echo $0: Error: no $POSTCONF command found. 1>&2
-    echo Re-run this command as: postfix $0 command_directory=/some/where. 1>&2
+    echo Re-run this command as $0 command_directory=/some/where. 1>&2
     exit 1
 }
 
@@ -287,18 +284,51 @@ SunOS*) FMT=fake_fmt;;
      *) FMT=fmt;;
 esac
 
+# If a parameter is not set via the command line or environment,
+# try to use settings from installed configuration files.
+
+# Extract parameter settings from the obsolete install.cf file, as
+# a transitional aid.
+
+grep setgid_group $config_directory/main.cf >/dev/null 2>&1 || {
+    test -f $config_directory/install.cf  && {
+        for name in sendmail_path newaliases_path mailq_path setgid manpages
+        do
+       eval junk=\$$name
+        case "$junk" in
+        "") eval unset $name;;
+        esac
+          eval : \${$name="\`. $config_directory/install.cf; echo \$$name\`"} \
+               || exit 1
+        done
+        : ${setgid_group=$setgid}
+        : ${manpage_directory=$manpages}
+    }
+}
+
+# Extract parameter settings from the installed main.cf file.
+
+test -f $config_directory/main.cf && {
+    for name in $MOST_PARAMETERS
+    do
+       eval junk=\$$name
+        case "$junk" in
+        "") eval unset $name;;
+        esac
+        eval : \${$name=\`$POSTCONF -c $config_directory -h $name\`} || exit 1
+    done
+}
+
 # Sanity checks
 
 case $manpage_directory in
  no) echo $0: Error: manpage_directory no longer accepts \"no\" values. 1>&2
-     echo Try again with \"postfix $0 manpage_directory=/pathname ...\". 1>&2
-     exit 1;;
+     echo Try again with \"$0 manpage_directory=/pathname ...\". 1>&2; exit 1;;
 esac
 
 case $setgid_group in
  no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
-     echo Try again with \"postfix $0 setgid_group=groupname ...\" 1>&2
-     exit 1;;
+     echo Try again with \"$0 setgid_group=groupname ...\" 1>&2; exit 1;;
 esac
 
 for path in "$daemon_directory" "$command_directory" "$queue_directory" \
@@ -315,22 +345,61 @@ do
    case "$path" in
    /*) ;;
    no) ;;
-    *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2
-       exit 1;;
+    *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2; exit 1;;
    esac
 done
 
+# Find out what parameters were not specified via command line,
+# via environment, or via installed configuration files.
+
+missing=
+for name in $MOST_PARAMETERS
+do
+    eval test -n \"\$$name\" || missing="$missing $name"
+done
+
+# All parameters must be specified at this point.
+
+test -n "$non_interactive" -a -n "$missing" && {
+    cat <<EOF | ${FMT} 1>&2
+$0: Error: some required installation parameters are not defined.
+
+- Either the parameters need to be given in the $config_directory/main.cf
+file from a recent Postfix installation,
+
+- Or the parameters need to be specified through the process
+environment.
+
+- Or the parameters need to be specified as name=value arguments
+on the $0 command line,
+
+The following parameters were missing:
+
+    $missing
+
+EOF
+    exit 1
+}
+
+POSTCONF="$command_directory/postconf"
+
 # Save settings, allowing command line/environment override.
-# Optimization: don't update main.cf if nothing has changed.
-# Caution: "`command`" removes the last newline character.
 
-test "`for name in $MOST_PARAMETERS; do eval echo \\\${\$name}; done`" = \
-    "`$POSTCONF -h $MOST_PARAMETERS`" || {
+override=
+for name in $MOST_PARAMETERS
+do
+    eval test \"\$$name\" = \"`$POSTCONF -c $config_directory -h $name`\" || {
+       override=1
+       break
+    }
+done
+
+test -n "$override" && {
     $POSTCONF -c $config_directory -e \
        "daemon_directory = $daemon_directory" \
        "command_directory = $command_directory" \
-       "data_directory = $data_directory" \
        "queue_directory = $queue_directory" \
+       "data_directory = $data_directory" \
        "mail_owner = $mail_owner" \
        "setgid_group = $setgid_group" \
        "sendmail_path = $sendmail_path" \
@@ -512,7 +581,7 @@ EOF
 
     # Postfix 2.2.
     # File systems have improved since Postfix came out, and all we
-    # require now that defer and deferred are hashed because those
+    # require now is that defer and deferred are hashed because those
     # can contain lots of files.
 
     found=`$POSTCONF -c $config_directory -h hash_queue_names`
@@ -617,6 +686,20 @@ proxywrite unix -       -       n       -       1       proxymap
 EOF
     }
 
+    # Postfix 2.5.
+    # Fix a typo in the default master.cf proxywrite entry.
+
+    grep '^proxywrite.*-[      ]*proxymap' $config_directory/master.cf >/dev/null && {
+       echo Editing $config_directory/master.cf, setting proxywrite process limit to 1
+           ed $config_directory/master.cf <<EOF || exit 1
+/^proxywrite.*-[       ]*proxymap/
+s/-\([         ]*proxymap\)/1\1/
+p
+w
+q
+EOF
+    }
+
     # Report (but do not remove) obsolete files.
 
     test -n "$obsolete" && {
index 44c2a6a395be93c4882494ce59f4cf497a7e1d13..67e334fff5e397ec6f5caabf152c4d76d40c5670 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20080131"
+#define MAIL_RELEASE_DATE      "20080201"
 #define MAIL_VERSION_NUMBER    "2.6"
 
 #ifdef SNAPSHOT