#!/bin/sh

# To view the formatted manual page of this file, type:
#	POSTFIXSOURCE/mantools/srctoman - post-install | nroff -man

#++
# NAME
#	post-install
# SUMMARY
#	Postfix post-installation script
# SYNOPSIS
#	postfix post-install [name=value] command ...
# DESCRIPTION
#	The post-install script performs the finishing touch of a Postfix
#	installation, after the executable programs and configuration
#	files are installed. Usage is one of the following:
# .IP o
#	While installing Postfix from source code on the local machine, the
#	script is run by the postfix-install script to update selected file
#	or directory permissions and to update Postfix configuration files.
# .IP o
#	While installing Postfix from a pre-built package, the script is run
#	by the package management procedure to set all file or directory
#	permissions and to update Postfix configuration files.
# .IP o
#	The script can be used to change installation parameter settings such
#	as mail_owner or setgid_group after Postfix is already installed.
# .IP o
#	The script can be used to upgrade configuration files and to upgrade
#	file/directory permissions of a secondary Postfix instance.
# .IP o
#	At Postfix start-up time, the script is run from "postfix check" to
#	create missing queue directories.
# .PP
#	The post-install script is controlled by installation parameters.
#	Specific parameters are described at the end of this document.
#	All installation parameters must be specified ahead of time via
#	one of the methods described below.
#
#	Arguments
# .IP create-missing
#	Create missing queue directories with ownerships and permissions
#	according to the contents of $daemon_directory/postfix-files, using
#	the mail_owner and setgid_group parameter settings from the command
#	line, process environment or from the installed main.cf file.
#
#	This is required at Postfix start-up time.
# .IP set-permissions
#	Set all file/directory ownerships and permissions according to the
#	contents of $daemon_directory/postfix-files, using the mail_owner
#	and setgid_group parameter settings from the command line, process
#	environment or from the installed main.cf file. Implies create-missing.
#
#	This is required when installing Postfix from a pre-built package,
#	or when changing the mail_owner or setgid_group installation parameter
#	settings after Postfix is already installed.
# .IP upgrade-permissions
#	Update ownership and permission of existing files/directories as
#	specified in $daemon_directory/postfix-files, using the mail_owner
#	and setgid_group parameter settings from the command line, process
#	environment or from the installed main.cf file. Implies create-missing.
#
#	This is required when upgrading an existing Postfix instance.
# .IP upgrade-configuration
#	Edit the installed main.cf and master.cf files, in order to account
#	for missing services and to fix deprecated parameter settings.
#
#	This is required when upgrading an existing Postfix instance.
# .IP upgrade-source
#	Short-hand for: upgrade-permissions upgrade-configuration.
#
#	This is recommended when upgrading Postfix from source code.
# .IP upgrade-package
#	Short-hand for: set-permissions upgrade-configuration.
#
#	This is recommended when upgrading Postfix from a pre-built package.
# .IP first-install-reminder
#	Remind the user that they still need to configure main.cf and the
#	aliases file, and that newaliases still needs to be run.
#
#	This is recommended when Postfix is installed for the first time.
# MULTIPLE POSTFIX INSTANCES
# .ad
# .fi
#	Multiple Postfix instances on the same machine can share command and
#	daemon program files but must have separate configuration and queue
#	directories.
#
#	To create a secondary Postfix installation on the same machine,
#	copy the configuration files from the primary Postfix instance to
#	a secondary configuration directory and execute:
#
#	postfix post-install config_directory=secondary-config-directory \e
# .in +4
#		queue_directory=secondary-queue-directory \e
# .br
#		create-missing
# .PP
#	This creates secondary Postfix queue directories, sets their access
#	permissions, and saves the specified installation parameters to the
#	secondary main.cf file.
#
#	Be sure to list the secondary configuration directory in the
#	alternate_config_directories parameter in the primary main.cf file.
#
#	To upgrade a secondary Postfix installation on the same machine,
#	execute:
#
#	postfix post-install config_directory=secondary-config-directory \e
# .in +4
#		upgrade-permissions upgrade-configuration
# INSTALLATION PARAMETER INPUT METHODS
# .ad
# .fi
#	Parameter settings can be specified through a variety of
#	mechanisms.  In order of decreasing precedence these are:
# .IP "command line"
#	Parameter settings can be given as name=value arguments on
#	the post-install command line. These have the highest precedence.
#	Settings that override the installed main.cf file are saved.
# .IP "process environment"
#	Parameter settings can be given as name=value environment
#	variables.
#	Settings that override the installed main.cf file are saved.
# .IP "installed configuration files"
#	If a parameter is not specified via the command line or via the
#	process environment, post-install will attempt to extract its
#	value from the already installed Postfix main.cf configuration file.
#	These settings have the lowest precedence.
# INSTALLATION PARAMETER DESCRIPTION
# .ad
# .fi
#	The description of installation parameters is as follows:
# .IP config_directory
#	The directory for Postfix configuration files.
# .IP daemon_directory
#	The directory for Postfix daemon programs. This directory
#	should not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not be in the command sX not 