]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20020115
authorWietse Venema <wietse@porcupine.org>
Tue, 15 Jan 2002 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:50 +0000 (06:27 +0000)
20 files changed:
postfix/HISTORY
postfix/README_FILES/PACKAGE_README
postfix/RELEASE_NOTES
postfix/conf/main.cf
postfix/conf/post-install
postfix/conf/postfix-files
postfix/html/postfix.1.html
postfix/man/man1/postfix.1
postfix/postfix-install
postfix/src/global/Makefile.in
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/postconf/Makefile.in
postfix/src/postconf/install_table.h
postfix/src/postconf/install_vars.h
postfix/src/postfix/Makefile.in
postfix/src/postfix/postfix.c
postfix/src/postqueue/Makefile.in
postfix/src/smtpd/Makefile.in
postfix/src/util/Makefile.in

index 192049a7855890909f60a216ca15322dd4b80eb9..90bf260245baf01a3c5386dedd150085eccdbc4d 100644 (file)
@@ -5965,6 +5965,18 @@ Apologies for any names omitted.
        Bugfix: the rewritten postfix-install script did not chattr
        +S the Postfix queue.
 
+20020115
+
+       Cleanup: added sample_directory and readme_directory
+       installation parameters for sample configuration files and
+       for README files. Files: postconf.c, postfix-install,
+       conf/postfix-files, conf/post-install.
+
+       Robustness: the postfix command now exports all installation
+       parameter settings, and input filters the environment, so
+       that the startup shell scripts produce a consistent result.
+       Files: postconf.c.
+
 Open problems:
 
        Low: don't do user@domain and @domain lookups in
index 14a0ad14597d4b6e1094de35061821ca48489a21..cc1e9a7c8936657f8bc6dad98897468f59036cc8 100644 (file)
@@ -1,19 +1,51 @@
-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
-====================================================
+Purpose of this document
+========================
+
+This document has hints and tips for those who manage their own
+Postfix distribution for internal use, and for those who maintain
+Postfix distributions for general use.
+
+General distributions: please provide a small default main.cf file
+==================================================================
+
+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.
+
+General distributions: please include the sample configuration files
+====================================================================
+
+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.
+
+Postfix Installation parameter defaults
+=======================================
+
+Postfix installation is controlled by a dozen installation parameters.
+See the postfix-install and post-install files for details. Built-in
+default settings can be changed at compile time with:
+
+    % make makefiles CCARGS=whatever
+
+Names of C symbolic constants and their meaning:
+
+    DEF_CONFIG_DIR          default configuration directory
+    DEF_QUEUE_DIR           default queue directory
+    DEF_DAEMON_DIR          default daemon directory
+    DEF_COMMAND_DIR         default command directory
+    DEF_SENDMAIL_PATH       default Postfix sendmail command
+    DEF_MAILQ_PATH          default Postfix mailq command
+    DEF_NEWALIAS_PATH       default Postfix newaliases command
+    DEF_MANPAGE_DIR         default manual page directory
+    DEF_SAMPLE_DIR          default directory for sample configuration files
+    DEF_README_DIR          default directory for README files
+
+Preparing a pre-built 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
@@ -32,12 +64,13 @@ 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:
+If you want to fully automate this 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,
@@ -47,14 +80,17 @@ ownership of system directories such as / /etc /usr /usr/bin /var
 postfix-install (see above) as an unprivileged user.
 
 End Security Alert.
+-------------------
+
+Thus, to tar up the pre-built package, take the following steps:
 
-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 SOMEWHERE/outputfile
+    % find . \! -type d -print | xargs tar rf SOMEWHERE/outputfile
+    % gzip SOMEWHERE/outputfile
 
-    % cd /install/root
-    % rm -f /some/where/outputfile
-    % find . \! -type d -print | xargs tar rf /some/where/outputfile
-    % gzip /some/where/outputfile
+This way you will not include any directories that might cause trouble
+upon extraction.
 
 Installing a pre-built Postfix package
 ======================================
index 9b9c46455e286fc6b75bfb19fdb2e68071f950fe..a52c9e849a2d7b139be3281a7ecb2fdfe0b25c69 100644 (file)
@@ -1,3 +1,10 @@
+Incompatible changes with snapshot-20020115
+===========================================
+
+Another revision of installation procedures. The location of the
+sample-xxx and XXX_README files is now specified with the
+sample_directory and readme_directory parameters.
+
 Incompatible changes with snapshot-20020113
 ===========================================
 
index acf424ac0f239257289aa4bacbb15f97e7945429..c90780737c15afb192f315570db748e7f02ae493 100644 (file)
@@ -527,6 +527,14 @@ mailq_path =
 #
 setgid_group =
 
-# manpage_path: The location of the Postfix on-line manual pages.
+# manpage_directory: The location of the Postfix on-line manual pages.
 #
-manpage_path =
+manpage_directory =
+
+# sample_directory: The location of the Postfix sample configuration files.
+#
+sample_directory =
+
+# readme_directory: The location of the Postfix README files.
+#
+readme_directory =
index 10160f01f027116957b253e4f1014b338e39595d..933801cae19cf23219e27db7033d3358e7c6318a 100644 (file)
 #      The group for mail submission and for queue management commands.
 #      Its numerical group ID must not be used by any other accounts on the
 #      system, not even by the mail_owner account.
-# .IP manpage_path
+# .IP manpage_directory
 #      The directory for the Postfix on-line manual pages.
+# .IP sample_directory
+#      The directory for the Postfix sample configuration files.
+# .IP readme_directory
+#      The directory for the Postfix README files.
 # SEE ALSO
 #      postfix-install(1) Postfix primary installation script.
 # FILES
@@ -269,11 +273,15 @@ 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_path=$manpages}
+        : ${manpage_directory=$manpages}
     }
 }
 
@@ -281,30 +289,45 @@ grep setgid_group $config_directory/main.cf >/dev/null 2>&1 || {
 
 test -f $config_directory/main.cf && {
     for name in daemon_directory command_directory queue_directory mail_owner \
-        setgid_group sendmail_path newaliases_path mailq_path manpage_path
+        setgid_group sendmail_path newaliases_path mailq_path \
+       manpage_directory sample_directory readme_directory
     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_path in
- no) echo $0: Error: manpage_path no longer accepts \"no\" values. 1>&2
-     echo Re-run this script as \"$0 manpage_path=/pathname $*\". 1>&2; exit 1;;
+case $manpage_directory in
+ no) echo $0: Error: manpage_directory no longer accepts \"no\" values. 1>&2
+     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 Re-run this script as \"$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 $sendmail_path $newaliases_path $mailq_path $manpage_path
+for path in "$daemon_directory" "$command_directory" "$queue_directory" \
+    "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory" \
+    "$sample_directory"
 do
-   case $path in
+   case "$path" in
    /*) ;;
-    *) echo $0: Error: $path should be an absolute path name. 1>&2; exit 1;;
+    *) echo $0: Error: \"$path\" should be an absolute path name. 1>&2; exit 1;;
+   esac
+done
+
+for path in "$readme_directory"
+do
+   case "$path" in
+   /*) ;;
+   no) ;;
+    *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2; exit 1;;
    esac
 done
 
@@ -313,7 +336,8 @@ done
 
 missing=
 for name in daemon_directory command_directory queue_directory mail_owner \
-    setgid_group sendmail_path newaliases_path mailq_path manpage_path
+    setgid_group sendmail_path newaliases_path mailq_path manpage_directory \
+    sample_directory readme_directory
 do
     eval test -n \"\$$name\" || missing="$missing $name"
 done
@@ -347,7 +371,8 @@ POSTCONF="$command_directory/postconf"
 
 override=
 for name in daemon_directory command_directory queue_directory mail_owner \
-    setgid_group sendmail_path newaliases_path mailq_path manpage_path
+    setgid_group sendmail_path newaliases_path mailq_path manpage_directory \
+    sample_directory readme_directory
 do
     eval test \"\$$name\" = \"`$POSTCONF -c $config_directory -h $name`\" || {
        override=1
@@ -365,7 +390,9 @@ test -n "$override" && {
        "sendmail_path = $sendmail_path" \
        "mailq_path = $mailq_path" \
        "newaliases_path = $newaliases_path" \
-       "manpage_path = $manpage_path" \
+       "manpage_directory = $manpage_directory" \
+       "sample_directory = $sample_directory" \
+       "readme_directory = $readme_directory" \
     || exit 1
 }
 
@@ -379,8 +406,8 @@ test -n "$create" && {
        set_permission=
        # Skip comments.
        case $path in
-       [/$]*) ;;
-           *) continue;;
+       [$]*) ;;
+          *) continue;;
        esac
        # Expand $name, and canonicalize null fields.
        for name in path owner group flags
@@ -392,6 +419,11 @@ test -n "$create" && {
               *) ;;
            esac
        done
+       # Skip uninstalled files.
+       case $path in
+       no|no/*) continue;;
+       esac
+       # Pick up the flags.
        case $flags in *u*) upgrade_flag=1;; *) upgrade_flag=;; esac
        case $flags in *c*) create_flag=1;; *) create_flag=;; esac
        # Create missing directories with proper owner/group/mode settings.
index 662dc18b969247627d1b60e4eb930dbf2828233d..334d2aac94bbe1895c724ace34a51a2c09e74510 100644 (file)
@@ -36,6 +36,8 @@
 $config_directory:d:root:-:755:u
 $daemon_directory:d:root:-:755:u
 $queue_directory:d:root:-:755:uc
+$sample_directory:d:root:-:755
+$readme_directory:d:root:-:755
 $queue_directory/active:d:$mail_owner:-:700:uc
 $queue_directory/bounce:d:$mail_owner:-:700:uc
 $queue_directory/corrupt:d:$mail_owner:-:700:uc
@@ -91,74 +93,93 @@ $config_directory/pcre_table:f:root:-:644:p
 $config_directory/postfix-files:f:root:-:644
 $config_directory/regexp_table:f:root:-:644:p
 $config_directory/relocated:f:root:-:644:p
-$config_directory/sample-aliases.cf:f:root:-:644
-$config_directory/sample-auth.cf:f:root:-:644
-$config_directory/sample-canonical.cf:f:root:-:644
-$config_directory/sample-compatibility.cf:f:root:-:644
-$config_directory/sample-debug.cf:f:root:-:644
-$config_directory/sample-filter.cf:f:root:-:644
-$config_directory/sample-flush.cf:f:root:-:644
-$config_directory/sample-ldap.cf:f:root:-:644
-$config_directory/sample-lmtp.cf:f:root:-:644
-$config_directory/sample-local.cf:f:root:-:644
-$config_directory/sample-misc.cf:f:root:-:644
-$config_directory/sample-pcre-access.cf:f:root:-:644
-$config_directory/sample-pcre-body.cf:f:root:-:644
-$config_directory/sample-pcre-header.cf:f:root:-:644
-$config_directory/sample-qmqpd.cf:f:root:-:644
-$config_directory/sample-rate.cf:f:root:-:644
-$config_directory/sample-regexp-access.cf:f:root:-:644
-$config_directory/sample-regexp-body.cf:f:root:-:644
-$config_directory/sample-regexp-header.cf:f:root:-:644
-$config_directory/sample-relocated.cf:f:root:-:644
-$config_directory/sample-resource.cf:f:root:-:644
-$config_directory/sample-rewrite.cf:f:root:-:644
-$config_directory/sample-smtp.cf:f:root:-:644
-$config_directory/sample-smtpd.cf:f:root:-:644
-$config_directory/sample-transport.cf:f:root:-:644
-$config_directory/sample-virtual.cf:f:root:-:644
 $config_directory/transport:f:root:-:644:p
 $config_directory/virtual:f:root:-:644:p
 $config_directory/postfix-script:f:root:-:755
 $config_directory/post-install:f:root:-:755
-$manpage_path/man1/mailq.1:f:root:-:644
-$manpage_path/man1/newaliases.1:f:root:-:644
-$manpage_path/man1/postalias.1:f:root:-:644
-$manpage_path/man1/postcat.1:f:root:-:644
-$manpage_path/man1/postconf.1:f:root:-:644
-$manpage_path/man1/postdrop.1:f:root:-:644
-$manpage_path/man1/postfix.1:f:root:-:644
-$manpage_path/man1/postkick.1:f:root:-:644
-$manpage_path/man1/postlock.1:f:root:-:644
-$manpage_path/man1/postlog.1:f:root:-:644
-$manpage_path/man1/postmap.1:f:root:-:644
-$manpage_path/man1/postqueue.1:f:root:-:644
-$manpage_path/man1/postsuper.1:f:root:-:644
-$manpage_path/man1/sendmail.1:f:root:-:644
-$manpage_path/man5/access.5:f:root:-:644
-$manpage_path/man5/aliases.5:f:root:-:644
-$manpage_path/man5/canonical.5:f:root:-:644
-$manpage_path/man5/pcre_table.5:f:root:-:644
-$manpage_path/man5/regexp_table.5:f:root:-:644
-$manpage_path/man5/relocated.5:f:root:-:644
-$manpage_path/man5/transport.5:f:root:-:644
-$manpage_path/man5/virtual.5:f:root:-:644
-$manpage_path/man8/bounce.8:f:root:-:644
-$manpage_path/man8/cleanup.8:f:root:-:644
-$manpage_path/man8/defer.8:f:root:-:644
-$manpage_path/man8/error.8:f:root:-:644
-$manpage_path/man8/flush.8:f:root:-:644
-$manpage_path/man8/lmtp.8:f:root:-:644
-$manpage_path/man8/local.8:f:root:-:644
-$manpage_path/man8/master.8:f:root:-:644
-$manpage_path/man8/nqmgr.8:f:root:-:644
-$manpage_path/man8/pickup.8:f:root:-:644
-$manpage_path/man8/pipe.8:f:root:-:644
-$manpage_path/man8/qmgr.8:f:root:-:644
-$manpage_path/man8/qmqpd.8:f:root:-:644
-$manpage_path/man8/showq.8:f:root:-:644
-$manpage_path/man8/smtp.8:f:root:-:644
-$manpage_path/man8/smtpd.8:f:root:-:644
-$manpage_path/man8/spawn.8:f:root:-:644
-$manpage_path/man8/trivial-rewrite.8:f:root:-:644
-$manpage_path/man8/virtual.8:f:root:-:644
+$manpage_directory/man1/mailq.1:f:root:-:644
+$manpage_directory/man1/newaliases.1:f:root:-:644
+$manpage_directory/man1/postalias.1:f:root:-:644
+$manpage_directory/man1/postcat.1:f:root:-:644
+$manpage_directory/man1/postconf.1:f:root:-:644
+$manpage_directory/man1/postdrop.1:f:root:-:644
+$manpage_directory/man1/postfix.1:f:root:-:644
+$manpage_directory/man1/postkick.1:f:root:-:644
+$manpage_directory/man1/postlock.1:f:root:-:644
+$manpage_directory/man1/postlog.1:f:root:-:644
+$manpage_directory/man1/postmap.1:f:root:-:644
+$manpage_directory/man1/postqueue.1:f:root:-:644
+$manpage_directory/man1/postsuper.1:f:root:-:644
+$manpage_directory/man1/sendmail.1:f:root:-:644
+$manpage_directory/man5/access.5:f:root:-:644
+$manpage_directory/man5/aliases.5:f:root:-:644
+$manpage_directory/man5/canonical.5:f:root:-:644
+$manpage_directory/man5/pcre_table.5:f:root:-:644
+$manpage_directory/man5/regexp_table.5:f:root:-:644
+$manpage_directory/man5/relocated.5:f:root:-:644
+$manpage_directory/man5/transport.5:f:root:-:644
+$manpage_directory/man5/virtual.5:f:root:-:644
+$manpage_directory/man8/bounce.8:f:root:-:644
+$manpage_directory/man8/cleanup.8:f:root:-:644
+$manpage_directory/man8/defer.8:f:root:-:644
+$manpage_directory/man8/error.8:f:root:-:644
+$manpage_directory/man8/flush.8:f:root:-:644
+$manpage_directory/man8/lmtp.8:f:root:-:644
+$manpage_directory/man8/local.8:f:root:-:644
+$manpage_directory/man8/master.8:f:root:-:644
+$manpage_directory/man8/nqmgr.8:f:root:-:644
+$manpage_directory/man8/pickup.8:f:root:-:644
+$manpage_directory/man8/pipe.8:f:root:-:644
+$manpage_directory/man8/qmgr.8:f:root:-:644
+$manpage_directory/man8/qmqpd.8:f:root:-:644
+$manpage_directory/man8/showq.8:f:root:-:644
+$manpage_directory/man8/smtp.8:f:root:-:644
+$manpage_directory/man8/smtpd.8:f:root:-:644
+$manpage_directory/man8/spawn.8:f:root:-:644
+$manpage_directory/man8/trivial-rewrite.8:f:root:-:644
+$manpage_directory/man8/virtual.8:f:root:-:644
+$sample_directory/sample-aliases.cf:f:root:-:644
+$sample_directory/sample-auth.cf:f:root:-:644
+$sample_directory/sample-canonical.cf:f:root:-:644
+$sample_directory/sample-compatibility.cf:f:root:-:644
+$sample_directory/sample-debug.cf:f:root:-:644
+$sample_directory/sample-filter.cf:f:root:-:644
+$sample_directory/sample-flush.cf:f:root:-:644
+$sample_directory/sample-ldap.cf:f:root:-:644
+$sample_directory/sample-lmtp.cf:f:root:-:644
+$sample_directory/sample-local.cf:f:root:-:644
+$sample_directory/sample-misc.cf:f:root:-:644
+$sample_directory/sample-pcre-access.cf:f:root:-:644
+$sample_directory/sample-pcre-body.cf:f:root:-:644
+$sample_directory/sample-pcre-header.cf:f:root:-:644
+$sample_directory/sample-qmqpd.cf:f:root:-:644
+$sample_directory/sample-rate.cf:f:root:-:644
+$sample_directory/sample-regexp-access.cf:f:root:-:644
+$sample_directory/sample-regexp-body.cf:f:root:-:644
+$sample_directory/sample-regexp-header.cf:f:root:-:644
+$sample_directory/sample-relocated.cf:f:root:-:644
+$sample_directory/sample-resource.cf:f:root:-:644
+$sample_directory/sample-rewrite.cf:f:root:-:644
+$sample_directory/sample-smtp.cf:f:root:-:644
+$sample_directory/sample-smtpd.cf:f:root:-:644
+$sample_directory/sample-transport.cf:f:root:-:644
+$sample_directory/sample-virtual.cf:f:root:-:644
+$readme_directory/DB_README:f:root:-:644
+$readme_directory/DEBUG_README:f:root:-:644
+$readme_directory/ETRN_README:f:root:-:644
+$readme_directory/FILTER_README:f:root:-:644
+$readme_directory/LDAP_README:f:root:-:644
+$readme_directory/LINUX_README:f:root:-:644
+$readme_directory/LMTP_README:f:root:-:644
+$readme_directory/MACOSX_README:f:root:-:644
+$readme_directory/MYSQL_README:f:root:-:644
+$readme_directory/NFS_README:f:root:-:644
+$readme_directory/PACKAGE_README:f:root:-:644
+$readme_directory/PCRE_README:f:root:-:644
+$readme_directory/QMQP_README:f:root:-:644
+$readme_directory/RESTRICTION_CLASS_README:f:root:-:644
+$readme_directory/SASL_README:f:root:-:644
+$readme_directory/ULTRIX_README:f:root:-:644
+$readme_directory/UUCP_README:f:root:-:644
+$readme_directory/VERP_README:f:root:-:644
+$readme_directory/VIRTUAL_README:f:root:-:644
index 8f653d4026b290d33855a7a86b1d32216866f518..39b37cbdec61cfcfc255cf2d9168db00e303fb9a 100644 (file)
@@ -82,6 +82,7 @@ POSTFIX(1)                                             POSTFIX(1)
               This is set when the -D command-line option is pre-
               sent.
 
+<b>CONFIGURATION</b> <b>PARAMETERS</b>
        The following <b>main.cf</b> configuration  parameters  are  made
        available  as  process environment variables with the same
        names:
@@ -110,6 +111,31 @@ POSTFIX(1)                                             POSTFIX(1)
               The  group for mail submission and queue management
               commands.
 
+       <b>sendmail</b><i>_</i><b>path</b>
+              The full pathname for the Postfix sendmail command.
+
+       <b>newaliases</b><i>_</i><b>path</b>
+              The  full  pathname for the Postfix newaliases com-
+              mand.
+
+       <b>mailq</b><i>_</i><b>path</b>
+              The full pathname for the Postfix mailq command.
+
+       <b>manpage</b><i>_</i><b>directory</b>
+              The directory for the Postfix on-line manual pages.
+
+       <b>sample</b><i>_</i><b>directory</b>
+              The  directory for the Postfix sample configuration
+              files.
+
+       <b>readme</b><i>_</i><b>directory</b>
+              The directory for the Postfix README files.
+
+<b>Other</b> <b>configuration</b> <b>parameters</b>
+       <b>import</b><i>_</i><b>environment</b>
+              List of names of environment parameters that can be
+              imported from non-Postfix processes.
+
 <b>FILES</b>
        $<b>config</b><i>_</i><b>directory/postfix-script</b>, administrative commands
        $<b>config</b><i>_</i><b>directory/main.cf</b>, configuration parameters
@@ -119,7 +145,7 @@ POSTFIX(1)                                             POSTFIX(1)
        <a href="master.8.html">master(8)</a> Postfix master program
 
 <b>LICENSE</b>
-       The Secure Mailer license must be  distributed  with  this
+       The  Secure  Mailer  license must be distributed with this
        software.
 
 <b>AUTHOR(S)</b>
index a2035046898aa8e187db13684cc2d8f5915ae539..204cd7e2aceeb08a06b9476712557c1a347244ec 100644 (file)
@@ -75,7 +75,11 @@ Directory with Postfix configuration files.
 This is set when the -v command-line option is present.
 .IP \fBMAIL_DEBUG\fR
 This is set when the -D command-line option is present.
-.PP
+.SH CONFIGURATION PARAMETERS
+.na
+.nf
+.ad
+.fi
 The following \fBmain.cf\fR configuration parameters are made
 available as process environment variables with the same names:
 .IP \fBcommand_directory\fR
@@ -93,6 +97,24 @@ that run in the optional chrooted environment.
 The owner of Postfix queue files and of most Postfix processes.
 .IP \fBsetgid_group\fR
 The group for mail submission and queue management commands.
+.IP \fBsendmail_path
+The full pathname for the Postfix sendmail command.
+.IP \fBnewaliases_path
+The full pathname for the Postfix newaliases command.
+.IP \fBmailq_path
+The full pathname for the Postfix mailq command.
+.IP \fBmanpage_directory
+The directory for the Postfix on-line manual pages.
+.IP \fBsample_directory
+The directory for the Postfix sample configuration files.
+.IP \fBreadme_directory
+The directory for the Postfix README files.
+.SH Other configuration parameters
+.ad
+.fi
+.IP \fBimport_environment\fR
+List of names of environment parameters that can be imported
+from non-Postfix processes.
 .SH FILES
 .na
 .nf
index d0e569e7ccaea40a9fc833c507202092762d02a6..7502543520550c8a55a600971fc4ce2bef7c9fef 100644 (file)
 #      system, not even by the mail_owner account.
 #      The built-in default group name is postdrop.
 #      This parameter setting is recorded in the installed main.cf file.
-# .IP manpage_path
+# .IP manpage_directory
 #      The destination directory for the Postfix on-line manual pages.
 #      This parameter setting is recorded in the installed main.cf file.
+# .IP sample_directory
+#      The destination directory for the Postfix sample configuration files.
+#      This parameter setting is recorded in the installed main.cf file.
+# .IP readme_directory
+#      The destination directory for the Postfix README files.
+#      This parameter setting is recorded in the installed main.cf file.
 # SEE ALSO
 #      post-install(1) post-installation procedure
 # FILES
@@ -326,9 +332,15 @@ 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. You can no longer specify \"no\" here."
 
-manpage_path_prompt="the destination directory for the Postfix on-line
+manpage_directory_prompt="the destination directory for the Postfix on-line
 manual pages. You can no longer specify \"no\" here."
 
+sample_directory_prompt="the destination directory for the Postfix
+sample configuration files."
+
+readme_directory_prompt="the destination directory for the Postfix
+README files. Specify \"no\" if you do not want to install these files."
+
 # Default settings, just to get started.
 
 : ${install_root=/}
@@ -373,11 +385,15 @@ 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 : \${$name="\`. $CONFIG_DIRECTORY/install.cf; echo \$$name\`"} \
+           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_path=$manpages}
+       : ${manpage_directory=$manpages}
     }
 }
 
@@ -385,8 +401,13 @@ grep setgid_group $CONFIG_DIRECTORY/main.cf >/dev/null 2>&1 || {
 
 test -f $CONFIG_DIRECTORY/main.cf && {
     for name in daemon_directory command_directory queue_directory mail_owner \
-       setgid_group sendmail_path newaliases_path mailq_path manpage_path
+       setgid_group sendmail_path newaliases_path mailq_path manpage_directory \
+       sample_directory readme_directory
     do
+       eval junk=\$$name
+       case "$junk" in
+       "") eval unset $name;;
+       esac
        eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -h $name\`} ||
            exit 1
     done
@@ -395,8 +416,13 @@ test -f $CONFIG_DIRECTORY/main.cf && {
 # Use built-in defaults as the final source of parameter settings.
 
 for name in daemon_directory command_directory queue_directory mail_owner \
-    setgid_group sendmail_path newaliases_path mailq_path manpage_path
+    setgid_group sendmail_path newaliases_path mailq_path manpage_directory \
+    sample_directory readme_directory
 do
+    eval junk=\$$name
+    case "$junk" in
+    "") eval unset $name;;
+    esac
     eval : \${$name=\`bin/postconf -d -h $name\`} || exit 1
 done
 
@@ -404,7 +430,7 @@ done
 
 test -z "$non_interactive" && for name in daemon_directory command_directory \
     queue_directory sendmail_path newaliases_path mailq_path mail_owner \
-    setgid_group manpage_path
+    setgid_group manpage_directory sample_directory readme_directory
 do
     while :
     do
@@ -421,28 +447,39 @@ done
 
 # Sanity checks
 
-case $setgid_group in
- no) echo $0: Error: the setgid_group parameter no longer accepts 1>&2
-     echo \"no\" values. Try again with \"setgid_group=groupname\" on the 1>&2
-     echo command line or execute \"make install\" and specify setgid_group 1>&2
-     echo interactively. 1>&2
+case "$setgid_group" in
+ no) (echo $0: Error: the setgid_group parameter no longer accepts 
+     echo \"no\" values. Try again with \"setgid_group=groupname\" on the 
+     echo command line or execute \"make install\" and specify setgid_group
+     echo interactively.) | ${FMT} 1>&2
      exit 1;;
 esac
 
-case $manpage_path in
- no) echo $0: Error: the manpage_path parameter no longer accepts 1>&2
-     echo \"no\" values.  Try again with \"manpage_path=/path/name\" on the 1>&2
-     echo command line or execute \"make install\" and specify manpage_path 1>&2
-     echo interactively. 1>&2
+case "$manpage_directory" in
+ no) (echo $0: Error: the manpage_directory parameter no longer accepts 
+     echo \"no\" values.  Try again with \"manpage_directory=/path/name\" 
+     echo on the command line or execute \"make install\" and specify
+     echo manpage_directory interactively.) | ${FMT} 1>&2
      exit 1;;
 esac
 
-for path in $daemon_directory $command_directory \
-    $queue_directory $sendmail_path $newaliases_path $mailq_path $manpage_path
+for path in "$readme_directory"
+do
+   case "$path" in
+   /*) ;;
+   no) ;;
+    *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2
+       exit 1;;
+   esac
+done
+
+for path in "$daemon_directory" "$command_directory" "$queue_directory" \
+    "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory" \
+    "$sample_directory"
 do
-   case $path in
+   case "$path" in
    /*) ;;
-    *) echo $0: Error: $path should be an absolute path name. 1>&2; exit 1;;
+    *) echo $0: Error: \"$path\" should be an absolute path name. 1>&2; exit 1;;
    esac
 done
 
@@ -464,14 +501,14 @@ test -z "$install_root" && {
     }
 
     chown "$mail_owner" $tempdir/junk >/dev/null 2>&1 || {
-       echo $0: Error: $mail_owner needs an entry in the passwd file. 1>&2
-       echo Remember, $mail_owner needs a dedicated user id and group id. 1>&2
+       echo $0: Error: \"$mail_owner\" needs an entry in the passwd file. 1>&2
+       echo Remember, \"$mail_owner\" needs a dedicated user and group id. 1>&2
        exit 1
     }
 
     chgrp "$setgid_group" $tempdir/junk >/dev/null 2>&1 || {
-       echo $0: Error: $setgid needs an entry in the group file. 1>&2
-       echo Remember, $setgid needs a dedicated group id. 1>&2
+       echo $0: Error: \"$setgid_group\" needs an entry in the group file. 1>&2
+       echo Remember, \"$setgid_group\" needs a dedicated group id. 1>&2
        exit 1
     }
 
@@ -489,12 +526,18 @@ QUEUE_DIRECTORY=$install_root$queue_directory
 SENDMAIL_PATH=$install_root$sendmail_path
 NEWALIASES_PATH=$install_root$newaliases_path
 MAILQ_PATH=$install_root$mailq_path
-MANPAGE_PATH=$install_root$manpage_path
+MANPAGE_DIRECTORY=$install_root$manpage_directory
+SAMPLE_DIRECTORY=$install_root$sample_directory
+README_DIRECTORY=$install_root$readme_directory
 
 # Avoid repeated tests for existence of these.
 
 test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
 test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1
+test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1
+test -d $SAMPLE_DIRECTORY || mkdir -p $SAMPLE_DIRECTORY || exit 1
+test "$readme_directory" = "no" -o -d $README_DIRECTORY || 
+       mkdir -p $README_DIRECTORY || exit 1
 
 # Upgrade or first-time installation?
 
@@ -551,7 +594,7 @@ do
 
     case $type in
        d) eval path=$install_root$path
-         test -d $path || {
+         test "$path" = "${install_root}no" -o -d $path || {
              mkdir -p $path || exit 1
              test -z "$owner" || chown $owner $path || exit 1
              test -z "$group" || chgrp $group $path || exit 1
@@ -586,10 +629,17 @@ do
        '$newaliases_path')
            check_parent $NEWALIASES_PATH || exit 1
            compare_or_symlink $SENDMAIL_PATH $NEWALIASES_PATH || exit 1;;
-       '$manpage_path')
-           check_parent $MANPAGE_PATH/$file || exit 1
-           compare_or_replace 644 "$owner" "$group" man/$file \
-               $MANPAGE_PATH/$file || exit 1;;
+       '$manpage_directory')
+           check_parent $MANPAGE_DIRECTORY/$file || exit 1
+           compare_or_replace $mode "$owner" "$group" man/$file \
+               $MANPAGE_DIRECTORY/$file || exit 1;;
+       '$sample_directory')
+           compare_or_replace $mode "$owner" "$group" conf/$file \
+               $SAMPLE_DIRECTORY/$file || exit 1;;
+       '$readme_directory')
+           test "$readme_directory" = "no" ||
+               compare_or_replace $mode "$owner" "$group" README_FILES/$file \
+                   $README_DIRECTORY/$file || exit 1;;
         *) echo $0: Error: unknown entry $path in conf/postfix-files; exit 1;;
     esac) || exit 1
 done
@@ -608,11 +658,17 @@ bin/postconf -c $CONFIG_DIRECTORY -e \
     "sendmail_path = $sendmail_path" \
     "mailq_path = $mailq_path" \
     "newaliases_path = $newaliases_path" \
-    "manpage_path = $manpage_path" \
+    "manpage_directory = $manpage_directory" \
+    "sample_directory = $sample_directory" \
+    "readme_directory = $readme_directory" \
 || exit 1
 
 # If Postfix is being installed locally from source code, do the
 # post-install processing now.
 
-test -n "$install_root" ||
+test -n "$install_root" || {
+    export daemon_directory command_directory queue_directory sendmail_path \
+       newaliases_path mailq_path mail_owner setgid_group manpage_directory \
+       sample_directory readme_directory
     ${SHELL} conf/post-install $post_install_options || exit 1
+}
index 73b3d1236fd32e188928999f6e5746751f649430..6083e1107b102721d4d5ee43064bf495f94378d2 100644 (file)
@@ -513,7 +513,7 @@ mail_conf.o: ../../include/dict.h
 mail_conf.o: ../../include/argv.h
 mail_conf.o: ../../include/safe.h
 mail_conf.o: ../../include/stringops.h
-mail_conf.o: ../../include/safe_open.h
+mail_conf.o: ../../include/readlline.h
 mail_conf.o: mail_params.h
 mail_conf.o: mail_conf.h
 mail_conf_bool.o: mail_conf_bool.c
index 959c017c0d9e8e0bd4a0c2d38dff7a168b2e7dd6..4009dbdc2b52ebbfe3f6b88b5d538d61ed83422a 100644 (file)
@@ -1396,8 +1396,20 @@ extern int var_fault_inj_code;
 #define DEF_NEWALIAS_PATH              "/usr/bin/newaliases"
 #endif
 
-#define VAR_MANPAGE_PATH               "manpage_path"
-#define DEF_MANPAGE_PATH               "/usr/local/man"
+#define VAR_MANPAGE_DIR                        "manpage_directory"
+#ifndef DEF_MANPAGE_DIR
+#define DEF_MANPAGE_DIR                        "/usr/local/man"
+#endif
+
+#define VAR_SAMPLE_DIR                 "sample_directory"
+#ifndef DEF_SAMPLE_DIR
+#define DEF_SAMPLE_DIR                 DEF_CONFIG_DIR
+#endif
+
+#define VAR_README_DIR                 "readme_directory"
+#ifndef DEF_README_DIR
+#define DEF_README_DIR                 "no"
+#endif
 
 /* LICENSE
 /* .ad
index 47696dd07ca977bff299363978b9045761e5d352..4e9c07d482f0c80eb185e3b04523b78d78163e46 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20020114"
+#define DEF_MAIL_VERSION       "Snapshot-20020115"
 extern char *var_mail_version;
 
 /* LICENSE
index 3deeb43a5c8a3bbfec3b33e40edca8fbd81e84bb..2c0b7e7d520ee8a9fd2f400c20b9166fd72c87b6 100644 (file)
@@ -99,9 +99,11 @@ postconf.o: int_vars.h
 postconf.o: str_vars.h
 postconf.o: raw_vars.h
 postconf.o: smtp_vars.h
+postconf.o: install_vars.h
 postconf.o: time_table.h
 postconf.o: bool_table.h
 postconf.o: int_table.h
 postconf.o: str_table.h
 postconf.o: smtp_table.h
+postconf.o: install_table.h
 postconf.o: raw_table.h
index 21209fa93a3aad83b676ecd4f9c459e654bd05a5..a7dff6f3f18c142f334081eaca1552aac08f2e31 100644 (file)
@@ -1,5 +1 @@
-    VAR_SENDMAIL_PATH, DEF_SENDMAIL_PATH, &var_sendmail_path, 1, 0,
-    VAR_MAILQ_PATH, DEF_MAILQ_PATH, &var_mailq_path, 1, 0,
-    VAR_NEWALIAS_PATH, DEF_NEWALIAS_PATH, &var_newalias_path, 1, 0,
     VAR_CONFIG_DIR, DEF_CONFIG_DIR, &var_config_dir, 1, 0,
-    VAR_MANPAGE_PATH, DEF_MANPAGE_PATH, &var_manpage_path, 1, 0,
index 9321b1473e3fe79e68852439483e411b623cd7cd..c54581ee8ee54526a633c2a3dadbf944735f49ea 100644 (file)
@@ -1,5 +1 @@
-char   *var_sendmail_path;
-char   *var_mailq_path;
-char   *var_newalias_path;
 char   *var_config_dir;
-char   *var_manpage_path;
index 3b651dbecc310b142983f88722713e673fdaed09..21f14ef8050c9042b4d64466081f07e3f077a0e1 100644 (file)
@@ -66,5 +66,7 @@ postfix.o: ../../include/msg_vstream.h
 postfix.o: ../../include/msg_syslog.h
 postfix.o: ../../include/stringops.h
 postfix.o: ../../include/vstring.h
+postfix.o: ../../include/clean_env.h
+postfix.o: ../../include/argv.h
 postfix.o: ../../include/mail_conf.h
 postfix.o: ../../include/mail_params.h
index ce5417c54bd79216b5b69a733b2ba4864245761a..dca1876bb22e4c91c37e6ed99edd84d809f8e8fc 100644 (file)
@@ -67,7 +67,9 @@
 /*     This is set when the -v command-line option is present.
 /* .IP \fBMAIL_DEBUG\fR
 /*     This is set when the -D command-line option is present.
-/* .PP
+/* CONFIGURATION PARAMETERS
+/* .ad
+/* .fi
 /*     The following \fBmain.cf\fR configuration parameters are made
 /*     available as process environment variables with the same names:
 /* .IP \fBcommand_directory\fR
 /*     communication endpoints, and with files needed for daemon programs
 /*     that run in the optional chrooted environment.
 /* .IP \fBmail_owner\fR
-/*     The owner of Postfix queue files and of most Postfix processes.
+/*      The owner of Postfix queue files and of most Postfix processes.
 /* .IP \fBsetgid_group\fR
-/*     The group for mail submission and queue management commands.
+/*      The group for mail submission and queue management commands.
+/* .IP \fBsendmail_path
+/*       The full pathname for the Postfix sendmail command.
+/* .IP \fBnewaliases_path
+/*       The full pathname for the Postfix newaliases command.
+/* .IP \fBmailq_path
+/*       The full pathname for the Postfix mailq command.
+/* .IP \fBmanpage_directory
+/*       The directory for the Postfix on-line manual pages.
+/* .IP \fBsample_directory
+/*       The directory for the Postfix sample configuration files.
+/* .IP \fBreadme_directory
+/*       The directory for the Postfix README files.
+/* .SH Other configuration parameters
+/* .ad
+/* .fi
+/* .IP \fBimport_environment\fR
+/*     List of names of environment parameters that can be imported
+/*     from non-Postfix processes.
 /* FILES
 /*     $\fBconfig_directory/postfix-script\fR, administrative commands
 /*     $\fBconfig_directory/main.cf\fR, configuration parameters
 #include <msg_vstream.h>
 #include <msg_syslog.h>
 #include <stringops.h>
+#include <clean_env.h>
+#include <argv.h>
 
 /* Global library. */
 
 #include <mail_conf.h>
 #include <mail_params.h>
 
+/* Additional installation parameters. */
+
+static char *var_sendmail_path;
+static char *var_mailq_path;
+static char *var_newalias_path;
+static char *var_manpage_dir;
+static char *var_sample_dir;
+static char *var_readme_dir;
+
 /* check_setenv - setenv() with extreme prejudice */
 
 static void check_setenv(char *name, char *value)
@@ -147,6 +178,16 @@ int     main(int argc, char **argv)
     int     uid;
     int     fd;
     int     ch;
+    ARGV   *import_env;
+    static CONFIG_STR_TABLE str_table[] = {
+       VAR_SENDMAIL_PATH, DEF_SENDMAIL_PATH, &var_sendmail_path, 1, 0,
+       VAR_MAILQ_PATH, DEF_MAILQ_PATH, &var_mailq_path, 1, 0,
+       VAR_NEWALIAS_PATH, DEF_NEWALIAS_PATH, &var_newalias_path, 1, 0,
+       VAR_MANPAGE_DIR, DEF_MANPAGE_DIR, &var_manpage_dir, 1, 0,
+       VAR_SAMPLE_DIR, DEF_SAMPLE_DIR, &var_sample_dir, 1, 0,
+       VAR_README_DIR, DEF_README_DIR, &var_readme_dir, 1, 0,
+       0,
+    };
 
     /*
      * Be consistent with file permissions.
@@ -213,6 +254,17 @@ int     main(int argc, char **argv)
      * scripts.
      */
     mail_conf_read();
+    get_mail_conf_str_table(str_table);
+
+    /*
+     * Environment import filter, to enforce consistent behavior whether this
+     * command is started by hand, or at system boot time. This is necessary
+     * because some shell scripts use environment settings to override
+     * main.cf settings.
+     */
+    import_env = argv_split(var_import_environ, ", \t\r\n");
+    clean_env(import_env->argv);
+    argv_free(import_env);
 
     check_setenv("PATH", ROOT_PATH);           /* sys_defs.h */
     check_setenv(CONF_ENV_PATH, var_config_dir);/* mail_conf.h */
@@ -221,8 +273,18 @@ int     main(int argc, char **argv)
     check_setenv(VAR_DAEMON_DIR, var_daemon_dir);      /* main.cf */
     check_setenv(VAR_QUEUE_DIR, var_queue_dir);        /* main.cf */
     check_setenv(VAR_CONFIG_DIR, var_config_dir);      /* main.cf */
+
+    /*
+     * Do we want to keep adding things here as shell scripts evolve?
+     */
     check_setenv(VAR_MAIL_OWNER, var_mail_owner);      /* main.cf */
     check_setenv(VAR_SGID_GROUP, var_sgid_group);      /* main.cf */
+    check_setenv(VAR_SENDMAIL_PATH, var_sendmail_path);        /* main.cf */
+    check_setenv(VAR_MAILQ_PATH, var_mailq_path);      /* main.cf */
+    check_setenv(VAR_NEWALIAS_PATH, var_newalias_path);        /* main.cf */
+    check_setenv(VAR_MANPAGE_DIR, var_manpage_dir);    /* main.cf */
+    check_setenv(VAR_SAMPLE_DIR, var_sample_dir);      /* main.cf */
+    check_setenv(VAR_README_DIR, var_readme_dir);      /* main.cf */
 
     /*
      * Make sure these directories exist. Run the maintenance scripts with as
index 864226d0ae769b777b1ed06beb0d8aeaa4e8afe4..f9470cc9a477d163aec885a1cd3722204217dcb5 100644 (file)
@@ -66,6 +66,7 @@ postqueue.o: ../../include/argv.h
 postqueue.o: ../../include/safe.h
 postqueue.o: ../../include/connect.h
 postqueue.o: ../../include/iostuff.h
+postqueue.o: ../../include/valid_hostname.h
 postqueue.o: ../../include/mail_proto.h
 postqueue.o: ../../include/attr.h
 postqueue.o: ../../include/mail_params.h
@@ -74,5 +75,6 @@ postqueue.o: ../../include/mail_task.h
 postqueue.o: ../../include/debug_process.h
 postqueue.o: ../../include/mail_run.h
 postqueue.o: ../../include/mail_flush.h
+postqueue.o: ../../include/flush_clnt.h
 postqueue.o: ../../include/smtp_stream.h
 postqueue.o: ../../include/vstring.h
index 0587eb59e9013504be62b52fdb03c1421b5df5e0..8668041980ee590f11f8d263ae86f34e7f200e63 100644 (file)
@@ -193,6 +193,7 @@ smtpd_check.o: ../../include/mail_conf.h
 smtpd_check.o: ../../include/maps.h
 smtpd_check.o: ../../include/mail_addr_find.h
 smtpd_check.o: ../../include/match_parent_style.h
+smtpd_check.o: ../../include/split_addr.h
 smtpd_check.o: smtpd.h
 smtpd_check.o: ../../include/mail_stream.h
 smtpd_check.o: smtpd_sasl_glue.h
index 1eb00cbe3948da44f7350d3f8ba99b3ec0e86245..e483e6c761f408ed8d042a2a2857b40e789bfa9f 100644 (file)
@@ -498,6 +498,7 @@ dict.o: vbuf.h
 dict.o: vstring.h
 dict.o: readlline.h
 dict.o: mac_parse.h
+dict.o: stringops.h
 dict.o: dict.h
 dict.o: argv.h
 dict.o: dict_ht.h