From 046bb3324d1191a21be818c85b718c0821ab283e Mon Sep 17 00:00:00 2001 From: Wietse Venema Date: Mon, 14 Jan 2002 00:00:00 -0500 Subject: [PATCH] snapshot-20020114 --- postfix/HISTORY | 13 ++- postfix/INSTALL | 4 + postfix/Makefile | 2 +- postfix/Makefile.init | 2 +- postfix/README_FILES/DB_README | 6 +- postfix/README_FILES/LDAP_README | 2 +- postfix/README_FILES/LMTP_README | 4 +- postfix/README_FILES/PACKAGE_README | 80 +++++++++++++++++++ postfix/README_FILES/PCRE_README | 4 +- .../RESTRICTION_CLASS_README} | 0 postfix/conf/post-install | 6 +- postfix/postfix-install | 64 ++++++++------- postfix/src/global/mail_conf.c | 2 +- postfix/src/global/mail_version.h | 2 +- 14 files changed, 146 insertions(+), 45 deletions(-) create mode 100644 postfix/README_FILES/PACKAGE_README rename postfix/{RESTRICTION_CLASS => README_FILES/RESTRICTION_CLASS_README} (100%) diff --git a/postfix/HISTORY b/postfix/HISTORY index 50756ce4c..192049a78 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -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: diff --git a/postfix/INSTALL b/postfix/INSTALL index 8164bb112..0dcc558dc 100644 --- a/postfix/INSTALL +++ b/postfix/INSTALL @@ -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, diff --git a/postfix/Makefile b/postfix/Makefile index 138c96961..e93de9fbf 100644 --- a/postfix/Makefile +++ b/postfix/Makefile @@ -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: diff --git a/postfix/Makefile.init b/postfix/Makefile.init index 138c96961..e93de9fbf 100644 --- a/postfix/Makefile.init +++ b/postfix/Makefile.init @@ -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: diff --git a/postfix/README_FILES/DB_README b/postfix/README_FILES/DB_README index 453aff676..d6609dd60 100644 --- a/postfix/README_FILES/DB_README +++ b/postfix/README_FILES/DB_README @@ -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. diff --git a/postfix/README_FILES/LDAP_README b/postfix/README_FILES/LDAP_README index 60b3972cf..a69ebde3b 100644 --- a/postfix/README_FILES/LDAP_README +++ b/postfix/README_FILES/LDAP_README @@ -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. diff --git a/postfix/README_FILES/LMTP_README b/postfix/README_FILES/LMTP_README index d88b72c5a..ca051466b 100644 --- a/postfix/README_FILES/LMTP_README +++ b/postfix/README_FILES/LMTP_README @@ -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 index 000000000..14a0ad145 --- /dev/null +++ b/postfix/README_FILES/PACKAGE_README @@ -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 /dev/null 2>/dev/null } continue;; [fl]) ;; @@ -582,29 +594,25 @@ do esac) || exit 1 done -# 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. +# 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. -if [ -z "$install_root" ] -then - export daemon_directory command_directory queue_directory mail_owner \ - setgid_group sendmail_path newaliases_path mailq_path manpage_path +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. + +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 diff --git a/postfix/src/global/mail_conf.c b/postfix/src/global/mail_conf.c index f8d6dbd0b..df25bed69 100644 --- a/postfix/src/global/mail_conf.c +++ b/postfix/src/global/mail_conf.c @@ -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; } diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index f62be5b14..47696dd07 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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