1#!/bin/sh 2 3# To view the formatted manual page of this file, type: 4# POSTFIXSOURCE/mantools/srctoman - postfix-install | nroff -man 5 6#++ 7# NAME 8# postfix-install 1 9# SUMMARY 10# Postfix installation procedure 11# SYNOPSIS 12# sh postfix-install [options] [name=value] ... 13# DESCRIPTION 14# The postfix-install script is to be run from the top-level 15# Postfix source directory. It implements the following operations: 16# .IP o 17# Install or upgrade Postfix from source code. This requires 18# super-user privileges. 19# .IP o 20# Build a package that can be distributed to other systems, in order 21# to install or upgrade Postfix elsewhere. This requires no super-user 22# privileges. To complete the installation after unpacking the 23# package, execute as super-user the post-install script in the Postfix 24# configuration directory. 25# .PP 26# The postfix-install script is controlled by installation parameters. 27# Specific parameters are described at the end of this document. 28# 29# By default, postfix-install asks the user for installation 30# parameter settings. Most settings are stored in the installed 31# main.cf file. Stored settings are used as site-specific defaults 32# when the postfix-install script is run later. 33# 34# The names of Postfix files and directories, as well as their 35# ownerships and permissions, are stored in the postfix-files file 36# in the Postfix configuration directory. This information is used 37# by the post-install script (also in the configuration directory) 38# for creating missing queue directories when Postfix is started, 39# and for setting correct ownership and permissions when Postfix 40# is installed from a pre-built package or from source code. 41# 42# Arguments 43# .IP -non-interactive 44# Do not ask the user for parameter settings. Installation parameters 45# are specified via one of the non-interactive methods described 46# below. 47# .IP -package 48# Build a ready-to-install package. This requires that a 49# non-default install_root parameter is specified. 50# INSTALLATION PARAMETER INPUT METHODS 51# .ad 52# .fi 53# Parameter settings can be specified through a variety of 54# mechanisms. In order of decreasing precedence these are: 55# .IP "interactive mode" 56# By default, postfix-install will ask the user for installation 57# parameter settings. These settings have the highest precedence. 58# .IP "command line" 59# Parameter settings can be given as name=value arguments on 60# the postfix-install command line. 61# .IP "process environment" 62# Parameter settings can be given as name=value environment 63# variables. Environment parameters can also be specified on the 64# make(1) command line as "make install name=value ...". 65# .IP "installed configuration files" 66# If a parameter is not specified via the command line or via the 67# process environment, postfix-install will attempt to extract its 68# value from an already installed Postfix main.cf configuration file. 69# .IP "built-in defaults" 70# These settings have the lowest precedence. 71# INSTALLATION PARAMETER DESCRIPTION 72# .ad 73# .fi 74# The description of installation parameters and their built-in 75# default settings is as follows: 76# .IP install_root 77# Prefix that is prepended to the pathnames of installed files. 78# Specify this ONLY when creating pre-built packages for distribution to 79# other systems. The built-in default is "/", the local root directory. 80# This parameter setting is not recorded in the installed main.cf file. 81# .IP tempdir 82# Directory for scratch files while installing Postfix. 83# You must have write permission in this directory. 84# The built-in default directory name is the current directory. 85# This parameter setting is not recorded in the installed main.cf file. 86# .IP config_directory 87# The final destination directory for Postfix configuration files. 88# The built-in default directory name is /etc/postfix. 89# This parameter setting is not recorded in the installed main.cf file 90# and can be changed only by recompiling Postfix. 91# .IP data_directory 92# The final destination directory for Postfix-writable data files such 93# as caches. This directory should not be shared with non-Postfix 94# software. The built-in default directory name is /var/lib/postfix. 95# This parameter setting is recorded in the installed main.cf file. 96# .IP daemon_directory 97# The final destination directory for Postfix daemon programs. This 98# directory should not be in the command search path of any users. 99# The built-in default directory name is /usr/libexec/postfix. 100# This parameter setting is recorded in the installed main.cf file. 101# .IP command_directory 102# The final destination directory for Postfix administrative commands. 103# This directory should be in the command search path of adminstrative 104# users. The built-in default directory name is system dependent. 105# This parameter setting is recorded in the installed main.cf file. 106# .IP html_directory 107# The destination directory for the Postfix HTML files. 108# This parameter setting is recorded in the installed main.cf file. 109# .IP queue_directory 110# The final destination directory for Postfix queues. 111# The built-in default directory name is /var/spool/postfix. 112# This parameter setting is recorded in the installed main.cf file. 113# .IP sendmail_path 114# The final destination pathname for the Postfix sendmail command. 115# This is the Sendmail-compatible mail posting interface. 116# The built-in default pathname is system dependent. 117# This parameter setting is recorded in the installed main.cf file. 118# .IP newaliases_path 119# The final destination pathname for the Postfix newaliases command. 120# This is the Sendmail-compatible command to build alias databases 121# for the Postfix local delivery agent. 122# The built-in default pathname is system dependent. 123# This parameter setting is recorded in the installed main.cf file. 124# .IP mailq_path 125# The final destination pathname for the Postfix mailq command. 126# This is the Sendmail-compatible command to list the mail queue. 127# The built-in default pathname is system dependent. 128# This parameter setting is recorded in the installed main.cf file. 129# .IP mail_owner 130# The owner of the Postfix queue. Its numerical user ID and group ID 131# must not be used by any other accounts on the system. 132# The built-in default account name is postfix. 133# This parameter setting is recorded in the installed main.cf file. 134# .IP setgid_group 135# The group for mail submission and for queue management commands. 136# Its numerical group ID must not be used by any other accounts on the 137# system, not even by the mail_owner account. 138# The built-in default group name is postdrop. 139# This parameter setting is recorded in the installed main.cf file. 140# .IP manpage_directory 141# The destination directory for the Postfix on-line manual pages. 142# This parameter setting is recorded in the installed main.cf file. 143# .IP sample_directory 144# The destination directory for the Postfix sample configuration files. 145# This parameter is obsolete as of Postfix version 2.1. 146# This parameter setting is recorded in the installed main.cf file. 147# .IP readme_directory 148# The destination directory for the Postfix README files. 149# This parameter setting is recorded in the installed main.cf file. 150# SEE ALSO 151# post-install(1) post-installation procedure 152# FILES 153# $config_directory/main.cf, Postfix installation configuration. 154# $daemon_directory/postfix-files, installation control file. 155# $config_directory/install.cf, obsolete configuration file. 156# LICENSE 157# .ad 158# .fi 159# The Secure Mailer license must be distributed with this software. 160# AUTHOR(S) 161# Wietse Venema 162# IBM T.J. Watson Research 163# P.O. Box 704 164# Yorktown Heights, NY 10598, USA 165#-- 166 167# Initialize. 168# By now, shells must have functions. Ultrix users must use sh5 or lose. 169 170umask 022 171PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc:/usr/contrib/bin:/usr/gnu/bin:/usr/ucb:/usr/bsd 172SHELL=/bin/sh 173IFS=" 174" 175BACKUP_IFS="$IFS" 176 177USAGE="Usage: $0 [name=value] [option] 178 -non-interactive Do not ask for installation parameters. 179 -package Build a ready-to-install package. 180 name=value Specify an installation parameter". 181 182# Process command-line options and parameter settings. Work around 183# brain damaged shells. "IFS=value command" should not make the 184# IFS=value setting permanent. But some broken standard allows it. 185 186for arg 187do 188 case $arg in 189 *=*) IFS= eval $arg; IFS="$BACKUP_IFS";; 190-non-int*) non_interactive=1;; 191 -package) need_install_root=install_root;; 192 *) echo "$0: Error: $USAGE" 1>&2; exit 1;; 193 esac 194 shift 195done 196 197# Sanity checks. 198 199test -z "$non_interactive" -a ! -t 0 && { 200 echo $0: Error: for non-interactive use, run: \"$0 -non-interactive\" 1>&2 201 exit 1 202} 203 204test -x bin/postconf || { 205 echo $0: Error: no bin/postconf file. Did you forget to run \"make\"? 1>&2 206 exit 1 207} 208 209case `uname -s` in 210HP-UX*) FMT=cat;; 211 *) FMT=fmt;; 212esac 213 214# Disclaimer. 215 216test -z "$non_interactive" && cat <<EOF | ${FMT} 217 218 Warning: if you use this script to install Postfix locally, 219 this script will replace existing sendmail or Postfix programs. 220 Make backups if you want to be able to recover. 221 222 Before installing files, this script prompts you for some 223 definitions. Most definitions will be remembered, so you have 224 to specify them only once. All definitions should have a 225 reasonable default value. 226EOF 227 228# The following shell functions replace files/symlinks while minimizing 229# the time that a file does not exist, and avoid copying over files 230# in order to not disturb running programs. That is certainly desirable 231# when upgrading Postfix on a live machine. It also avoids surprises 232# when building a Postfix package for distribution to other systems. 233 234compare_or_replace() { 235 mode=$1 236 owner=$2 237 group=$3 238 src=$4 239 dst=$5 240 (cmp $src $dst >/dev/null 2>&1 && echo Skipping $dst...) || { 241 echo Updating $dst... 242 rm -f $tempdir/junk || exit 1 243 cp $src $tempdir/junk || exit 1 244 mv -f $tempdir/junk $dst || exit 1 245 test -z "$owner" || chown $owner $dst || exit 1 246 test -z "$group" || chgrp $group $dst || exit 1 247 chmod $mode $dst || exit 1 248 } 249} 250 251compare_or_symlink() { 252 (cmp $1 $2 >/dev/null 2>&1 && echo Skipping $2...) || { 253 echo Updating $2... 254 rm -f $tempdir/junk || exit 1 255 dest=`echo $1 | sed ' 256 s;^'$install_root';; 257 s;/\./;/;g 258 s;//*;/;g 259 s;^/;; 260 '` 261 link=`echo $2 | sed ' 262 s;^'$install_root';; 263 s;/\./;/;g 264 s;//*;/;g 265 s;^/;; 266 s;/[^/]*$;/; 267 s;[^/]*/;../;g 268 s;$;'$dest'; 269 '` 270# APPLE: Work around B&I sym link errors 271# ln -s $link $tempdir/junk || exit 1 272# mv -f $tempdir/junk $2 || { 273# echo $0: Error: your mv command has trouble renaming symlinks. 1>&2 274# echo If you run Linux, upgrade to GNU fileutils-4.0 or better, 1>&2 275# echo or choose a tempdir that is in the same file system as $2. 1>&2 276# echo If you run FreeBSD, upgrade to version 5 or better. 1>&2 277# exit 1 278# } 279 } 280} 281 282compare_or_hardlink() { 283 (cmp $1 $2 >/dev/null 2>&1 && echo Skipping $2...) || { 284 echo Updating $2... 285 rm -f $2 || exit 1 286# APPLE: Work around B&I link errors 287# ln $1 $2 || exit 1 288 cp $1 $2 289 } 290} 291 292check_parent() { 293 for path 294 do 295 dir=`echo $path|sed -e 's/[/][/]*[^/]*$//' -e 's/^$/\//'` 296 test -d $dir || mkdir -p $dir || exit 1 297 done 298} 299 300# How to supress newlines in echo. 301 302case `echo -n` in 303"") n=-n; c=;; 304 *) n=; c='\c';; 305esac 306 307# Prompts. 308 309install_root_prompt="the prefix for installed file names. Specify 310this ONLY if you are building ready-to-install packages for 311distribution to OTHER machines. See PACKAGE_README for instructions." 312 313tempdir_prompt="a directory for scratch files while installing 314Postfix. You must have write permission in this directory." 315 316config_directory_prompt="the final destination directory for 317installed Postfix configuration files." 318 319data_directory_prompt="the final destination directory for 320Postfix-writable data files such as caches or random numbers. This 321directory should not be shared with non-Postfix software." 322 323daemon_directory_prompt="the final destination directory for 324installed Postfix daemon programs. This directory should not be 325in the command search path of any users." 326 327command_directory_prompt="the final destination directory for 328installed Postfix administrative commands. This directory should 329be in the command search path of adminstrative users." 330 331queue_directory_prompt="the final destination directory for Postfix 332queues." 333 334sendmail_path_prompt="the final destination pathname for the 335installed Postfix sendmail command. This is the Sendmail-compatible 336mail posting interface." 337 338newaliases_path_prompt="the final destination pathname for the 339installed Postfix newaliases command. This is the Sendmail-compatible 340command to build alias databases for the Postfix local delivery 341agent." 342 343mailq_path_prompt="the final destination pathname for the installed 344Postfix mailq command. This is the Sendmail-compatible mail queue 345listing command." 346 347mail_owner_prompt="the owner of the Postfix queue. Specify an 348account with numerical user ID and group ID values that are not 349used by any other accounts on the system." 350 351setgid_group_prompt="the group for mail submission and for queue 352management commands. Specify a group name with a numerical group 353ID that is not shared with other accounts, not even with the Postfix 354mail_owner account. You can no longer specify \"no\" here." 355 356manpage_directory_prompt="the destination directory for the Postfix on-line 357manual pages. You can no longer specify \"no\" here." 358 359readme_directory_prompt="the destination directory for the Postfix 360README files. Specify \"no\" if you do not want to install these files." 361 362html_directory_prompt="the destination directory for the Postfix 363HTML files. Specify \"no\" if you do not want to install these files." 364 365# Default settings, just to get started. 366 367: ${install_root=/} 368: ${tempdir=`pwd`} 369: ${config_directory=`bin/postconf -c conf -h -d config_directory`} 370 371# Find out the location of installed configuration files. 372 373test -z "$non_interactive" && for name in install_root tempdir config_directory 374do 375 while : 376 do 377 echo 378 eval echo Please specify \$${name}_prompt | ${FMT} 379 eval echo \$n "$name: [\$$name]\ \$c" 380 read ans 381 case $ans in 382 "") break;; 383 *) case $ans in 384 /*) eval $name=$ans; break;; 385 *) echo; echo $0: Error: $name should be an absolute path name. 1>&2;; 386 esac;; 387 esac 388 done 389done 390 391# In case some systems special-case pathnames beginning with //. 392 393case $install_root in 394/) install_root= 395esac 396 397test -z "$need_install_root" || test -n "$install_root" || { 398 echo $0: Error: invalid package root directory: \"install_root=/\" 1>&2 399 exit 1 400} 401 402CONFIG_DIRECTORY=$install_root$config_directory 403 404# If a parameter is not set via the command line or environment, 405# try to use settings from installed configuration files. 406 407# Extract parameter settings from the obsolete install.cf file, as 408# a transitional aid. 409 410grep setgid_group $CONFIG_DIRECTORY/main.cf >/dev/null 2>&1 || { 411 test -f $CONFIG_DIRECTORY/install.cf && { 412 for name in sendmail_path newaliases_path mailq_path setgid manpages 413 do 414 eval junk=\$$name 415 case "$junk" in 416 "") eval unset $name;; 417 esac 418 eval : \${$name="\`. $CONFIG_DIRECTORY/install.cf; echo \$$name\`"} \ 419 || exit 1 420 done 421 : ${setgid_group=$setgid} 422 : ${manpage_directory=$manpages} 423 } 424} 425 426CONFIG_PARAMS="command_directory daemon_directory data_directory \ 427html_directory mail_owner mailq_path manpage_directory newaliases_path \ 428queue_directory readme_directory sendmail_path setgid_group" 429 430# Extract parameter settings from the installed main.cf file. 431 432test -f $CONFIG_DIRECTORY/main.cf && { 433 for name in $CONFIG_PARAMS sample_directory 434 do 435 eval junk=\$$name 436 case "$junk" in 437 "") eval unset $name;; 438 esac 439 eval : \${$name=\`bin/postconf -c $CONFIG_DIRECTORY -h $name\`} || 440 exit 1 441 done 442} 443 444# Use built-in defaults as the final source of parameter settings. 445 446for name in $CONFIG_PARAMS sample_directory 447do 448 eval junk=\$$name 449 case "$junk" in 450 "") eval unset $name;; 451 esac 452 eval : \${$name=\`bin/postconf -c conf -d -h $name\`} || exit 1 453done 454 455# Override settings manually. 456 457test -z "$non_interactive" && for name in $CONFIG_PARAMS 458do 459 while : 460 do 461 echo 462 eval echo Please specify \$${name}_prompt | ${FMT} 463 eval echo \$n "$name: [\$$name]\ \$c" 464 read ans 465 case $ans in 466 "") break;; 467 *) eval $name=$ans; break;; 468 esac 469 done 470done 471 472# Sanity checks 473 474case "$setgid_group" in 475 no) (echo $0: Error: the setgid_group parameter no longer accepts 476 echo \"no\" values. Try again with \"setgid_group=groupname\" on the 477 echo command line or execute \"make install\" and specify setgid_group 478 echo interactively.) | ${FMT} 1>&2 479 exit 1;; 480esac 481 482case "$manpage_directory" in 483 no) (echo $0: Error: the manpage_directory parameter no longer accepts 484 echo \"no\" values. Try again with \"manpage_directory=/path/name\" 485 echo on the command line or execute \"make install\" and specify 486 echo manpage_directory interactively.) | ${FMT} 1>&2 487 exit 1;; 488esac 489 490for path in "$html_directory" "$readme_directory" 491do 492 case "$path" in 493 /*) ;; 494 no) ;; 495 *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2 496 exit 1;; 497 esac 498done 499 500for path in "$daemon_directory" "$data_directory" "$command_directory" "$queue_directory" \ 501 "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory" 502do 503 case "$path" in 504 /*) ;; 505 *) echo $0: Error: \"$path\" should be an absolute path name. 1>&2; exit 1;; 506 esac 507done 508 509for path in mailq_path newaliases_path sendmail_path 510do 511 eval test -d $install_root\$$path && { 512 echo $0: Error: \"$path\" specifies a directory. 1>&2 513 exit 1 514 } 515done 516 517for path in command_directory config_directory daemon_directory data_directory \ 518 manpage_directory queue_directory html_directory readme_directory 519do 520 eval test -f $install_root\$$path && { 521 echo $0: Error: \"$path\" specifies a regular file. 1>&2 522 exit 1 523 } 524done 525 526test -d $tempdir || mkdir -p $tempdir || exit 1 527 528trap "rm -f $tempdir/junk" 0 1 2 3 15 529 530( rm -f $tempdir/junk && touch $tempdir/junk ) || { 531 echo $0: Error: you have no write permission to $tempdir. 1>&2 532 echo Specify an alternative directory for scratch files. 1>&2 533 exit 1 534} 535 536test -z "$install_root" && { 537 538 chown root $tempdir/junk >/dev/null 2>&1 || { 539 echo Error: you have no permission to change file ownership. 1>&2 540 exit 1 541 } 542 543 chown "$mail_owner" $tempdir/junk >/dev/null 2>&1 || { 544 echo $0: Error: \"$mail_owner\" needs an entry in the passwd file. 1>&2 545 echo Remember, \"$mail_owner\" needs a dedicated user and group id. 1>&2 546 exit 1 547 } 548 549 chgrp "$setgid_group" $tempdir/junk >/dev/null 2>&1 || { 550 echo $0: Error: \"$setgid_group\" needs an entry in the group file. 1>&2 551 echo Remember, \"$setgid_group\" needs a dedicated group id. 1>&2 552 exit 1 553 } 554 555} 556 557rm -f $tempdir/junk || exit 1 558 559trap 0 1 2 3 15 560 561# Avoid clumsiness. 562 563DAEMON_DIRECTORY=$install_root$daemon_directory 564COMMAND_DIRECTORY=$install_root$command_directory 565QUEUE_DIRECTORY=$install_root$queue_directory 566SENDMAIL_PATH=$install_root$sendmail_path 567HTML_DIRECTORY=$install_root$html_directory 568MANPAGE_DIRECTORY=$install_root$manpage_directory 569README_DIRECTORY=$install_root$readme_directory 570 571# Avoid repeated tests for existence of these; default permissions suffice. 572 573test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1 574test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1 575test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1 576test "$html_directory" = "no" -o -d $HTML_DIRECTORY || 577 mkdir -p $HTML_DIRECTORY || exit 1 578test "$readme_directory" = "no" -o -d $README_DIRECTORY || 579 mkdir -p $README_DIRECTORY || exit 1 580 581# Upgrade or first-time installation? 582 583if [ -f $CONFIG_DIRECTORY/main.cf ] 584then 585 post_install_options="upgrade-source" 586else 587 post_install_options="first-install" 588fi 589 590# Install files, using information from the postfix-files file. 591 592exec < libexec/postfix-files || exit 1 593while IFS=: read path type owner group mode flags junk 594do 595 IFS="$BACKUP_IFS" 596 597 # Skip comments. 598 599 case $path in 600 [$]*) ;; 601 *) continue;; 602 esac 603 604 # Skip over files that ought to be removed. 605 # Leave it up to post-install to report them to the user. 606 607 case $flags in 608 *o*) continue 609 esac 610 611 # Skip over files that must be preserved. 612 613 case $flags in 614 *p*) eval test -f $install_root$path && { 615 eval echo "Skipping $install_root$path..." 616 continue 617 };; 618 esac 619 620 # Save source path before it is clobbered. 621 622 case $type in 623 [hl]) eval source=$owner;; 624 esac 625 626 # If installing from source code, apply special permissions or ownership. 627 # If building a package, don't apply special permissions or ownership. 628 629 case $install_root in 630 "") case $owner in 631 [$]*) eval owner=$owner;; 632 root) owner=;; 633 esac 634 case $group in 635 [$]*) eval group=$group;; 636 -) group=;; 637 esac;; 638 *) case $mode in 639 [1-7]755) mode=755;; 640 esac 641 owner= 642 group=;; 643 esac 644 645 646 case $type in 647 648 # Create/update directory. 649 650 d) eval path=$install_root$path 651 test "$path" = "${install_root}no" -o -d $path || { 652 mkdir -p $path || exit 1 653 test -z "$owner" || chown $owner $path || exit 1 654 test -z "$group" || chgrp $group $path || exit 1 655 chmod $mode $path || exit 1 656 } 657 continue;; 658 659 # Create/update regular file. 660 661 f) echo $path | (IFS=/ read prefix file; IFS="$BACKUP_IFS" 662 case $prefix in 663 '$daemon_directory') 664 compare_or_replace $mode "$owner" "$group" libexec/$file \ 665 $DAEMON_DIRECTORY/$file || exit 1;; 666 '$command_directory') 667 compare_or_replace $mode "$owner" "$group" bin/$file \ 668 $COMMAND_DIRECTORY/$file || exit 1;; 669 '$config_directory') 670 compare_or_replace $mode "$owner" "$group" conf/$file \ 671 $CONFIG_DIRECTORY/$file || exit 1;; 672 '$sendmail_path') 673 check_parent $SENDMAIL_PATH || exit 1 674 compare_or_replace $mode "$owner" "$group" bin/sendmail \ 675 $SENDMAIL_PATH || exit 1;; 676 '$html_directory') 677 test "$html_directory" = "no" || 678 compare_or_replace $mode "$owner" "$group" html/$file \ 679 $HTML_DIRECTORY/$file || exit 1;; 680 '$manpage_directory') 681 check_parent $MANPAGE_DIRECTORY/$file || exit 1 682 compare_or_replace $mode "$owner" "$group" man/$file \ 683 $MANPAGE_DIRECTORY/$file || exit 1;; 684 '$readme_directory') 685 test "$readme_directory" = "no" || 686 compare_or_replace $mode "$owner" "$group" README_FILES/$file \ 687 $README_DIRECTORY/$file || exit 1;; 688 *) echo $0: Error: unknown entry $path in libexec/postfix-files 1>&2 689 exit 1;; 690 esac) || exit 1 691 continue;; 692 693 # Hard link. Skip files that are not installed. 694 695 h) eval echo $path | ( 696 IFS=/ read prefix file; IFS="$BACKUP_IFS" 697 test "$prefix" = "no" || ( 698 eval dest_path=$install_root$path 699 check_parent $dest_path || exit 1 700 eval source_path=$install_root$source 701 compare_or_hardlink $source_path $dest_path || exit 1 702 ) 703 ) || exit 1 704 continue;; 705 706 # Symbolic link. Skip files that are not installed. 707 708 l) eval echo $path | ( 709 IFS=/ read prefix file; IFS="$BACKUP_IFS" 710 test "$prefix" = "no" || ( 711 eval dest_path=$install_root$path 712 check_parent $dest_path || exit 1 713 eval source_path=$install_root$source 714 compare_or_symlink $source_path $dest_path || exit 1 715 ) 716 ) || exit 1 717 continue;; 718 719 *) echo $0: Error: unknown type $type for $path in libexec/postfix-files 1>&2 720 exit 1;; 721 esac 722 723 done 724 725# Save the installation parameters to main.cf even when they haven't 726# changed from their current default. Defaults can change between 727# Postfix releases, and software should not suddenly be installed in 728# the wrong place when Postfix is being upgraded. 729 730bin/postconf -c $CONFIG_DIRECTORY -e \ 731 "daemon_directory = $daemon_directory" \ 732 "data_directory = $data_directory" \ 733 "command_directory = $command_directory" \ 734 "queue_directory = $queue_directory" \ 735 "mail_owner = $mail_owner" \ 736 "setgid_group = $setgid_group" \ 737 "sendmail_path = $sendmail_path" \ 738 "mailq_path = $mailq_path" \ 739 "newaliases_path = $newaliases_path" \ 740 "html_directory = $html_directory" \ 741 "manpage_directory = $manpage_directory" \ 742 "sample_directory = $sample_directory" \ 743 "readme_directory = $readme_directory" \ 744|| exit 1 745 746# If Postfix is being installed locally from source code, do the 747# post-install processing now. 748 749test -n "$install_root" || { 750 bin/postfix post-install $post_install_options || exit 1 751} 752