]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.6-20090125
authorWietse Venema <wietse@porcupine.org>
Sun, 25 Jan 2009 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:35:11 +0000 (06:35 +0000)
13 files changed:
postfix/HISTORY
postfix/conf/postfix-wrapper
postfix/html/postconf.5.html
postfix/html/postfix-wrapper.5.html
postfix/html/postfix.1.html
postfix/man/man1/postfix.1
postfix/man/man5/postconf.5
postfix/man/man5/postfix-wrapper.5
postfix/mantools/postlink
postfix/proto/postconf.proto
postfix/proto/postfix-wrapper
postfix/src/global/mail_version.h
postfix/src/postfix/postfix.c

index 55265c1570c4bcce56839571839c7a4b2ff979e7..86d7e24e54e900b6538385eb8d8ba532a4101d6a 100644 (file)
@@ -14940,3 +14940,9 @@ Apologies for any names omitted.
        More little fixes in the "trivial but useful" postfix-wrapper
        including instructions. It's ready for testing in the field.
        File: conf/postfix-wrapper.
+
+20090125
+
+       Documentation: more precise description of multi-instance
+       manager API, and minor edits of the example program. Files:
+       conf/postfix-wrapper, proto/postfix-wrapper.
index ff9afef47b9d49775f7af12ae0d510f72df37f50..aa5c5af0d72cc0c431016036f0704fa6483b3c4b 100644 (file)
@@ -1,8 +1,5 @@
 #!/bin/sh
 
-# To view the formatted manual page of this file, type:
-#      POSTFIXSOURCE/mantools/srctoman - postfix-wrapper | nroff -man
-
 #++
 # NAME
 #      postfix-wrapper 1
@@ -197,7 +194,8 @@ instance_dirs=`$POSTCONF -h multi_instance_directories | sed 's/,/ /'` ||
     exit 1
 
 case "$1" in
-  stop|abort|drain) all_dirs=
+  stop|quick-stop|abort|drain)
+       all_dirs=
        for dir in $config_directory $instance_dirs
        do
            all_dirs="$dir $all_dirs"
@@ -209,6 +207,7 @@ esac
 # instance is disabled, replace "postfix start" by "postfix check"
 # so that problems will still be reported.
 
+err=0
 for dir in $all_dirs
 do
     case "$1" in
index ed16ac8427cbaa3853d09ff315808c6bd3ce9353..0b57706ecf0892927ae324ff90249ebb43928561 100644 (file)
@@ -5810,8 +5810,6 @@ Postfix instance, and that are started, stopped, etc., together
 with the default Postfix instance.  Specify a list of pathnames
 separated by comma or whitespace.  </p>
 
-<p> This feature is available in Postfix 2.6 and later. </p>
-
 <p> When the list of non-default Postfix configuration directories
 is non-empty, the <a href="postfix.1.html">postfix(1)</a> command will invoke the multi-instance
 manager specified with the <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a> parameter to
@@ -5867,7 +5865,8 @@ becomes also the default value for the <a href="postconf.5.html#syslog_name">sys
 <a href="postfix.1.html">postfix(1)</a> command invokes when the <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>
 parameter value is non-empty. The pathname may be followed by
 initial command arguments separated by whitespace; shell
-metacharacters are not supported in this context. </p>
+metacharacters such as quotes are not supported in this context.
+</p>
 
 <p> The <a href="postfix.1.html">postfix(1)</a> command invokes the manager command with the
 <a href="postfix.1.html">postfix(1)</a> non-option command arguments on the manager command line,
index b92315e8fac6513f2201082faa1150123f7afaee..1e3282fcebb8dee01e6957b2159a57a5e1dcf358 100644 (file)
@@ -41,85 +41,91 @@ POSTFIX-WRAPPER(5)                                          POSTFIX-WRAPPER(5)
        To start, stop, update, etc., multiple Postfix  instances,
        use:
 
-           # postfix <i>command</i>
+              # postfix <i>command</i>
 
        For  example,  to find out what Postfix instances are con-
        figured:
 
-           # postfix status
+              # postfix status
 
+<b>MANAGING AN INDIVIDUAL POSTFIX INSTANCE</b>
        To manage an individual Postfix instance, use:
 
-           # postfix -c <i>/path/to/config</i><b>_</b><i>directory command</i>
-
-<b>MULTI-INSTANCE DETECTION</b>
-       While "postfix start/stop/etc"  will  remain  the  primary
-       command interface, the <a href="postfix.1.html">postfix(1)</a> command itself will need
-       to figure  out  if  a  command  targets  multiple  Postfix
-       instances or just a specific Postfix instance.  This deci-
-       sion can be made with information that is  already  avail-
-       able:
-
-              When  the <a href="postfix.1.html">postfix(1)</a> command is invoked with the -c
-              option, it  will  operate  only  on  the  specified
-              instance.  We do the same when MAIL_CONFIG is spec-
-              ified in the process environment.
-
-              Otherwise, the <a href="postfix.1.html">postfix(1)</a> command will  operate  on
-              all applicable Postfix instances.
-
-<b>MULTI-INSTANCE MANAGER HOOK</b>
-       When  the <a href="postfix.1.html">postfix(1)</a> command is invoked without -c option,
-       and non-default Postfix instance directories  are  defined
-       in <a href="postconf.5.html">main.cf</a> with <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>, then the post-
-       fix(1) command invokes the command  specified  in  <a href="postconf.5.html">main.cf</a>
-       with  <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a>, instead of invoking postfix-
-       script.   The  <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a>  and  other  <a href="postconf.5.html">main.cf</a>
-       parameters are listed in the CONFIGURATION PARAMETERS sec-
-       tion below.
+              # postfix -c <i>/path/to/config</i><b>_</b><i>directory command</i>
 
-       A useful wrapper implementation can be as simple as:
-
-           #!/bin/sh
-
-           : ${<a href="postconf.5.html#command_directory">command_directory</a>?"do not invoke this command directly"}
+       When the <a href="postfix.1.html">postfix(1)</a> command is invoked with the -c option,
+       it  will operate only on the specified instance.  The same
+       happens when MAIL_CONFIG is specified in the process envi-
+       ronment.
 
-           POSTCONF=$<a href="postconf.5.html#command_directory">command_directory</a>/postconf
-           POSTFIX=$<a href="postconf.5.html#command_directory">command_directory</a>/postfix
-           instance_dirs=`$POSTCONF -h <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> |
-                           sed 's/,/ /'` || exit 1
+       Otherwise,  the  <a href="postfix.1.html">postfix(1)</a>  command  will  operate on all
+       applicable Postfix instances.
 
-           for dir in $<a href="postconf.5.html#config_directory">config_directory</a> $instance_dirs
-           do
-               case "$1" in
-               stop|abort|flush|reload|drain)
-                   test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`"
-                           = yes || continue;;
-               start)
-                   test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`"
-                           = yes || set check;;
-               esac
-               $POSTFIX -c $dir "$@" || err=$?
-           done
+<b>MULTI-INSTANCE MANAGER EXAMPLE</b>
+       When the <a href="postfix.1.html">postfix(1)</a> command is invoked without  -c  option
+       or  MAIL_CONFIG environment setting, and non-default Post-
+       fix instance directories are defined in <a href="postconf.5.html">main.cf</a>  with  the
+       <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>  parameter,  <a href="postfix.1.html">postfix(1)</a> invokes
+       the   command    specified    in    <a href="postconf.5.html">main.cf</a>    with    the
+       <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a>   parameter,  instead  of  invoking
+       postfix-script.
 
-           exit $err
+       The <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> and other  <a href="postconf.5.html">main.cf</a>  parame-
+       ters are listed below in the CONFIGURATION PARAMETERS sec-
+       tion.
 
-       This wrapper skips commands such as "stop" that require  a
-       running  Postfix  instance when a Postfix instance is dis-
-       abled, and replaces "start" by "check"  so  that  problems
-       will still be reported.
+       A useful wrapper implementation can be as simple as:
 
-       The  postmulti(1)  command implements a more sophisticated
-       approach, based on a combination of C code and  scripting.
+              #!/bin/sh
+
+              : ${<a href="postconf.5.html#command_directory">command_directory</a>?"do not invoke this command directly"}
+
+              POSTCONF=$<a href="postconf.5.html#command_directory">command_directory</a>/postconf
+              POSTFIX=$<a href="postconf.5.html#command_directory">command_directory</a>/postfix
+              instance_dirs=`$POSTCONF -h <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> |
+                              sed 's/,/ /'` || exit 1
+
+              err=0
+              for dir in $<a href="postconf.5.html#config_directory">config_directory</a> $instance_dirs
+              do
+                  case "$1" in
+                  stop|abort|flush|reload|drain)
+                      test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`" \
+                              = yes || continue;;
+                  start)
+                      test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`" \
+                              = yes || set check;;
+                  esac
+                  $POSTFIX -c $dir "$@" || err=$?
+              done
+
+              exit $err
+
+       The postmulti(1) command implements a  more  sophisticated
+       approach,  based on a combination of C code and scripting.
+
+<b>ENABLING AN INSTANCE FOR MULTI-INSTANCE OPERATION</b>
+       To enable start/stop/etc. by a multi-instance manager, set
+       the   Postfix   instance's  <a href="postconf.5.html">main.cf</a>  <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>
+       parameter to "yes".  This parameter has no effect on  sin-
+       gle-instance   operation  with  "postfix  -c"  or  with  a
+       MAIL_CONFIG environment setting.
+
+       The multi-instance manager program will skip commands such
+       as "stop" and "flush" when a Postfix instance is disabled,
+       and will replace "start" by "check" so that problems  will
+       still  be  reported even when the default instance is dis-
+       abled.
 
 <b>SHARED VERSUS NON-SHARED FILES</b>
-       Some  files  are shared between Postfix instances (such as
-       executables and manpages) and some files are  per-instance
-       (such  as  the  queue).   See the NON-SHARED FILES section
-       below for a list of per-instance files.
-
-       Until now, executables, manpages, etc., have been  checked
-       or  updated  as part of the default Postfix instance. With
+       Some files are shared between Postfix instances,  such  as
+       executables and manpages, and some files are per-instance,
+       such as the queue.  See the NON-SHARED FILES section below
+       for a list of per-instance files.
+
+       Before Postfix multi-instance support was implemented, the
+       executables, manpages, etc., have always been  checked  or
+       updated  as  part  of  the  default Postfix instance. With
        multi-instance support, we simply  continue  to  do  this.
        Non-default  Postfix  instances  will check or update only
        their non-shared files.
@@ -127,64 +133,84 @@ POSTFIX-WRAPPER(5)                                          POSTFIX-WRAPPER(5)
        The consequence of this approach is that the default Post-
        fix instance should be updated before any other instances.
 
-<b>IMPLEMENTATION NOTES</b>
+<b>MULTI-INSTANCE API SUMMARY</b>
+       Only the multi-instance manager implements support for the
+       <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>  configuration parameter. The multi-
+       instance manager will not start Postfix instances  without
+       "<a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>  =  yes".  This  allows  a  Postfix
+       instance to be tested by hand before it  is  placed  under
+       control of a multi-instance manager.
+
        The <a href="postfix.1.html">postfix(1)</a> command ignores the <a href="postconf.5.html#multi_instance_directories">multi_instance_directo</a>-
-       <a href="postconf.5.html#multi_instance_directories">ries</a>  and  <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a>  parameters  when the -c
+       <a href="postconf.5.html#multi_instance_directories">ries</a> and <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a>  parameters  when  the  -c
        option is specified, or when MAIL_CONFIG is present in the
        process environment.
 
-       Otherwise,     the    <a href="postfix.1.html">postfix(1)</a>    command    uses    the
-       <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a>    parameter    only    when    the
-       <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> parameter value is non-empty.
+       Otherwise, when the  <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>  parameter
+       value  is  non-empty,  the <a href="postfix.1.html">postfix(1)</a> command executes the
+       command specified with the <a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a>  parame-
+       ter,  instead of executing the commands in postfix-script.
+
+       The multi-instance manager skips commands such  as  "stop"
+       or  "reload" that require a running Postfix instance, when
+       an instance does not have "<a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>  =  yes".
+       This avoids false error messages.
 
-       The  multi-instance manager must replace a "start" command
-       by  "check"  when  a  Postfix  instance  does   not   have
+       The  multi-instance  manager replaces a "start" command by
+       "check"  when   a   Postfix   instance   does   not   have
        "<a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>  =  yes". This substitution ensures
-       that problems will still be reported.
+       that problems will still be reported even when the default
+       instance is disabled.
+
+       No  Postfix  command or script will update or check shared
+       files unless it is running in the context of  the  default
+       Postfix  instance.  Therefore, the default instance should
+       be updated before any other Postfix instances.
 
        Set-gid commands  such  as  <a href="postdrop.1.html">postdrop(1)</a>  and  <a href="postqueue.1.html">postqueue(1)</a>
        effectively  append the <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> parame-
        ter  value  to  the  legacy   <a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a>
-       parameter value.
+       parameter  value.  The  commands  use  this information to
+       determine whether a -c option or  MAIL_CONFIG  environment
+       setting specifies a legitimate value.
 
        The  legacy <a href="postconf.5.html#alternate_config_directories">alternate_config_directories</a> parameter remains
        necessary for non-default Postfix instances that are  run-
        ning  different  versions of Postfix, or that are not man-
        aged together with the default Postfix instance.
 
-       No Postfix command or script will update or  check  shared
-       files  unless  it is running in the context of the default
-       Postfix instance.
-
 <b>ENVIRONMENT VARIABLES</b>
        MAIL_CONFIG
               When present, this forces the <a href="postfix.1.html">postfix(1)</a> command to
               operate  only  on  the  specified Postfix instance.
-              This environment variable is exported by the  post-
-              fix(1)  -c  option,  so that <a href="postfix.1.html">postfix(1)</a> commands in
+              This environment variable is exported by the  <a href="postfix.1.html">post-</a>
+              <a href="postfix.1.html">fix(1)</a>  -c  option,  so that <a href="postfix.1.html">postfix(1)</a> commands in
               descendant processes will work correctly.
 
 <b>CONFIGURATION PARAMETERS</b>
+       The text below provides  only  a  parameter  summary.  See
+       <a href="postconf.5.html">postconf(5)</a> for more details.
+
        <b><a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> (empty)</b>
-              An optional list of non-default Postfix  configura-
+              An  optional list of non-default Postfix configura-
               tion directories; these directories belong to addi-
-              tional Postfix instances  that  share  the  Postfix
+              tional  Postfix  instances  that  share the Postfix
               executable files and documentation with the default
-              Postfix instance, and that  are  started,  stopped,
+              Postfix  instance,  and  that are started, stopped,
               etc., together with the default Postfix instance.
 
        <b><a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a> (empty)</b>
-              The  pathname  of  a multi-instance manager command
-              that  the  <a href="postfix.1.html"><b>postfix</b>(1)</a>  command  invokes  when   the
-              <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>  parameter value is non-
+              The pathname of a  multi-instance  manager  command
+              that   the  <a href="postfix.1.html"><b>postfix</b>(1)</a>  command  invokes  when  the
+              <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> parameter value is  non-
               empty.
 
        <b><a href="postconf.5.html#multi_instance_name">multi_instance_name</a> (empty)</b>
-              The  optional  instance  name   of   this   Postfix
+              The   optional   instance   name  of  this  Postfix
               instance.
 
        <b><a href="postconf.5.html#multi_instance_group">multi_instance_group</a> (empty)</b>
-              The  optional  instance  group name of this Postfix
+              The optional instance group name  of  this  Postfix
               instance.
 
        <b><a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a> (no)</b>
@@ -193,7 +219,7 @@ POSTFIX-WRAPPER(5)                                          POSTFIX-WRAPPER(5)
 
 <b>NON-SHARED FILES</b>
        <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The  default  location  of  the Postfix <a href="postconf.5.html">main.cf</a> and
+              The default location of  the  Postfix  <a href="postconf.5.html">main.cf</a>  and
               <a href="master.5.html">master.cf</a> configuration files.
 
        <b><a href="postconf.5.html#data_directory">data_directory</a> (see 'postconf -d' output)</b>
@@ -201,7 +227,7 @@ POSTFIX-WRAPPER(5)                                          POSTFIX-WRAPPER(5)
               example: caches, pseudo-random numbers).
 
        <b><a href="postconf.5.html#queue_directory">queue_directory</a> (see 'postconf -d' output)</b>
-              The  location of the Postfix top-level queue direc-
+              The location of the Postfix top-level queue  direc-
               tory.
 
 <b>SEE ALSO</b>
@@ -210,7 +236,7 @@ POSTFIX-WRAPPER(5)                                          POSTFIX-WRAPPER(5)
        postmulti(1) full-blown multi-instance manager
 
 <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 ffc4a7b989a70989654ed57ceae63e9841cbd2be..ccef49f0c3aa6b72593ffbadbe93ff4b5404d83b 100644 (file)
@@ -197,53 +197,53 @@ POSTFIX(1)                                                          POSTFIX(1)
               The directory with Postfix-writable data files (for
               example: caches, pseudo-random numbers).
 
+       Other configuration parameters:
+
+       <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
+              The  default  location  of  the Postfix <a href="postconf.5.html">main.cf</a> and
+              <a href="master.5.html">master.cf</a> configuration files.
+
+       <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
+              The list of environment parameters that  a  Postfix
+              process  will  import  from  a  non-Postfix  parent
+              process.
+
+       <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
+              The syslog facility of Postfix logging.
+
+       <b><a href="postconf.5.html#syslog_name">syslog_name</a> (see 'postconf -d' output)</b>
+              The mail system  name  that  is  prepended  to  the
+              process  name  in  syslog  records, so that "smtpd"
+              becomes, for example, "postfix/smtpd".
+
        Available in Postfix version 2.6 and later:
 
        <b><a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> (empty)</b>
-              An  optional list of non-default Postfix configura-
+              An optional list of non-default Postfix  configura-
               tion directories; these directories belong to addi-
-              tional  Postfix  instances  that  share the Postfix
+              tional Postfix instances  that  share  the  Postfix
               executable files and documentation with the default
-              Postfix  instance,  and  that are started, stopped,
+              Postfix instance, and that  are  started,  stopped,
               etc., together with the default Postfix instance.
 
        <b><a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a> (empty)</b>
-              The pathname of a  multi-instance  manager  command
-              that   the  <a href="postfix.1.html"><b>postfix</b>(1)</a>  command  invokes  when  the
-              <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> parameter value is  non-
+              The  pathname  of  a multi-instance manager command
+              that  the  <a href="postfix.1.html"><b>postfix</b>(1)</a>  command  invokes  when   the
+              <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a>  parameter value is non-
               empty.
 
        <b><a href="postconf.5.html#multi_instance_group">multi_instance_group</a> (empty)</b>
-              The  optional  instance  group name of this Postfix
+              The optional instance group name  of  this  Postfix
               instance.
 
        <b><a href="postconf.5.html#multi_instance_name">multi_instance_name</a> (empty)</b>
-              The  optional  instance  name   of   this   Postfix
+              The   optional   instance   name  of  this  Postfix
               instance.
 
        <b><a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a> (no)</b>
               Allow this Postfix instance to be started, stopped,
               etc., by a multi-instance manager.
 
-       Other configuration parameters:
-
-       <b><a href="postconf.5.html#config_directory">config_directory</a> (see 'postconf -d' output)</b>
-              The default location of  the  Postfix  <a href="postconf.5.html">main.cf</a>  and
-              <a href="master.5.html">master.cf</a> configuration files.
-
-       <b><a href="postconf.5.html#import_environment">import_environment</a> (see 'postconf -d' output)</b>
-              The  list  of environment parameters that a Postfix
-              process  will  import  from  a  non-Postfix  parent
-              process.
-
-       <b><a href="postconf.5.html#syslog_facility">syslog_facility</a> (mail)</b>
-              The syslog facility of Postfix logging.
-
-       <b><a href="postconf.5.html#syslog_name">syslog_name</a> (postfix)</b>
-              The  mail  system  name  that  is  prepended to the
-              process name in syslog  records,  so  that  "smtpd"
-              becomes, for example, "postfix/smtpd".
-
 <b>FILES</b>
        Prior  to  Postfix version 2.6, all of the following files
        were in <b>$<a href="postconf.5.html#config_directory">config_directory</a></b>. Some files  are  now  in  <b>$<a href="postconf.5.html#daemon_directory">dae</a>-</b>
index 1557775dbd342d29018e9b4bc277b925a633c5e6..f1d59b8c75925debbcc75ed0888b292a7028c28f 100644 (file)
@@ -164,6 +164,19 @@ Available in Postfix version 2.5 and later:
 The directory with Postfix-writable data files (for example:
 caches, pseudo-random numbers).
 .PP
+Other configuration parameters:
+.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
+The default location of the Postfix main.cf and master.cf
+configuration files.
+.IP "\fBimport_environment (see 'postconf -d' output)\fR"
+The list of environment parameters that a Postfix process will
+import from a non-Postfix parent process.
+.IP "\fBsyslog_facility (mail)\fR"
+The syslog facility of Postfix logging.
+.IP "\fBsyslog_name (see 'postconf -d' output)\fR"
+The mail system name that is prepended to the process name in syslog
+records, so that "smtpd" becomes, for example, "postfix/smtpd".
+.PP
 Available in Postfix version 2.6 and later:
 .IP "\fBmulti_instance_directories (empty)\fR"
 An optional list of non-default Postfix configuration directories;
@@ -180,21 +193,8 @@ The optional instance group name of this Postfix instance.
 .IP "\fBmulti_instance_name (empty)\fR"
 The optional instance name of this Postfix instance.
 .IP "\fBmulti_instance_enable (no)\fR"
-Allow this Postfix instance to be started, stopped, etc., by
-a multi-instance manager.
-.PP
-Other configuration parameters:
-.IP "\fBconfig_directory (see 'postconf -d' output)\fR"
-The default location of the Postfix main.cf and master.cf
-configuration files.
-.IP "\fBimport_environment (see 'postconf -d' output)\fR"
-The list of environment parameters that a Postfix process will
-import from a non-Postfix parent process.
-.IP "\fBsyslog_facility (mail)\fR"
-The syslog facility of Postfix logging.
-.IP "\fBsyslog_name (postfix)\fR"
-The mail system name that is prepended to the process name in syslog
-records, so that "smtpd" becomes, for example, "postfix/smtpd".
+Allow this Postfix instance to be started, stopped, etc., by a
+multi-instance manager.
 .SH "FILES"
 .na
 .nf
index 6a3bf7deca1b2b58610f0f3040c319990b1b6857..73d2e56c05acbf6e19e2c3b028b22d622570986e 100644 (file)
@@ -3219,8 +3219,6 @@ Postfix instance, and that are started, stopped, etc., together
 with the default Postfix instance.  Specify a list of pathnames
 separated by comma or whitespace.
 .PP
-This feature is available in Postfix 2.6 and later.
-.PP
 When the list of non-default Postfix configuration directories
 is non-empty, the \fBpostfix\fR(1) command will invoke the multi-instance
 manager specified with the multi_instance_wrapper parameter to
@@ -3252,7 +3250,7 @@ The pathname of a multi-instance manager command that the
 \fBpostfix\fR(1) command invokes when the multi_instance_directories
 parameter value is non-empty. The pathname may be followed by
 initial command arguments separated by whitespace; shell
-metacharacters are not supported in this context.
+metacharacters such as quotes are not supported in this context.
 .PP
 The \fBpostfix\fR(1) command invokes the manager command with the
 \fBpostfix\fR(1) non-option command arguments on the manager command line,
index 179c31cc7799a320e4deaeeadec89e25bf2ac95b..e09e5f065365792375a6cc78d41c0bed4662a4b5 100644 (file)
@@ -40,137 +40,157 @@ to use the familiar "postfix start / stop / reload / upgrade
 
 To start, stop, update, etc., multiple Postfix instances,
 use:
-
-.nf
-    # postfix \fIcommand\fR
-.fi
-
+.IP
+# postfix \fIcommand\fR
+.PP
 For example, to find out what Postfix instances are configured:
-
-.nf
-    # postfix status
-
-To manage an individual Postfix instance, use:
-
-.nf
-    # postfix -c \fI/path/to/config_directory command\fR
-.fi
-.SH "MULTI-INSTANCE DETECTION"
+.IP
+# postfix status
+.SH "MANAGING AN INDIVIDUAL POSTFIX INSTANCE"
 .na
 .nf
 .ad
 .fi
-While "postfix start/stop/etc" will remain the primary
-command interface, the postfix(1) command itself will need
-to figure out if a command targets multiple Postfix instances
-or just a specific Postfix instance.  This decision can be
-made with information that is already available:
+To manage an individual Postfix instance, use:
 .IP
-When the postfix(1) command is invoked with the -c
-option, it will operate only on the specified instance.
-We do the same when MAIL_CONFIG is specified in the
-process environment.
+# postfix -c \fI/path/to/config_directory command\fR
+.PP
+When the postfix(1) command is invoked with the -c option,
+it will operate only on the specified instance.  The same
+happens when MAIL_CONFIG is specified in the process
+environment.
 
 Otherwise, the postfix(1) command will operate on all
 applicable Postfix instances.
-.SH "MULTI-INSTANCE MANAGER HOOK"
+.SH "MULTI-INSTANCE MANAGER EXAMPLE"
 .na
 .nf
 .ad
 .fi
-When the postfix(1) command is invoked without -c option,
-and non-default Postfix instance directories are defined
-in main.cf with multi_instance_directories, then the
-postfix(1) command invokes the command specified in main.cf
-with multi_instance_wrapper, instead of invoking postfix-script.
-The multi_instance_wrapper and other main.cf parameters are
-listed in the CONFIGURATION PARAMETERS section below.
+When the postfix(1) command is invoked without -c option
+or MAIL_CONFIG environment setting, and non-default Postfix
+instance directories are defined in main.cf with the
+multi_instance_directories parameter, postfix(1) invokes
+the command specified in main.cf with the multi_instance_wrapper
+parameter, instead of invoking postfix-script.
 
-A useful wrapper implementation can be as simple as:
+The multi_instance_directories and other main.cf parameters
+are listed below in the CONFIGURATION PARAMETERS section.
 
+A useful wrapper implementation can be as simple as:
+.IP
 .nf
-    #!/bin/sh
-
-    : ${command_directory?"do not invoke this command directly"}
-
-    POSTCONF=$command_directory/postconf
-    POSTFIX=$command_directory/postfix
-    instance_dirs=`$POSTCONF -h multi_instance_directories |
-                    sed 's/,/ /'` || exit 1
-
-    for dir in $config_directory $instance_dirs
-    do
-        case "$1" in
-        stop|abort|flush|reload|drain)
-            test "`$POSTCONF -c $dir -h multi_instance_enable`"
-                    = yes || continue;;
-        start)
-            test "`$POSTCONF -c $dir -h multi_instance_enable`"
-                    = yes || set check;;
-        esac
-        $POSTFIX -c $dir "$@" || err=$?
-    done
-
-    exit $err
-.fi
+#!/bin/sh
+
+: ${command_directory?"do not invoke this command directly"}
+
+POSTCONF=$command_directory/postconf
+POSTFIX=$command_directory/postfix
+instance_dirs=\`$POSTCONF -h multi_instance_directories |
+                sed 's/,/ /'\` || exit 1
 
-This wrapper skips commands such as "stop" that require a
-running Postfix instance when a Postfix instance is disabled,
-and replaces "start" by "check" so that problems will still
-be reported.
+err=0
+for dir in $config_directory $instance_dirs
+do
+    case "$1" in
+    stop|abort|flush|reload|drain)
+        test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
+                = yes || continue;;
+    start)
+        test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
+                = yes || set check;;
+    esac
+    $POSTFIX -c $dir "$@" || err=$?
+done
 
+exit $err
+.fi
+.PP
 The postmulti(1) command implements a more sophisticated
 approach, based on a combination of C code and scripting.
+.SH "ENABLING AN INSTANCE FOR MULTI-INSTANCE OPERATION"
+.na
+.nf
+.ad
+.fi
+To enable start/stop/etc. by a multi-instance manager, set
+the Postfix instance's main.cf multi_instance_enable parameter
+to "yes".  This parameter has no effect on single-instance
+operation with "postfix -c" or with a MAIL_CONFIG environment
+setting.
+
+The multi-instance manager program will skip commands such
+as "stop" and "flush" when a Postfix instance is disabled,
+and will replace "start" by "check" so that problems will
+still be reported even when the default instance is disabled.
 .SH "SHARED VERSUS NON-SHARED FILES"
 .na
 .nf
 .ad
 .fi
-Some files are shared between Postfix instances (such as
-executables and manpages) and some files are per-instance
-(such as the queue).  See the NON-SHARED FILES section below
+Some files are shared between Postfix instancessuch as
+executables and manpages, and some files are per-instance,
+such as the queue.  See the NON-SHARED FILES section below
 for a list of per-instance files.
 
-Until now, executables, manpages, etc., have been checked
-or updated as part of the default Postfix instance. With
+Before Postfix multi-instance support was implemented, the
+executables, manpages, etc., have always been checked or
+updated as part of the default Postfix instance. With
 multi-instance support, we simply continue to do this.
 Non-default Postfix instances will check or update only
 their non-shared files.
 
 The consequence of this approach is that the default Postfix
 instance should be updated before any other instances.
-.SH "IMPLEMENTATION NOTES"
+.SH "MULTI-INSTANCE API SUMMARY"
 .na
 .nf
 .ad
 .fi
+Only the multi-instance manager implements support for the
+multi_instance_enable configuration parameter. The
+multi-instance manager will not start Postfix instances
+without "multi_instance_enable = yes". This allows a Postfix
+instance to be tested by hand before it is placed under
+control of a multi-instance manager.
+
 The postfix(1) command ignores the multi_instance_directories
 and multi_instance_wrapper parameters when the -c option
 is specified, or when MAIL_CONFIG is present in the process
 environment.
 
-Otherwise, the postfix(1) command uses the multi_instance_wrapper
-parameter only when the multi_instance_directories parameter
-value is non-empty.
+Otherwise, when the multi_instance_directories parameter
+value is non-empty, the postfix(1) command executes the
+command specified with the multi_instance_wrapper parameter,
+instead of executing the commands in postfix-script.
+
+The multi-instance manager skips commands such as "stop"
+or "reload" that require a running Postfix instance, when
+an instance does not have "multi_instance_enable = yes".
+This avoids false error messages.
 
-The multi-instance manager must replace a "start" command by
+The multi-instance manager replaces a "start" command by
 "check" when a Postfix instance does not have
 "multi_instance_enable = yes". This substitution ensures
-that problems will still be reported.
+that problems will still be reported even when the default
+instance is disabled.
+
+No Postfix command or script will update or check shared
+files unless it is running in the context of the default
+Postfix instance. Therefore, the default instance should
+be updated before any other Postfix instances.
 
 Set-gid commands such as postdrop(1) and postqueue(1)
 effectively append the multi_instance_directories parameter
 value to the legacy alternate_config_directories parameter
-value.
+value. The commands use this information to determine whether
+a -c option or MAIL_CONFIG environment setting specifies a
+legitimate value.
 
 The legacy alternate_config_directories parameter remains
 necessary for non-default Postfix instances that are running
 different versions of Postfix, or that are not managed
 together with the default Postfix instance.
-
-No Postfix command or script will update or check shared
-files unless it is running in the context of the default
-Postfix instance.
 .SH "ENVIRONMENT VARIABLES"
 .na
 .nf
@@ -187,6 +207,8 @@ correctly.
 .nf
 .ad
 .fi
+The text below provides only a parameter summary. See
+postconf(5) for more details.
 .IP "\fBmulti_instance_directories (empty)\fR"
 An optional list of non-default Postfix configuration directories;
 these directories belong to additional Postfix instances that share
index 591a7ebef56d786887ee28c3a59df89a5e577df9..ddf7e951aaf84d22a0b2277dc9e99d89aa654f19 100755 (executable)
@@ -715,7 +715,7 @@ while (<>) {
     s/[<bB>]*postcat[<\/bB>]*\(1\)/<a href="postcat.1.html">$&<\/a>/g;
     s/[<bB>]*post[-<\/bB>]*\n*[ <bB>]*conf[<\/bB>]*\(1\)/<a href="postconf.1.html">$&<\/a>/g;
     s/[<bB>]*postdrop[<\/bB>]*\(1\)/<a href="postdrop.1.html">$&<\/a>/g;
-    s/[<bB>]*postfix[<\/bB>]*\(1\)/<a href="postfix.1.html">$&<\/a>/g;
+    s/[<bB>]*post[-<\/bB>]*\n* *[<bB>]*fix[<\/bB>]*\(1\)/<a href="postfix.1.html">$&<\/a>/g;
     s/[<bB>]*postkick[<\/bB>]*\(1\)/<a href="postkick.1.html">$&<\/a>/g;
     s/[<bB>]*postlock[<\/bB>]*\(1\)/<a href="postlock.1.html">$&<\/a>/g;
     s/[<bB>]*postlog[<\/bB>]*\(1\)/<a href="postlog.1.html">$&<\/a>/g;
index 71ff51181760d0c89566184bd6291259b3610e15..435a35feaae27b1a208ad5030adb4e27aed6c9b2 100644 (file)
@@ -12033,8 +12033,6 @@ Postfix instance, and that are started, stopped, etc., together
 with the default Postfix instance.  Specify a list of pathnames
 separated by comma or whitespace.  </p>
 
-<p> This feature is available in Postfix 2.6 and later. </p>
-
 <p> When the list of non-default Postfix configuration directories
 is non-empty, the postfix(1) command will invoke the multi-instance
 manager specified with the multi_instance_wrapper parameter to
@@ -12049,7 +12047,8 @@ Postfix instances.  </p>
 postfix(1) command invokes when the multi_instance_directories
 parameter value is non-empty. The pathname may be followed by
 initial command arguments separated by whitespace; shell
-metacharacters are not supported in this context. </p>
+metacharacters such as quotes are not supported in this context.
+</p>
 
 <p> The postfix(1) command invokes the manager command with the
 postfix(1) non-option command arguments on the manager command line,
index 5b5a845c05015cb2dea25a8df147a983df12ab61..7b608c473feb7f91088df5c519b20ea866d94f05 100644 (file)
 #
 #      To start, stop, update, etc., multiple Postfix instances,
 #      use:
-#
-# .nf
-#          # postfix \fIcommand\fR
-# .fi
-#
+# .IP
+#      # postfix \fIcommand\fR
+# .PP
 #      For example, to find out what Postfix instances are configured:
-#
-# .nf
-#          # postfix status
-#
-#      To manage an individual Postfix instance, use:
-#
-# .nf
-#          # postfix -c \fI/path/to/config_directory command\fR
-# .fi
-# MULTI-INSTANCE DETECTION
+# .IP
+#      # postfix status
+# MANAGING AN INDIVIDUAL POSTFIX INSTANCE
 # .ad
 # .fi
-#      While "postfix start/stop/etc" will remain the primary
-#      command interface, the postfix(1) command itself will need
-#      to figure out if a command targets multiple Postfix instances
-#      or just a specific Postfix instance.  This decision can be
-#      made with information that is already available:
+#      To manage an individual Postfix instance, use:
 # .IP
-#      When the postfix(1) command is invoked with the -c
-#      option, it will operate only on the specified instance.
-#      We do the same when MAIL_CONFIG is specified in the
-#      process environment.
+#      # postfix -c \fI/path/to/config_directory command\fR
+# .PP
+#      When the postfix(1) command is invoked with the -c option,
+#      it will operate only on the specified instance.  The same
+#      happens when MAIL_CONFIG is specified in the process
+#      environment.
 #
 #      Otherwise, the postfix(1) command will operate on all
 #      applicable Postfix instances.
-# MULTI-INSTANCE MANAGER HOOK
+# MULTI-INSTANCE MANAGER EXAMPLE
 # .ad
 # .fi
-#      When the postfix(1) command is invoked without -c option,
-#      and non-default Postfix instance directories are defined
-#      in main.cf with multi_instance_directories, then the
-#      postfix(1) command invokes the command specified in main.cf
-#      with multi_instance_wrapper, instead of invoking postfix-script.
-#      The multi_instance_wrapper and other main.cf parameters are
-#      listed in the CONFIGURATION PARAMETERS section below.
+#      When the postfix(1) command is invoked without -c option
+#      or MAIL_CONFIG environment setting, and non-default Postfix
+#      instance directories are defined in main.cf with the
+#      multi_instance_directories parameter, postfix(1) invokes
+#      the command specified in main.cf with the multi_instance_wrapper
+#      parameter, instead of invoking postfix-script.
 #
-#      A useful wrapper implementation can be as simple as:
+#      The multi_instance_directories and other main.cf parameters
+#      are listed below in the CONFIGURATION PARAMETERS section.
 #
+#      A useful wrapper implementation can be as simple as:
+# .IP
 # .nf
-#          #!/bin/sh
-#
-#          : ${command_directory?"do not invoke this command directly"}
-#
-#          POSTCONF=$command_directory/postconf
-#          POSTFIX=$command_directory/postfix
-#          instance_dirs=`$POSTCONF -h multi_instance_directories | 
-#                          sed 's/,/ /'` || exit 1
-#
-#          for dir in $config_directory $instance_dirs
-#          do
-#              case "$1" in
-#              stop|abort|flush|reload|drain)
-#                  test "`$POSTCONF -c $dir -h multi_instance_enable`" 
-#                          = yes || continue;;
-#              start)
-#                  test "`$POSTCONF -c $dir -h multi_instance_enable`" 
-#                          = yes || set check;;
-#              esac
-#              $POSTFIX -c $dir "$@" || err=$?
-#          done
-#
-#          exit $err
+#      #!/bin/sh
+#
+#      : ${command_directory?"do not invoke this command directly"}
+#
+#      POSTCONF=$command_directory/postconf
+#      POSTFIX=$command_directory/postfix
+#      instance_dirs=\`$POSTCONF -h multi_instance_directories | 
+#                      sed 's/,/ /'\` || exit 1
+#
+#      err=0
+#      for dir in $config_directory $instance_dirs
+#      do
+#          case "$1" in
+#          stop|abort|flush|reload|drain)
+#              test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
+#                      = yes || continue;;
+#          start)
+#              test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
+#                      = yes || set check;;
+#          esac
+#          $POSTFIX -c $dir "$@" || err=$?
+#      done
+#
+#      exit $err
 # .fi
-#
-#      This wrapper skips commands such as "stop" that require a
-#      running Postfix instance when a Postfix instance is disabled,
-#      and replaces "start" by "check" so that problems will still
-#      be reported.
-#
+# .PP
 #      The postmulti(1) command implements a more sophisticated
 #      approach, based on a combination of C code and scripting.
+# ENABLING AN INSTANCE FOR MULTI-INSTANCE OPERATION
+# .ad
+# .fi
+#      To enable start/stop/etc. by a multi-instance manager, set
+#      the Postfix instance's main.cf multi_instance_enable parameter
+#      to "yes".  This parameter has no effect on single-instance
+#      operation with "postfix -c" or with a MAIL_CONFIG environment
+#      setting.
+#
+#      The multi-instance manager program will skip commands such
+#      as "stop" and "flush" when a Postfix instance is disabled,
+#      and will replace "start" by "check" so that problems will
+#      still be reported even when the default instance is disabled.
 # SHARED VERSUS NON-SHARED FILES
 # .ad
 # .fi
-#      Some files are shared between Postfix instances (such as
-#      executables and manpages) and some files are per-instance
-#      (such as the queue).  See the NON-SHARED FILES section below
+#      Some files are shared between Postfix instancessuch as
+#      executables and manpages, and some files are per-instance,
+#      such as the queue.  See the NON-SHARED FILES section below
 #      for a list of per-instance files.
 #
-#      Until now, executables, manpages, etc., have been checked
-#      or updated as part of the default Postfix instance. With
+#      Before Postfix multi-instance support was implemented, the
+#      executables, manpages, etc., have always been checked or
+#      updated as part of the default Postfix instance. With
 #      multi-instance support, we simply continue to do this.
 #      Non-default Postfix instances will check or update only
 #      their non-shared files.
 #
 #      The consequence of this approach is that the default Postfix
 #      instance should be updated before any other instances.
-# IMPLEMENTATION NOTES
+# MULTI-INSTANCE API SUMMARY
 # .ad
 # .fi
+#      Only the multi-instance manager implements support for the
+#      multi_instance_enable configuration parameter. The
+#      multi-instance manager will not start Postfix instances
+#      without "multi_instance_enable = yes". This allows a Postfix
+#      instance to be tested by hand before it is placed under
+#      control of a multi-instance manager.
+#
 #      The postfix(1) command ignores the multi_instance_directories
 #      and multi_instance_wrapper parameters when the -c option
 #      is specified, or when MAIL_CONFIG is present in the process
 #      environment.
 #
-#      Otherwise, the postfix(1) command uses the multi_instance_wrapper
-#      parameter only when the multi_instance_directories parameter
-#      value is non-empty.
+#      Otherwise, when the multi_instance_directories parameter
+#      value is non-empty, the postfix(1) command executes the
+#      command specified with the multi_instance_wrapper parameter,
+#      instead of executing the commands in postfix-script.
 #
-#      The multi-instance manager must replace a "start" command by
+#      The multi-instance manager skips commands such as "stop"
+#      or "reload" that require a running Postfix instance, when
+#      an instance does not have "multi_instance_enable = yes".
+#      This avoids false error messages.
+#
+#      The multi-instance manager replaces a "start" command by
 #      "check" when a Postfix instance does not have
 #      "multi_instance_enable = yes". This substitution ensures
-#      that problems will still be reported.
+#      that problems will still be reported even when the default
+#      instance is disabled.
+#
+#      No Postfix command or script will update or check shared
+#      files unless it is running in the context of the default
+#      Postfix instance. Therefore, the default instance should
+#      be updated before any other Postfix instances.
 #
 #      Set-gid commands such as postdrop(1) and postqueue(1)
 #      effectively append the multi_instance_directories parameter
 #      value to the legacy alternate_config_directories parameter
-#      value.
+#      value. The commands use this information to determine whether
+#      a -c option or MAIL_CONFIG environment setting specifies a
+#      legitimate value.
 #
 #      The legacy alternate_config_directories parameter remains
 #      necessary for non-default Postfix instances that are running
 #      different versions of Postfix, or that are not managed
 #      together with the default Postfix instance.
-#
-#      No Postfix command or script will update or check shared
-#      files unless it is running in the context of the default
-#      Postfix instance.
 # ENVIRONMENT VARIABLES
 # .ad
 # .fi
 # CONFIGURATION PARAMETERS
 # .ad
 # .fi
+#      The text below provides only a parameter summary. See
+#      postconf(5) for more details.
 # .IP "\fBmulti_instance_directories (empty)\fR"
 #      An optional list of non-default Postfix configuration directories;
 #      these directories belong to additional Postfix instances that share
index 9c6992a3059e832fc2b66a3e9250a71934ec94df..1594f2f8d6c8005c96f77c36d366cf8687520acb 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      "20090123"
+#define MAIL_RELEASE_DATE      "20090125"
 #define MAIL_VERSION_NUMBER    "2.6"
 
 #ifdef SNAPSHOT
index 4f33c22f762149a3c4c81f51c745d9b2b3a7dcaf..3747e7800a501a9f15743ab9a33993c7eb62bb07 100644 (file)
 /*     The directory with Postfix-writable data files (for example:
 /*     caches, pseudo-random numbers).
 /* .PP
+/*     Other configuration parameters:
+/* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
+/*     The default location of the Postfix main.cf and master.cf
+/*     configuration files.
+/* .IP "\fBimport_environment (see 'postconf -d' output)\fR"
+/*     The list of environment parameters that a Postfix process will
+/*     import from a non-Postfix parent process.
+/* .IP "\fBsyslog_facility (mail)\fR"
+/*     The syslog facility of Postfix logging.
+/* .IP "\fBsyslog_name (see 'postconf -d' output)\fR"
+/*     The mail system name that is prepended to the process name in syslog
+/*     records, so that "smtpd" becomes, for example, "postfix/smtpd".
+/* .PP
 /*     Available in Postfix version 2.6 and later:
 /* .IP "\fBmulti_instance_directories (empty)\fR"
 /*     An optional list of non-default Postfix configuration directories;
 /* .IP "\fBmulti_instance_name (empty)\fR"
 /*     The optional instance name of this Postfix instance.
 /* .IP "\fBmulti_instance_enable (no)\fR"
-/*     Allow this Postfix instance to be started, stopped, etc., by
-/*     a multi-instance manager.
-/* .PP
-/*     Other configuration parameters:
-/* .IP "\fBconfig_directory (see 'postconf -d' output)\fR"
-/*     The default location of the Postfix main.cf and master.cf
-/*     configuration files.
-/* .IP "\fBimport_environment (see 'postconf -d' output)\fR"
-/*     The list of environment parameters that a Postfix process will
-/*     import from a non-Postfix parent process.
-/* .IP "\fBsyslog_facility (mail)\fR"
-/*     The syslog facility of Postfix logging.
-/* .IP "\fBsyslog_name (postfix)\fR"
-/*     The mail system name that is prepended to the process name in syslog
-/*     records, so that "smtpd" becomes, for example, "postfix/smtpd".
+/*     Allow this Postfix instance to be started, stopped, etc., by a
+/*     multi-instance manager.
 /* FILES
 /* .ad
 /* .fi