mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-2.6-20090125
This commit is contained in:
parent
f4548f736a
commit
dfd9dca70b
@ -14940,3 +14940,9 @@ Apologies for any names omitted.
|
|||||||
More little fixes in the "trivial but useful" postfix-wrapper
|
More little fixes in the "trivial but useful" postfix-wrapper
|
||||||
including instructions. It's ready for testing in the field.
|
including instructions. It's ready for testing in the field.
|
||||||
File: conf/postfix-wrapper.
|
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.
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# To view the formatted manual page of this file, type:
|
|
||||||
# POSTFIXSOURCE/mantools/srctoman - postfix-wrapper | nroff -man
|
|
||||||
|
|
||||||
#++
|
#++
|
||||||
# NAME
|
# NAME
|
||||||
# postfix-wrapper 1
|
# postfix-wrapper 1
|
||||||
@ -197,7 +194,8 @@ instance_dirs=`$POSTCONF -h multi_instance_directories | sed 's/,/ /'` ||
|
|||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
stop|abort|drain) all_dirs=
|
stop|quick-stop|abort|drain)
|
||||||
|
all_dirs=
|
||||||
for dir in $config_directory $instance_dirs
|
for dir in $config_directory $instance_dirs
|
||||||
do
|
do
|
||||||
all_dirs="$dir $all_dirs"
|
all_dirs="$dir $all_dirs"
|
||||||
@ -209,6 +207,7 @@ esac
|
|||||||
# instance is disabled, replace "postfix start" by "postfix check"
|
# instance is disabled, replace "postfix start" by "postfix check"
|
||||||
# so that problems will still be reported.
|
# so that problems will still be reported.
|
||||||
|
|
||||||
|
err=0
|
||||||
for dir in $all_dirs
|
for dir in $all_dirs
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
@ -5810,8 +5810,6 @@ Postfix instance, and that are started, stopped, etc., together
|
|||||||
with the default Postfix instance. Specify a list of pathnames
|
with the default Postfix instance. Specify a list of pathnames
|
||||||
separated by comma or whitespace. </p>
|
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
|
<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
|
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
|
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>
|
<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
|
parameter value is non-empty. The pathname may be followed by
|
||||||
initial command arguments separated by whitespace; shell
|
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
|
<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,
|
<a href="postfix.1.html">postfix(1)</a> non-option command arguments on the manager command line,
|
||||||
|
@ -48,35 +48,31 @@ POSTFIX-WRAPPER(5) POSTFIX-WRAPPER(5)
|
|||||||
|
|
||||||
# postfix status
|
# postfix status
|
||||||
|
|
||||||
|
<b>MANAGING AN INDIVIDUAL POSTFIX INSTANCE</b>
|
||||||
To manage an individual Postfix instance, use:
|
To manage an individual Postfix instance, use:
|
||||||
|
|
||||||
# postfix -c <i>/path/to/config</i><b>_</b><i>directory command</i>
|
# postfix -c <i>/path/to/config</i><b>_</b><i>directory command</i>
|
||||||
|
|
||||||
<b>MULTI-INSTANCE DETECTION</b>
|
When the <a href="postfix.1.html">postfix(1)</a> command is invoked with the -c option,
|
||||||
While "postfix start/stop/etc" will remain the primary
|
it will operate only on the specified instance. The same
|
||||||
command interface, the <a href="postfix.1.html">postfix(1)</a> command itself will need
|
happens when MAIL_CONFIG is specified in the process envi-
|
||||||
to figure out if a command targets multiple Postfix
|
ronment.
|
||||||
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
|
Otherwise, the <a href="postfix.1.html">postfix(1)</a> command will operate on all
|
||||||
option, it will operate only on the specified
|
applicable Postfix instances.
|
||||||
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
|
<b>MULTI-INSTANCE MANAGER EXAMPLE</b>
|
||||||
all applicable Postfix instances.
|
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.
|
||||||
|
|
||||||
<b>MULTI-INSTANCE MANAGER HOOK</b>
|
The <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> and other <a href="postconf.5.html">main.cf</a> parame-
|
||||||
When the <a href="postfix.1.html">postfix(1)</a> command is invoked without -c option,
|
ters are listed below in the CONFIGURATION PARAMETERS sec-
|
||||||
and non-default Postfix instance directories are defined
|
tion.
|
||||||
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.
|
|
||||||
|
|
||||||
A useful wrapper implementation can be as simple as:
|
A useful wrapper implementation can be as simple as:
|
||||||
|
|
||||||
@ -89,14 +85,15 @@ POSTFIX-WRAPPER(5) POSTFIX-WRAPPER(5)
|
|||||||
instance_dirs=`$POSTCONF -h <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> |
|
instance_dirs=`$POSTCONF -h <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> |
|
||||||
sed 's/,/ /'` || exit 1
|
sed 's/,/ /'` || exit 1
|
||||||
|
|
||||||
|
err=0
|
||||||
for dir in $<a href="postconf.5.html#config_directory">config_directory</a> $instance_dirs
|
for dir in $<a href="postconf.5.html#config_directory">config_directory</a> $instance_dirs
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
stop|abort|flush|reload|drain)
|
stop|abort|flush|reload|drain)
|
||||||
test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`"
|
test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`" \
|
||||||
= yes || continue;;
|
= yes || continue;;
|
||||||
start)
|
start)
|
||||||
test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`"
|
test "`$POSTCONF -c $dir -h <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>`" \
|
||||||
= yes || set check;;
|
= yes || set check;;
|
||||||
esac
|
esac
|
||||||
$POSTFIX -c $dir "$@" || err=$?
|
$POSTFIX -c $dir "$@" || err=$?
|
||||||
@ -104,22 +101,31 @@ POSTFIX-WRAPPER(5) POSTFIX-WRAPPER(5)
|
|||||||
|
|
||||||
exit $err
|
exit $err
|
||||||
|
|
||||||
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.
|
|
||||||
|
|
||||||
The postmulti(1) command implements a more sophisticated
|
The postmulti(1) command implements a more sophisticated
|
||||||
approach, based on a combination of C code and scripting.
|
approach, based on a combination of C code and scripting.
|
||||||
|
|
||||||
<b>SHARED VERSUS NON-SHARED FILES</b>
|
<b>ENABLING AN INSTANCE FOR MULTI-INSTANCE OPERATION</b>
|
||||||
Some files are shared between Postfix instances (such as
|
To enable start/stop/etc. by a multi-instance manager, set
|
||||||
executables and manpages) and some files are per-instance
|
the Postfix instance's <a href="postconf.5.html">main.cf</a> <a href="postconf.5.html#multi_instance_enable">multi_instance_enable</a>
|
||||||
(such as the queue). See the NON-SHARED FILES section
|
parameter to "yes". This parameter has no effect on sin-
|
||||||
below for a list of per-instance files.
|
gle-instance operation with "postfix -c" or with a
|
||||||
|
MAIL_CONFIG environment setting.
|
||||||
|
|
||||||
Until now, executables, manpages, etc., have been checked
|
The multi-instance manager program will skip commands such
|
||||||
or updated as part of the default Postfix instance. With
|
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.
|
||||||
|
|
||||||
|
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.
|
multi-instance support, we simply continue to do this.
|
||||||
Non-default Postfix instances will check or update only
|
Non-default Postfix instances will check or update only
|
||||||
their non-shared files.
|
their non-shared files.
|
||||||
@ -127,44 +133,64 @@ POSTFIX-WRAPPER(5) POSTFIX-WRAPPER(5)
|
|||||||
The consequence of this approach is that the default Post-
|
The consequence of this approach is that the default Post-
|
||||||
fix instance should be updated before any other instances.
|
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>-
|
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
|
option is specified, or when MAIL_CONFIG is present in the
|
||||||
process environment.
|
process environment.
|
||||||
|
|
||||||
Otherwise, the <a href="postfix.1.html">postfix(1)</a> command uses the
|
Otherwise, when the <a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> parameter
|
||||||
<a href="postconf.5.html#multi_instance_wrapper">multi_instance_wrapper</a> parameter only when the
|
value is non-empty, the <a href="postfix.1.html">postfix(1)</a> command executes the
|
||||||
<a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> parameter value is non-empty.
|
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 must replace a "start" command
|
The multi-instance manager skips commands such as "stop"
|
||||||
by "check" when a Postfix instance does not have
|
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 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
|
"<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>
|
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-
|
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>
|
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
|
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-
|
necessary for non-default Postfix instances that are run-
|
||||||
ning different versions of Postfix, or that are not man-
|
ning different versions of Postfix, or that are not man-
|
||||||
aged together with the default Postfix instance.
|
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>
|
<b>ENVIRONMENT VARIABLES</b>
|
||||||
MAIL_CONFIG
|
MAIL_CONFIG
|
||||||
When present, this forces the <a href="postfix.1.html">postfix(1)</a> command to
|
When present, this forces the <a href="postfix.1.html">postfix(1)</a> command to
|
||||||
operate only on the specified Postfix instance.
|
operate only on the specified Postfix instance.
|
||||||
This environment variable is exported by the post-
|
This environment variable is exported by the <a href="postfix.1.html">post-</a>
|
||||||
fix(1) -c option, so that <a href="postfix.1.html">postfix(1)</a> commands in
|
<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.
|
descendant processes will work correctly.
|
||||||
|
|
||||||
<b>CONFIGURATION PARAMETERS</b>
|
<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>
|
<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-
|
tion directories; these directories belong to addi-
|
||||||
|
@ -197,6 +197,25 @@ POSTFIX(1) POSTFIX(1)
|
|||||||
The directory with Postfix-writable data files (for
|
The directory with Postfix-writable data files (for
|
||||||
example: caches, pseudo-random numbers).
|
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:
|
Available in Postfix version 2.6 and later:
|
||||||
|
|
||||||
<b><a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> (empty)</b>
|
<b><a href="postconf.5.html#multi_instance_directories">multi_instance_directories</a> (empty)</b>
|
||||||
@ -225,25 +244,6 @@ POSTFIX(1) POSTFIX(1)
|
|||||||
Allow this Postfix instance to be started, stopped,
|
Allow this Postfix instance to be started, stopped,
|
||||||
etc., by a multi-instance manager.
|
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>
|
<b>FILES</b>
|
||||||
Prior to Postfix version 2.6, all of the following files
|
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>
|
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>
|
||||||
|
@ -164,6 +164,19 @@ Available in Postfix version 2.5 and later:
|
|||||||
The directory with Postfix-writable data files (for example:
|
The directory with Postfix-writable data files (for example:
|
||||||
caches, pseudo-random numbers).
|
caches, pseudo-random numbers).
|
||||||
.PP
|
.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:
|
Available in Postfix version 2.6 and later:
|
||||||
.IP "\fBmulti_instance_directories (empty)\fR"
|
.IP "\fBmulti_instance_directories (empty)\fR"
|
||||||
An optional list of non-default Postfix configuration directories;
|
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"
|
.IP "\fBmulti_instance_name (empty)\fR"
|
||||||
The optional instance name of this Postfix instance.
|
The optional instance name of this Postfix instance.
|
||||||
.IP "\fBmulti_instance_enable (no)\fR"
|
.IP "\fBmulti_instance_enable (no)\fR"
|
||||||
Allow this Postfix instance to be started, stopped, etc., by
|
Allow this Postfix instance to be started, stopped, etc., by a
|
||||||
a multi-instance manager.
|
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".
|
|
||||||
.SH "FILES"
|
.SH "FILES"
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
|
@ -3219,8 +3219,6 @@ Postfix instance, and that are started, stopped, etc., together
|
|||||||
with the default Postfix instance. Specify a list of pathnames
|
with the default Postfix instance. Specify a list of pathnames
|
||||||
separated by comma or whitespace.
|
separated by comma or whitespace.
|
||||||
.PP
|
.PP
|
||||||
This feature is available in Postfix 2.6 and later.
|
|
||||||
.PP
|
|
||||||
When the list of non-default Postfix configuration directories
|
When the list of non-default Postfix configuration directories
|
||||||
is non-empty, the \fBpostfix\fR(1) command will invoke the multi-instance
|
is non-empty, the \fBpostfix\fR(1) command will invoke the multi-instance
|
||||||
manager specified with the multi_instance_wrapper parameter to
|
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
|
\fBpostfix\fR(1) command invokes when the multi_instance_directories
|
||||||
parameter value is non-empty. The pathname may be followed by
|
parameter value is non-empty. The pathname may be followed by
|
||||||
initial command arguments separated by whitespace; shell
|
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
|
.PP
|
||||||
The \fBpostfix\fR(1) command invokes the manager command with the
|
The \fBpostfix\fR(1) command invokes the manager command with the
|
||||||
\fBpostfix\fR(1) non-option command arguments on the manager command line,
|
\fBpostfix\fR(1) non-option command arguments on the manager command line,
|
||||||
|
@ -40,137 +40,157 @@ to use the familiar "postfix start / stop / reload / upgrade
|
|||||||
|
|
||||||
To start, stop, update, etc., multiple Postfix instances,
|
To start, stop, update, etc., multiple Postfix instances,
|
||||||
use:
|
use:
|
||||||
|
.IP
|
||||||
.nf
|
# postfix \fIcommand\fR
|
||||||
# postfix \fIcommand\fR
|
.PP
|
||||||
.fi
|
|
||||||
|
|
||||||
For example, to find out what Postfix instances are configured:
|
For example, to find out what Postfix instances are configured:
|
||||||
|
.IP
|
||||||
.nf
|
# postfix status
|
||||||
# postfix status
|
.SH "MANAGING AN INDIVIDUAL POSTFIX INSTANCE"
|
||||||
|
|
||||||
To manage an individual Postfix instance, use:
|
|
||||||
|
|
||||||
.nf
|
|
||||||
# postfix -c \fI/path/to/config_directory command\fR
|
|
||||||
.fi
|
|
||||||
.SH "MULTI-INSTANCE DETECTION"
|
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
.fi
|
.fi
|
||||||
While "postfix start/stop/etc" will remain the primary
|
To manage an individual Postfix instance, use:
|
||||||
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:
|
|
||||||
.IP
|
.IP
|
||||||
When the postfix(1) command is invoked with the -c
|
# postfix -c \fI/path/to/config_directory command\fR
|
||||||
option, it will operate only on the specified instance.
|
.PP
|
||||||
We do the same when MAIL_CONFIG is specified in the
|
When the postfix(1) command is invoked with the -c option,
|
||||||
process environment.
|
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
|
Otherwise, the postfix(1) command will operate on all
|
||||||
applicable Postfix instances.
|
applicable Postfix instances.
|
||||||
.SH "MULTI-INSTANCE MANAGER HOOK"
|
.SH "MULTI-INSTANCE MANAGER EXAMPLE"
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
.fi
|
.fi
|
||||||
When the postfix(1) command is invoked without -c option,
|
When the postfix(1) command is invoked without -c option
|
||||||
and non-default Postfix instance directories are defined
|
or MAIL_CONFIG environment setting, and non-default Postfix
|
||||||
in main.cf with multi_instance_directories, then the
|
instance directories are defined in main.cf with the
|
||||||
postfix(1) command invokes the command specified in main.cf
|
multi_instance_directories parameter, postfix(1) invokes
|
||||||
with multi_instance_wrapper, instead of invoking postfix-script.
|
the command specified in main.cf with the multi_instance_wrapper
|
||||||
The multi_instance_wrapper and other main.cf parameters are
|
parameter, instead of invoking postfix-script.
|
||||||
listed in the CONFIGURATION PARAMETERS section below.
|
|
||||||
|
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:
|
A useful wrapper implementation can be as simple as:
|
||||||
|
.IP
|
||||||
.nf
|
.nf
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
: ${command_directory?"do not invoke this command directly"}
|
: ${command_directory?"do not invoke this command directly"}
|
||||||
|
|
||||||
POSTCONF=$command_directory/postconf
|
POSTCONF=$command_directory/postconf
|
||||||
POSTFIX=$command_directory/postfix
|
POSTFIX=$command_directory/postfix
|
||||||
instance_dirs=`$POSTCONF -h multi_instance_directories |
|
instance_dirs=\`$POSTCONF -h multi_instance_directories |
|
||||||
sed 's/,/ /'` || exit 1
|
sed 's/,/ /'\` || exit 1
|
||||||
|
|
||||||
for dir in $config_directory $instance_dirs
|
err=0
|
||||||
do
|
for dir in $config_directory $instance_dirs
|
||||||
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
stop|abort|flush|reload|drain)
|
stop|abort|flush|reload|drain)
|
||||||
test "`$POSTCONF -c $dir -h multi_instance_enable`"
|
test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
|
||||||
= yes || continue;;
|
= yes || continue;;
|
||||||
start)
|
start)
|
||||||
test "`$POSTCONF -c $dir -h multi_instance_enable`"
|
test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
|
||||||
= yes || set check;;
|
= yes || set check;;
|
||||||
esac
|
esac
|
||||||
$POSTFIX -c $dir "$@" || err=$?
|
$POSTFIX -c $dir "$@" || err=$?
|
||||||
done
|
done
|
||||||
|
|
||||||
exit $err
|
exit $err
|
||||||
.fi
|
.fi
|
||||||
|
.PP
|
||||||
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.
|
|
||||||
|
|
||||||
The postmulti(1) command implements a more sophisticated
|
The postmulti(1) command implements a more sophisticated
|
||||||
approach, based on a combination of C code and scripting.
|
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"
|
.SH "SHARED VERSUS NON-SHARED FILES"
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
.fi
|
.fi
|
||||||
Some files are shared between Postfix instances (such as
|
Some files are shared between Postfix instances, such as
|
||||||
executables and manpages) and some files are per-instance
|
executables and manpages, and some files are per-instance,
|
||||||
(such as the queue). See the NON-SHARED FILES section below
|
such as the queue. See the NON-SHARED FILES section below
|
||||||
for a list of per-instance files.
|
for a list of per-instance files.
|
||||||
|
|
||||||
Until now, executables, manpages, etc., have been checked
|
Before Postfix multi-instance support was implemented, the
|
||||||
or updated as part of the default Postfix instance. With
|
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.
|
multi-instance support, we simply continue to do this.
|
||||||
Non-default Postfix instances will check or update only
|
Non-default Postfix instances will check or update only
|
||||||
their non-shared files.
|
their non-shared files.
|
||||||
|
|
||||||
The consequence of this approach is that the default Postfix
|
The consequence of this approach is that the default Postfix
|
||||||
instance should be updated before any other instances.
|
instance should be updated before any other instances.
|
||||||
.SH "IMPLEMENTATION NOTES"
|
.SH "MULTI-INSTANCE API SUMMARY"
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
.fi
|
.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
|
The postfix(1) command ignores the multi_instance_directories
|
||||||
and multi_instance_wrapper parameters when the -c option
|
and multi_instance_wrapper parameters when the -c option
|
||||||
is specified, or when MAIL_CONFIG is present in the process
|
is specified, or when MAIL_CONFIG is present in the process
|
||||||
environment.
|
environment.
|
||||||
|
|
||||||
Otherwise, the postfix(1) command uses the multi_instance_wrapper
|
Otherwise, when the multi_instance_directories parameter
|
||||||
parameter only when the multi_instance_directories parameter
|
value is non-empty, the postfix(1) command executes the
|
||||||
value is non-empty.
|
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
|
"check" when a Postfix instance does not have
|
||||||
"multi_instance_enable = yes". This substitution ensures
|
"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)
|
Set-gid commands such as postdrop(1) and postqueue(1)
|
||||||
effectively append the multi_instance_directories parameter
|
effectively append the multi_instance_directories parameter
|
||||||
value to the legacy alternate_config_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
|
The legacy alternate_config_directories parameter remains
|
||||||
necessary for non-default Postfix instances that are running
|
necessary for non-default Postfix instances that are running
|
||||||
different versions of Postfix, or that are not managed
|
different versions of Postfix, or that are not managed
|
||||||
together with the default Postfix instance.
|
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"
|
.SH "ENVIRONMENT VARIABLES"
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
@ -187,6 +207,8 @@ correctly.
|
|||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
.fi
|
.fi
|
||||||
|
The text below provides only a parameter summary. See
|
||||||
|
postconf(5) for more details.
|
||||||
.IP "\fBmulti_instance_directories (empty)\fR"
|
.IP "\fBmulti_instance_directories (empty)\fR"
|
||||||
An optional list of non-default Postfix configuration directories;
|
An optional list of non-default Postfix configuration directories;
|
||||||
these directories belong to additional Postfix instances that share
|
these directories belong to additional Postfix instances that share
|
||||||
|
@ -715,7 +715,7 @@ while (<>) {
|
|||||||
s/[<bB>]*postcat[<\/bB>]*\(1\)/<a href="postcat.1.html">$&<\/a>/g;
|
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>]*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>]*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>]*postkick[<\/bB>]*\(1\)/<a href="postkick.1.html">$&<\/a>/g;
|
||||||
s/[<bB>]*postlock[<\/bB>]*\(1\)/<a href="postlock.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;
|
s/[<bB>]*postlog[<\/bB>]*\(1\)/<a href="postlog.1.html">$&<\/a>/g;
|
||||||
|
@ -12033,8 +12033,6 @@ Postfix instance, and that are started, stopped, etc., together
|
|||||||
with the default Postfix instance. Specify a list of pathnames
|
with the default Postfix instance. Specify a list of pathnames
|
||||||
separated by comma or whitespace. </p>
|
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
|
<p> When the list of non-default Postfix configuration directories
|
||||||
is non-empty, the postfix(1) command will invoke the multi-instance
|
is non-empty, the postfix(1) command will invoke the multi-instance
|
||||||
manager specified with the multi_instance_wrapper parameter to
|
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
|
postfix(1) command invokes when the multi_instance_directories
|
||||||
parameter value is non-empty. The pathname may be followed by
|
parameter value is non-empty. The pathname may be followed by
|
||||||
initial command arguments separated by whitespace; shell
|
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
|
<p> The postfix(1) command invokes the manager command with the
|
||||||
postfix(1) non-option command arguments on the manager command line,
|
postfix(1) non-option command arguments on the manager command line,
|
||||||
|
@ -34,50 +34,41 @@
|
|||||||
#
|
#
|
||||||
# To start, stop, update, etc., multiple Postfix instances,
|
# To start, stop, update, etc., multiple Postfix instances,
|
||||||
# use:
|
# use:
|
||||||
#
|
# .IP
|
||||||
# .nf
|
|
||||||
# # postfix \fIcommand\fR
|
# # postfix \fIcommand\fR
|
||||||
# .fi
|
# .PP
|
||||||
#
|
|
||||||
# For example, to find out what Postfix instances are configured:
|
# For example, to find out what Postfix instances are configured:
|
||||||
#
|
# .IP
|
||||||
# .nf
|
|
||||||
# # postfix status
|
# # postfix status
|
||||||
#
|
# MANAGING AN INDIVIDUAL POSTFIX INSTANCE
|
||||||
# To manage an individual Postfix instance, use:
|
|
||||||
#
|
|
||||||
# .nf
|
|
||||||
# # postfix -c \fI/path/to/config_directory command\fR
|
|
||||||
# .fi
|
|
||||||
# MULTI-INSTANCE DETECTION
|
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
# While "postfix start/stop/etc" will remain the primary
|
# To manage an individual Postfix instance, use:
|
||||||
# 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:
|
|
||||||
# .IP
|
# .IP
|
||||||
# When the postfix(1) command is invoked with the -c
|
# # postfix -c \fI/path/to/config_directory command\fR
|
||||||
# option, it will operate only on the specified instance.
|
# .PP
|
||||||
# We do the same when MAIL_CONFIG is specified in the
|
# When the postfix(1) command is invoked with the -c option,
|
||||||
# process environment.
|
# 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
|
# Otherwise, the postfix(1) command will operate on all
|
||||||
# applicable Postfix instances.
|
# applicable Postfix instances.
|
||||||
# MULTI-INSTANCE MANAGER HOOK
|
# MULTI-INSTANCE MANAGER EXAMPLE
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
# When the postfix(1) command is invoked without -c option,
|
# When the postfix(1) command is invoked without -c option
|
||||||
# and non-default Postfix instance directories are defined
|
# or MAIL_CONFIG environment setting, and non-default Postfix
|
||||||
# in main.cf with multi_instance_directories, then the
|
# instance directories are defined in main.cf with the
|
||||||
# postfix(1) command invokes the command specified in main.cf
|
# multi_instance_directories parameter, postfix(1) invokes
|
||||||
# with multi_instance_wrapper, instead of invoking postfix-script.
|
# the command specified in main.cf with the multi_instance_wrapper
|
||||||
# The multi_instance_wrapper and other main.cf parameters are
|
# parameter, instead of invoking postfix-script.
|
||||||
# listed in the CONFIGURATION PARAMETERS section below.
|
#
|
||||||
|
# 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:
|
# A useful wrapper implementation can be as simple as:
|
||||||
#
|
# .IP
|
||||||
# .nf
|
# .nf
|
||||||
# #!/bin/sh
|
# #!/bin/sh
|
||||||
#
|
#
|
||||||
@ -85,17 +76,18 @@
|
|||||||
#
|
#
|
||||||
# POSTCONF=$command_directory/postconf
|
# POSTCONF=$command_directory/postconf
|
||||||
# POSTFIX=$command_directory/postfix
|
# POSTFIX=$command_directory/postfix
|
||||||
# instance_dirs=`$POSTCONF -h multi_instance_directories |
|
# instance_dirs=\`$POSTCONF -h multi_instance_directories |
|
||||||
# sed 's/,/ /'` || exit 1
|
# sed 's/,/ /'\` || exit 1
|
||||||
#
|
#
|
||||||
|
# err=0
|
||||||
# for dir in $config_directory $instance_dirs
|
# for dir in $config_directory $instance_dirs
|
||||||
# do
|
# do
|
||||||
# case "$1" in
|
# case "$1" in
|
||||||
# stop|abort|flush|reload|drain)
|
# stop|abort|flush|reload|drain)
|
||||||
# test "`$POSTCONF -c $dir -h multi_instance_enable`"
|
# test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
|
||||||
# = yes || continue;;
|
# = yes || continue;;
|
||||||
# start)
|
# start)
|
||||||
# test "`$POSTCONF -c $dir -h multi_instance_enable`"
|
# test "\`$POSTCONF -c $dir -h multi_instance_enable\`" \e
|
||||||
# = yes || set check;;
|
# = yes || set check;;
|
||||||
# esac
|
# esac
|
||||||
# $POSTFIX -c $dir "$@" || err=$?
|
# $POSTFIX -c $dir "$@" || err=$?
|
||||||
@ -103,60 +95,86 @@
|
|||||||
#
|
#
|
||||||
# exit $err
|
# exit $err
|
||||||
# .fi
|
# .fi
|
||||||
#
|
# .PP
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# The postmulti(1) command implements a more sophisticated
|
# The postmulti(1) command implements a more sophisticated
|
||||||
# approach, based on a combination of C code and scripting.
|
# 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
|
# SHARED VERSUS NON-SHARED FILES
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
# Some files are shared between Postfix instances (such as
|
# Some files are shared between Postfix instances, such as
|
||||||
# executables and manpages) and some files are per-instance
|
# executables and manpages, and some files are per-instance,
|
||||||
# (such as the queue). See the NON-SHARED FILES section below
|
# such as the queue. See the NON-SHARED FILES section below
|
||||||
# for a list of per-instance files.
|
# for a list of per-instance files.
|
||||||
#
|
#
|
||||||
# Until now, executables, manpages, etc., have been checked
|
# Before Postfix multi-instance support was implemented, the
|
||||||
# or updated as part of the default Postfix instance. With
|
# 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.
|
# multi-instance support, we simply continue to do this.
|
||||||
# Non-default Postfix instances will check or update only
|
# Non-default Postfix instances will check or update only
|
||||||
# their non-shared files.
|
# their non-shared files.
|
||||||
#
|
#
|
||||||
# The consequence of this approach is that the default Postfix
|
# The consequence of this approach is that the default Postfix
|
||||||
# instance should be updated before any other instances.
|
# instance should be updated before any other instances.
|
||||||
# IMPLEMENTATION NOTES
|
# MULTI-INSTANCE API SUMMARY
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .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
|
# The postfix(1) command ignores the multi_instance_directories
|
||||||
# and multi_instance_wrapper parameters when the -c option
|
# and multi_instance_wrapper parameters when the -c option
|
||||||
# is specified, or when MAIL_CONFIG is present in the process
|
# is specified, or when MAIL_CONFIG is present in the process
|
||||||
# environment.
|
# environment.
|
||||||
#
|
#
|
||||||
# Otherwise, the postfix(1) command uses the multi_instance_wrapper
|
# Otherwise, when the multi_instance_directories parameter
|
||||||
# parameter only when the multi_instance_directories parameter
|
# value is non-empty, the postfix(1) command executes the
|
||||||
# value is non-empty.
|
# 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
|
# "check" when a Postfix instance does not have
|
||||||
# "multi_instance_enable = yes". This substitution ensures
|
# "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)
|
# Set-gid commands such as postdrop(1) and postqueue(1)
|
||||||
# effectively append the multi_instance_directories parameter
|
# effectively append the multi_instance_directories parameter
|
||||||
# value to the legacy alternate_config_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
|
# The legacy alternate_config_directories parameter remains
|
||||||
# necessary for non-default Postfix instances that are running
|
# necessary for non-default Postfix instances that are running
|
||||||
# different versions of Postfix, or that are not managed
|
# different versions of Postfix, or that are not managed
|
||||||
# together with the default Postfix instance.
|
# 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
|
# ENVIRONMENT VARIABLES
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
@ -169,6 +187,8 @@
|
|||||||
# CONFIGURATION PARAMETERS
|
# CONFIGURATION PARAMETERS
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
|
# The text below provides only a parameter summary. See
|
||||||
|
# postconf(5) for more details.
|
||||||
# .IP "\fBmulti_instance_directories (empty)\fR"
|
# .IP "\fBmulti_instance_directories (empty)\fR"
|
||||||
# An optional list of non-default Postfix configuration directories;
|
# An optional list of non-default Postfix configuration directories;
|
||||||
# these directories belong to additional Postfix instances that share
|
# these directories belong to additional Postfix instances that share
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20090123"
|
#define MAIL_RELEASE_DATE "20090125"
|
||||||
#define MAIL_VERSION_NUMBER "2.6"
|
#define MAIL_VERSION_NUMBER "2.6"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@ -154,6 +154,19 @@
|
|||||||
/* The directory with Postfix-writable data files (for example:
|
/* The directory with Postfix-writable data files (for example:
|
||||||
/* caches, pseudo-random numbers).
|
/* caches, pseudo-random numbers).
|
||||||
/* .PP
|
/* .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:
|
/* Available in Postfix version 2.6 and later:
|
||||||
/* .IP "\fBmulti_instance_directories (empty)\fR"
|
/* .IP "\fBmulti_instance_directories (empty)\fR"
|
||||||
/* An optional list of non-default Postfix configuration directories;
|
/* An optional list of non-default Postfix configuration directories;
|
||||||
@ -170,21 +183,8 @@
|
|||||||
/* .IP "\fBmulti_instance_name (empty)\fR"
|
/* .IP "\fBmulti_instance_name (empty)\fR"
|
||||||
/* The optional instance name of this Postfix instance.
|
/* The optional instance name of this Postfix instance.
|
||||||
/* .IP "\fBmulti_instance_enable (no)\fR"
|
/* .IP "\fBmulti_instance_enable (no)\fR"
|
||||||
/* Allow this Postfix instance to be started, stopped, etc., by
|
/* Allow this Postfix instance to be started, stopped, etc., by a
|
||||||
/* a multi-instance manager.
|
/* 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".
|
|
||||||
/* FILES
|
/* FILES
|
||||||
/* .ad
|
/* .ad
|
||||||
/* .fi
|
/* .fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user