]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20020114
authorWietse Venema <wietse@porcupine.org>
Mon, 14 Jan 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:49 +0000 (06:27 +0000)
14 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/Makefile
postfix/Makefile.init
postfix/README_FILES/DB_README
postfix/README_FILES/LDAP_README
postfix/README_FILES/LMTP_README
postfix/README_FILES/PACKAGE_README [new file with mode: 0644]
postfix/README_FILES/PCRE_README
postfix/README_FILES/RESTRICTION_CLASS_README [moved from postfix/RESTRICTION_CLASS with 100% similarity]
postfix/conf/post-install
postfix/postfix-install
postfix/src/global/mail_conf.c
postfix/src/global/mail_version.h

index 50756ce4c1c0c43ba3f8a461e012e4d6be67a815..192049a7855890909f60a216ca15322dd4b80eb9 100644 (file)
@@ -5953,8 +5953,17 @@ Apologies for any names omitted.
 
        Rewrote postfix-install. The postfix-files file now controls
        what is installed.  Refined the semantics of many post-install
-       operations. post-install now auto-saves settings that override
-       main.cf.
+       operations. post-install now auto-saves settings that
+       override main.cf.
+
+20020114
+
+       Bugfix: alternate_config_directories did not take comma
+       or whitespace as separators. File: global/mail_conf.c.
+       Victor Duchovny, Norgan Stanley.
+
+       Bugfix: the rewritten postfix-install script did not chattr
+       +S the Postfix queue.
 
 Open problems:
 
index 8164bb11228b7f53d48db807706ec3ca8f3536d4..0dcc558dce9ca4e6620e3e371d8cd73ddc00f27a 100644 (file)
@@ -183,6 +183,10 @@ again.
 6 - Installing the software after successful compilation
 ========================================================
 
+This text describes how to install Postfix from source code.  See
+the PACKAGE_README file if you are building a package for distribution
+to other systems.
+
 IMPORTANT: if you are REPLACING an existing sendmail installation
 with Postfix, you may need to keep the old sendmail program running
 for some time in order to flush the mail queue.  As superuser,
index 138c9696159722840908c4b001acee5e4c0123eb..e93de9fbf35540673d6903935024f6ac9fc436d0 100644 (file)
@@ -14,7 +14,7 @@ default: update
 update depend printfck clean tidy depend_update: Makefiles
        $(MAKE) MAKELEVEL= $@
 
-install:
+install upgrade:
        @echo Please review the INSTALL instructions first.
 
 makefiles Makefiles:
index 138c9696159722840908c4b001acee5e4c0123eb..e93de9fbf35540673d6903935024f6ac9fc436d0 100644 (file)
@@ -14,7 +14,7 @@ default: update
 update depend printfck clean tidy depend_update: Makefiles
        $(MAKE) MAKELEVEL= $@
 
-install:
+install upgrade:
        @echo Please review the INSTALL instructions first.
 
 makefiles Makefiles:
index 453aff676a566f3218263cfb4073d757c984a781..d6609dd6005bee4771e76fe4098a8af36fd12eb3 100644 (file)
@@ -56,9 +56,9 @@ be lost when you update a table while Postfix is running.
 Building Postfix on Linux with a specific Berkeley DB version
 =============================================================
 
-Some Linux systems systems ship with multiple Berkeley DB
-implementations.  Normally, Postfix builds with the default DB
-version that ships with the system.
+Some Linux systems ship with multiple Berkeley DB implementations.
+Normally, Postfix builds with the default DB version that ships
+with the system.
 
 On Linux, you need to edit the makedefs script in order to specify
 a non-default DB library.
index 60b3972cf2b218afaabd7f526a04a88ce79f6a25..a69ebde3b9985c18f6cdb214b599fc8d78804d09 100644 (file)
@@ -167,7 +167,7 @@ parameter below, "server_host", would be defined in main.cf as
        postfix-users@postfix.org mailing list.
 
     debuglevel (0)
-       What level to set for debugging in the the OpenLDAP libraries.
+       What level to set for debugging in the OpenLDAP libraries.
 
 Don't use quotes in these variables; at least, not until the Postfix
 configuration routines understand how to deal with quoted strings.
index d88b72c5ad0db572507d3fb457d58b3a2ce81c4d..ca051466b77257cf780d935667a02992c9dfb129 100644 (file)
@@ -245,8 +245,8 @@ are supported.
 
 With the above settings, the Postfix local delivery agent expands
 aliases and .forward files, and delegates mailbox delivery to the
-the Cyrus LMTP server.  Postfix makes a connection to port 24 on
-the local host, subsequently transmitting the message to the lmtpd
+Cyrus LMTP server.  Postfix makes a connection to port 24 on the
+local host, subsequently transmitting the message to the lmtpd
 server managed by the Cyrus master process.
 
 
diff --git a/postfix/README_FILES/PACKAGE_README b/postfix/README_FILES/PACKAGE_README
new file mode 100644 (file)
index 0000000..14a0ad1
--- /dev/null
@@ -0,0 +1,80 @@
+Hints and tips for Postfix packagers
+====================================
+
+1) The installed main.cf file must be small. PLEASE resist the
+temptation to list all 100 million Postfix parameters in the main.cf
+file.  Postfix is supposed to be easy to configure. Listing all
+100 million parameters in main.cf defeats the purpose.
+
+2) Please provide the sample-xxx files. If these files are not
+installed in the same directory as main.cf, PLEASE update the notice
+at the top of main.cf that advises the user of the existence of
+the sample-xxx files. Without the sample-xxx files, Postfix will 
+be much more difficult to configure.
+    
+Building a package for distribution to other systems
+====================================================
+
+You can build a Postfix package on a machine that does not have
+Postfix installed on it. All you need is Postfix source code and
+a compilation environment that is compatible with the target system.
+
+You can build a pre-built Postfix package as an unprivileged user,
+but the result will be cleaner if you build the package as root.
+
+After successful Postfix compilation, execute:
+
+    % sh postfix-install
+
+You will be prompted for installation parameters.  Specify an
+install_root directory other than /.  The mail_owner and setgid_group
+installation parameter settings will be recorded in the main.cf
+file, but they won't take effect until the package is unpacked and
+installed on the destination machine.
+
+If you want to fully automate the process, specify all the non-default
+installation parameters on the command line:
+
+    % sh postfix-install -non-interactive install_root=/some/where ...
+
+Begin Security Alert.
+
+When building an archive for distribution, be sure to archive only
+files and symbolic links, not their parent directories.  Otherwise,
+unpacking a pre-built Postfix package may mess up permission and/or
+ownership of system directories such as / /etc /usr /usr/bin /var
+/var/spool and so on. This is especially an issue if you executed
+postfix-install (see above) as an unprivileged user.
+
+End Security Alert.
+
+Thus, instead of simply tarring up a pre-built tree it is much
+safer if you jump the following hoops:
+
+    % cd /install/root
+    % rm -f /some/where/outputfile
+    % find . \! -type d -print | xargs tar rf /some/where/outputfile
+    % gzip /some/where/outputfile
+
+Installing a pre-built Postfix package
+======================================
+
+To unpack a pre-built Postfix package, execute the equivalent of:
+
+    # umask 022
+    # gzip -d <outputfile.tar.gz | (cd / ; tar xvpf -)
+
+The umask command is necessary for getting the correct permissions
+on non-Postfix directories that need to be created in the process.
+
+Create the necessary mail_owner account and setgid_group group for
+exclusive use by Postfix.
+
+Execute the post-install script in the Postfix configuration
+directory to set ownership and permission of Postfix files and
+directories. Specify any non-default settings for mail_owner or
+setgid_group on the post-install command line:
+
+    # sh post-install upgrade-package setgid_group=xxx mail_owner=yyy
+
+This will also update the main.cf and master.cf files if necessary.
index 2694372d98a05aac8e05edb3fb5963c317e2c068..2a2244cf3b0526a0bc2d3199d1291c7c800b4628 100644 (file)
@@ -44,5 +44,5 @@ addresses (breaking down user@domain into user@, domain, user,
 canonical maps and virtual maps.
 
 An additional restriction is that regular expression tables cannot
-cannot be used for local alias database lookups.  That would be a
-security exposure anyway.
+be used for local alias database lookups.  That would be a security
+exposure anyway.
index e19a34bec95a21e8f5ec12360ce871ace290f5e2..10160f01f027116957b253e4f1014b338e39595d 100644 (file)
@@ -327,12 +327,12 @@ $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 as name=value arguments
-on the $0 command line,
-
 - 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
index 5e9580179d61709c87b6246e28e371e445761578..d0e569e7ccaea40a9fc833c507202092762d02a6 100644 (file)
@@ -77,7 +77,7 @@
 #      This parameter setting is not recorded in the installed main.cf file.
 # .IP tempdir
 #      Directory for scratch files while installing Postfix.
-#      You must must have write permission in this directory.
+#      You must have write permission in this directory.
 #      The built-in default directory name is the current directory.
 #      This parameter setting is not recorded in the installed main.cf file.
 # .IP config_directory
@@ -184,6 +184,17 @@ test -x bin/postconf || {
     exit 1
 }
 
+#
+# LINUX by default does not synchronously update directories -
+# that's dangerous for mail.
+#
+if [ -f /usr/bin/chattr ]
+then
+    CHATTR="/usr/bin/chattr +S"
+else
+    CHATTR=echo
+fi
+
 case `uname -s` in
 HP-UX*) FMT=cat;;
      *) FMT=fmt;;
@@ -277,7 +288,7 @@ useful if you are building ready-to-install packages for distribution
 to other machines."
 
 tempdir_prompt="a directory for scratch files while installing
-Postfix.  You must must have write permission in this directory."
+Postfix.  You must have write permission in this directory."
 
 config_directory_prompt="the destination directory for installed
 Postfix configuration files."
@@ -313,10 +324,10 @@ used by any other accounts on the system."
 setgid_group_prompt="the group for mail submission and for queue
 management commands.  Specify a group name with a numerical group
 ID that is not shared with other accounts, not even with the Postfix
-mail_owner account."
+mail_owner account. You can no longer specify \"no\" here."
 
 manpage_path_prompt="the destination directory for the Postfix on-line
-manual pages."
+manual pages. You can no longer specify \"no\" here."
 
 # Default settings, just to get started.
 
@@ -545,6 +556,7 @@ do
              test -z "$owner" || chown $owner $path || exit 1
              test -z "$group" || chgrp $group $path || exit 1
              chmod $mode $path || exit 1
+             $CHATTR $path >/dev/null 2>/dev/null
          }
          continue;;
     [fl]) ;;
@@ -582,29 +594,25 @@ do
     esac) || exit 1
 done
 
+# Save the installation parameters to main.cf even when they haven't
+# changed from their current default. Defaults can change between
+# Postfix releases, and software should not suddenly be installed in
+# the wrong place when Postfix is being upgraded.
+
+bin/postconf -c $CONFIG_DIRECTORY -e \
+    "daemon_directory = $daemon_directory" \
+    "command_directory = $command_directory" \
+    "queue_directory = $queue_directory" \
+    "mail_owner = $mail_owner" \
+    "setgid_group = $setgid_group" \
+    "sendmail_path = $sendmail_path" \
+    "mailq_path = $mailq_path" \
+    "newaliases_path = $newaliases_path" \
+    "manpage_path = $manpage_path" \
+|| exit 1
+
 # If Postfix is being installed locally from source code, do the
-# post-install processing now. The post-install script will update
-# main.cf with actual installaton parameter settings.
-#
-# If Postfix is being packaged for distribution to other systems,
-# save the installation parameters to main.cf so they can be used
-# as default settings when the post-install script is executed.
+# post-install processing now.
 
-if [ -z "$install_root" ]
-then
-    export daemon_directory command_directory queue_directory mail_owner \
-       setgid_group sendmail_path newaliases_path mailq_path manpage_path
+test -n "$install_root" ||
     ${SHELL} conf/post-install $post_install_options || exit 1
-else
-    bin/postconf -c $CONFIG_DIRECTORY -e \
-       "daemon_directory = $daemon_directory" \
-       "command_directory = $command_directory" \
-       "queue_directory = $queue_directory" \
-       "mail_owner = $mail_owner" \
-       "setgid_group = $setgid_group" \
-       "sendmail_path = $sendmail_path" \
-       "mailq_path = $mailq_path" \
-       "newaliases_path = $newaliases_path" \
-       "manpage_path = $manpage_path" \
-    || exit 1
-fi
index f8d6dbd0b555b662cf30aee539f5b6d0d92ec022..df25bed6974db5c5ff7d73c6c5d88a547d329026 100644 (file)
@@ -118,7 +118,7 @@ static void mail_conf_checkdir(const char *config_dir)
     while (found == 0 && readlline(buf, fp, (int *) 0)) {
        if (split_nameval(vstring_str(buf), &name, &value) == 0
            && strcmp(name, VAR_CONFIG_DIRS) == 0) {
-           while (found == 0 && (cp = mystrtok(&value, "\t\r\n")) != 0)
+           while (found == 0 && (cp = mystrtok(&value, "\t\r\n")) != 0)
                if (strcmp(cp, config_dir) == 0)
                    found = 1;
        }
index f62be5b14c0538e03f3278549cf70714d3b60b8b..47696dd07ca977bff299363978b9045761e5d352 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20020113"
+#define DEF_MAIL_VERSION       "Snapshot-20020114"
 extern char *var_mail_version;
 
 /* LICENSE