From: Wietse Venema Date: Fri, 23 Jan 2009 05:00:00 +0000 (-0500) Subject: postfix-2.6-20090123 X-Git-Tag: v2.6.0-RC1~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4548f736ab4573601da1dddddcd5e79659633d2;p=thirdparty%2Fpostfix.git postfix-2.6-20090123 --- diff --git a/postfix/HISTORY b/postfix/HISTORY index 90ee4ad5c..55265c157 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -14934,3 +14934,9 @@ Apologies for any names omitted. Bugfix: the data_directory was not automatically created! File: conf/postfix-files. + +20090123 + + More little fixes in the "trivial but useful" postfix-wrapper + including instructions. It's ready for testing in the field. + File: conf/postfix-wrapper. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index 3847b4968..d5f742811 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -14,11 +14,38 @@ specifies the release date of a stable release or snapshot release. Major changes with snapshot 20090121 ==================================== -Plug-in support for multi-instance managers. Basically this -automatically applies your "postfix start" etc. command to multiple -Postfix instances if available. The postfix-wrapper script (in the -daemon directory) provides a simple multi-instance manager with -instructions. The plug-in API itself is described in postfix-wrapper(5). +Plug-in support for managing multiple Postfix instances. This can +automatically apply your "postfix start" etc. command to multiple +Postfix instances, including upgrades to new Postfix versions. +Multi-instance support allows you to do the following and more: + +- Simplify post-queue content filter configuration by using separate + Postfix instances before and after the filter. This simplifies + trouble shooting and performance tuning. + +- Implement per-user content filters (or no filter) via transport + map lookups instead of content_filter settings. Mail for some + users can be sent directly from the before-filter instance to the + after-filter instance. + +- Test new configuration settings (on a different server IP address + or TCP port) without disturbing production instances. + +- Each additional Postfix instance uses a few files and directories, + plus memory for an extra master daemon and queue manager. The + pickup daemon is needed only if you use local submission or + "postsuper -r". + +Best of all, nothing changes when you use only one Postfix instance. + +The postfix-wrapper script (in the daemon directory) implements a +simple but useful multi-instance manager, with instructions. The +plug-in API itself is described in the postfix-wrapper(5) manpage. + +A more sophisticated multi-instance manager called postmulti(1) is +approaching completion. A prototype version has been used internally +at Morgan Stanley. This version will be adapted to the new plug-in +API which makes some simplification possible. Major changes with snapshot 20090109 ==================================== diff --git a/postfix/conf/postfix-wrapper b/postfix/conf/postfix-wrapper index b48536b49..ff9afef47 100644 --- a/postfix/conf/postfix-wrapper +++ b/postfix/conf/postfix-wrapper @@ -7,11 +7,9 @@ # NAME # postfix-wrapper 1 # SUMMARY -# trivial multi-instance manager +# trivial but useful multi-instance manager # SYNOPSIS # postfix command -# -# postfix /usr/libexec/postfix/postfix-wrapper init # DESCRIPTION # This command implements a trivial Postfix multi-instance # manager. @@ -27,13 +25,13 @@ # of its configuration files is specified by the built-in # default value for the config_directory parameter. Other # Postfix instances are optional. -# MANAGING INSTANCES +# MANAGING MULTIPLE INSTANCES # .ad # .fi # To hook the postfix-wrapper multi-instance manager into -# Postfix, see the WRAPPER INITIALIZATION section below. To -# create a new Postfix instance, see the CREATING A NEW POSTFIX -# INSTANCE section below. +# Postfix, see the POSTFIX-WRAPPER INITIALIZATION section +# below. To create a new Postfix instance, see the CREATING +# A NEW POSTFIX INSTANCE section below. # # To start, stop, get status, etc., with multiple Postfix # instances, use: @@ -65,50 +63,77 @@ # The startup order is used for all postfix(1) commands, # except for commands that stop Postfix instances. In those # cases the order is reversed. -# +# MANAGING INDIVIDUAL INSTANCES +# .ad +# .fi # To manage an individual Postfix instance, use: # # .nf # # postfix -c /path/to/config_directory command # .fi # -# Note: only the default Postfix instance will check or update -# the shared Postfix files, including the executable files -# and documentation. -# WRAPPER INITIALIZATION +# This is also needed to manage the default Postfix instance, +# after you turn on multi-instance support. +# +# To use the Postfix sendmail command with a non-default +# Postfix instance, use: +# +# .nf +# # sendmail -C /path/to/config_directory ... +# .fi +# +# Note 1: that's capital C, not lower-case c. +# +# Note 2: only the default Postfix instance will check or +# update the shared Postfix files, including the executable +# files and documentation. +# POSTFIX-WRAPPER INITIALIZATION # .ad # .fi # To hook this program into Postfix, execute the following -# command, replacing /etc/postfix by the default Postfix -# configuration directory, and replacing /usr/libexec/postfix -# by the actual path of the Postfix daemon directory: +# command. +# +# Replace /etc/postfix with the default Postfix configuration +# directory, and replace /usr/libexec/postfix with the daemon +# directory pathname of the default Postfix instance. +# +# This command should be entered as one line. # # .nf -# # postfix -c /etc/postfix -# /usr/libexec/postfix/postfix-wrapper init +# # postconf -c /etc/postfix -e +# "multi_instance_enable=yes" +# "multi_instance_wrapper=/usr/libexec/postfix/postfix-wrapper" # .fi # CREATING A NEW POSTFIX INSTANCE # .ad # .fi # To create a Postfix instance called "postfix-test", start -# with working main.cf and master.cf files and customize the -# locations of the queue and data directories. The last -# command below also creates any directories that Postfix -# will need. +# with generic main.cf and master.cf files and customize the +# locations of the queue and data directories as shown below. +# The last command updates main.cf and creates any directories +# that Postfix will need. +# +# Replace /etc/postfix with the default Postfix configuration +# directory, and replace /usr/libexec/postfix with the daemon +# directory pathname of the default Postfix instance. +# +# Each command should be entered as one line. # # .nf # # mkdir /etc/postfix-test -# # cp /etc/postfix/main.cf /etc/postfix-test -# # cp /etc/postfix/master.cf /etc/postfix-test +# # cp /usr/libexec/postfix/main.cf /etc/postfix-test +# # cp /usr/libexec/postfix/master.cf /etc/postfix-test # # postconf -c /etc/postfix-test -e # "multi_instance_name=postfix-test" -# # postfix -c /etc/postfix-test post-install +# # postfix -c /etc/postfix post-install +# "config_directory=/etc/postfix-test" # "queue_directory=/var/spool/postfix-test" # "data_directory=/var/lib/postfix-test" # create-missing # .fi # -# Register this Postfix instance with the default instance: +# Register this Postfix instance with the default instance. +# This command should be entered as one line. # # .nf # # postconf -e "multi_instance_directories=`postconf @@ -123,6 +148,8 @@ # # .nf # # postfix -c /etc/postfix-test start +# # postfix -c /etc/postfix-test status +# [ other tests ... ] # .fi # # When everything is working satisfactorily, enable start/stop/etc. @@ -162,7 +189,6 @@ POSTCONF=$command_directory/postconf POSTFIX=$command_directory/postfix -WRAPPER=$daemon_directory/postfix-wrapper # Canonicalize the instance directory list. The list is specified # in startup order. @@ -178,7 +204,7 @@ case "$1" in done;; *) all_dirs="$config_directory $instance_dirs";; esac -# + # Execute the command on all applicable instances. When a Postfix # instance is disabled, replace "postfix start" by "postfix check" # so that problems will still be reported. @@ -186,11 +212,6 @@ esac for dir in $all_dirs do case "$1" in - init*) - $POSTCONF -e \ - "multi_instance_enable = yes" \ - "multi_instance_wrapper = $daemon_directory/postfix-wrapper" - exit;; start) test "`$POSTCONF -c $dir -h multi_instance_enable`" = yes || set check;; diff --git a/postfix/html/postfix-wrapper.5.html b/postfix/html/postfix-wrapper.5.html index db57a3047..b92315e8f 100644 --- a/postfix/html/postfix-wrapper.5.html +++ b/postfix/html/postfix-wrapper.5.html @@ -12,7 +12,9 @@ POSTFIX-WRAPPER(5) POSTFIX-WRAPPER(5) DESCRIPTION This document describes an interface that allows a multi- instance manager to plug into Postfix and to control mul- - tiple Postfix instances. + tiple Postfix instances. A trivial but useful implementa- + tion, with instructions, can be found in $daemon_direc- + tory/postfix-wrapper. Each Postfix instance is defined by its own configuration directory with its own main.cf and master.cf files, by its @@ -204,6 +206,7 @@ POSTFIX-WRAPPER(5) POSTFIX-WRAPPER(5) SEE ALSO postfix(1) Postfix control program + $daemon_directory/postfix-wrapper simple multi-instance manager postmulti(1) full-blown multi-instance manager LICENSE diff --git a/postfix/man/man5/postfix-wrapper.5 b/postfix/man/man5/postfix-wrapper.5 index 739eb9998..179c31cc7 100644 --- a/postfix/man/man5/postfix-wrapper.5 +++ b/postfix/man/man5/postfix-wrapper.5 @@ -10,7 +10,9 @@ Postfix multi-instance API .fi This document describes an interface that allows a multi-instance manager to plug into Postfix and to control -multiple Postfix instances. +multiple Postfix instances. A trivial but useful implementation, +with instructions, can be found in +$daemon_directory/postfix-wrapper. Each Postfix instance is defined by its own configuration directory with its own main.cf and master.cf files, by its @@ -87,7 +89,6 @@ listed in the CONFIGURATION PARAMETERS section below. A useful wrapper implementation can be as simple as: .nf -.ft C #!/bin/sh : ${command_directory?"do not invoke this command directly"} @@ -111,7 +112,6 @@ A useful wrapper implementation can be as simple as: done exit $err -.ft .fi This wrapper skips commands such as "stop" that require a @@ -221,6 +221,7 @@ The location of the Postfix top-level queue directory. .na .nf postfix(1) Postfix control program +$daemon_directory/postfix-wrapper simple multi-instance manager postmulti(1) full-blown multi-instance manager .SH "LICENSE" .na diff --git a/postfix/mantools/postlink b/postfix/mantools/postlink index 18d03198e..591a7ebef 100755 --- a/postfix/mantools/postlink +++ b/postfix/mantools/postlink @@ -125,7 +125,7 @@ while (<>) { s;\bconfig_direc[-]*\n*[ ]*tory\b;$&;g; s;\bcon[-]*\n*[ ]*tent_filter\b;$&;g; s;\bdata_directory\b;$&;g; - s;\bdae[-]*\n*[ ]*mon_directory\b;$&;g; + s;\bdae[-]*\n*[ ]*mon_direc[-]*\n*[ ]*tory\b;$&;g; s;\bdaemon_timeout\b;$&;g; s;\bdebug_peer_level\b;$&;g; s;\bdebug_peer_list\b;$&;g; diff --git a/postfix/proto/postfix-wrapper b/postfix/proto/postfix-wrapper index 5bce8cd93..5b5a845c0 100644 --- a/postfix/proto/postfix-wrapper +++ b/postfix/proto/postfix-wrapper @@ -6,7 +6,9 @@ # DESCRIPTION # This document describes an interface that allows a # multi-instance manager to plug into Postfix and to control -# multiple Postfix instances. +# multiple Postfix instances. A trivial but useful implementation, +# with instructions, can be found in +# $daemon_directory/postfix-wrapper. # # Each Postfix instance is defined by its own configuration # directory with its own main.cf and master.cf files, by its @@ -77,7 +79,6 @@ # A useful wrapper implementation can be as simple as: # # .nf -# .ft C # #!/bin/sh # # : ${command_directory?"do not invoke this command directly"} @@ -101,7 +102,6 @@ # done # # exit $err -# .ft # .fi # # This wrapper skips commands such as "stop" that require a @@ -199,6 +199,7 @@ # The location of the Postfix top-level queue directory. # SEE ALSO # postfix(1) Postfix control program +# $daemon_directory/postfix-wrapper simple multi-instance manager # postmulti(1) full-blown multi-instance manager # LICENSE # .ad diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 7e956d316..9c6992a30 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -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 "20090122" +#define MAIL_RELEASE_DATE "20090123" #define MAIL_VERSION_NUMBER "2.6" #ifdef SNAPSHOT