3 # To view the formatted manual page of this file, type:
4 # POSTFIXSOURCE/mantools/srctoman - post-install | nroff -man
10 # Postfix post-installation script
12 # postfix post-install [name=value] command ...
14 # The post-install script performs the finishing touch of a Postfix
15 # installation, after the executable programs and configuration
16 # files are installed. Usage is one of the following:
18 # While installing Postfix from source code on the local machine, the
19 # script is run by the postfix-install script to update selected file
20 # or directory permissions and to update Postfix configuration files.
22 # While installing Postfix from a pre-built package, the script is run
23 # by the package management procedure to set all file or directory
24 # permissions and to update Postfix configuration files.
26 # The script can be used to change installation parameter settings such
27 # as mail_owner or setgid_group after Postfix is already installed.
29 # The script can be used to upgrade configuration files and to upgrade
30 # file/directory permissions of a secondary Postfix instance.
32 # At Postfix start-up time, the script is run from "postfix check" to
33 # create missing queue directories.
35 # The post-install script is controlled by installation parameters.
36 # Specific parameters are described at the end of this document.
37 # All installation parameters must be specified ahead of time via
38 # one of the methods described below.
42 # Create missing queue directories with ownerships and permissions
43 # according to the contents of $meta_directory/postfix-files
44 # and optionally in $meta_directory/postfix-files.d/*, using
45 # the mail_owner and setgid_group parameter settings from the
46 # command line, process environment or from the installed
49 # This is required at Postfix start-up time.
51 # Set all file/directory ownerships and permissions according to the
52 # contents of $meta_directory/postfix-files and optionally
53 # in $meta_directory/postfix-files.d/*, using the mail_owner
54 # and setgid_group parameter settings from the command line,
55 # process environment or from the installed main.cf file.
56 # Implies create-missing.
58 # This is required when installing Postfix from a pre-built package,
59 # or when changing the mail_owner or setgid_group installation parameter
60 # settings after Postfix is already installed.
61 # .IP upgrade-permissions
62 # Update ownership and permission of existing files/directories as
63 # specified in $meta_directory/postfix-files and optionally
64 # in $meta_directory/postfix-files.d/*, using the mail_owner
65 # and setgid_group parameter settings from the command line,
66 # process environment or from the installed main.cf file.
67 # Implies create-missing.
69 # This is required when upgrading an existing Postfix instance.
70 # .IP upgrade-configuration
71 # Edit the installed main.cf and master.cf files, in order to account
72 # for missing services and to fix deprecated parameter settings.
74 # This is required when upgrading an existing Postfix instance.
76 # Short-hand for: upgrade-permissions upgrade-configuration.
78 # This is recommended when upgrading Postfix from source code.
80 # Short-hand for: set-permissions upgrade-configuration.
82 # This is recommended when upgrading Postfix from a pre-built package.
83 # .IP first-install-reminder
84 # Remind the user that they still need to configure main.cf and the
85 # aliases file, and that newaliases still needs to be run.
87 # This is recommended when Postfix is installed for the first time.
88 # MULTIPLE POSTFIX INSTANCES
91 # Multiple Postfix instances on the same machine can share command and
92 # daemon program files but must have separate configuration and queue
95 # To create a secondary Postfix installation on the same machine,
96 # copy the configuration files from the primary Postfix instance to
97 # a secondary configuration directory and execute:
99 # postfix post-install config_directory=secondary-config-directory \e
101 # queue_directory=secondary-queue-directory \e
105 # This creates secondary Postfix queue directories, sets their access
106 # permissions, and saves the specified installation parameters to the
107 # secondary main.cf file.
109 # Be sure to list the secondary configuration directory in the
110 # alternate_config_directories parameter in the primary main.cf file.
112 # To upgrade a secondary Postfix installation on the same machine,
115 # postfix post-install config_directory=secondary-config-directory \e
117 # upgrade-permissions upgrade-configuration
118 # INSTALLATION PARAMETER INPUT METHODS
121 # Parameter settings can be specified through a variety of
122 # mechanisms. In order of decreasing precedence these are:
124 # Parameter settings can be given as name=value arguments on
125 # the post-install command line. These have the highest precedence.
126 # Settings that override the installed main.cf file are saved.
127 # .IP "process environment"
128 # Parameter settings can be given as name=value environment
130 # Settings that override the installed main.cf file are saved.
131 # .IP "installed configuration files"
132 # If a parameter is not specified via the command line or via the
133 # process environment, post-install will attempt to extract its
134 # value from the already installed Postfix main.cf configuration file.
135 # These settings have the lowest precedence.
136 # INSTALLATION PARAMETER DESCRIPTION
139 # The description of installation parameters is as follows:
140 # .IP config_directory
141 # The directory for Postfix configuration files.
142 # .IP daemon_directory
143 # The directory for Postfix daemon programs. This directory
144 # should not be in the command search path of any users.
145 # .IP command_directory
146 # The directory for Postfix administrative commands. This
147 # directory should be in the command search path of adminstrative users.
148 # .IP queue_directory
149 # The directory for Postfix queues.
151 # The directory for Postfix writable data files (caches, etc.).
153 # The full pathname for the Postfix sendmail command.
154 # This is the Sendmail-compatible mail posting interface.
155 # .IP newaliases_path
156 # The full pathname for the Postfix newaliases command.
157 # This is the Sendmail-compatible command to build alias databases
158 # for the Postfix local delivery agent.
160 # The full pathname for the Postfix mailq command.
161 # This is the Sendmail-compatible command to list the mail queue.
163 # The owner of the Postfix queue. Its numerical user ID and group ID
164 # must not be used by any other accounts on the system.
166 # The group for mail submission and for queue management commands.
167 # Its numerical group ID must not be used by any other accounts on the
168 # system, not even by the mail_owner account.
170 # The directory for the Postfix HTML files.
171 # .IP manpage_directory
172 # The directory for the Postfix on-line manual pages.
173 # .IP sample_directory
174 # The directory for the Postfix sample configuration files.
175 # This feature is obsolete as of Postfix 2.1.
176 # .IP readme_directory
177 # The directory for the Postfix README files.
178 # .IP shlib_directory
179 # The directory for the Postfix shared-library files, and for
180 # the Postfix dabatase plugin files with a relative pathname
181 # in the file dynamicmaps.cf.
183 # The directory for non-executable files that are shared
184 # among multiple Postfix instances, such as postfix-files,
185 # dynamicmaps.cf, as well as the multi-instance template files
186 # main.cf.proto and master.cf.proto.
188 # postfix-install(1) Postfix primary installation script.
190 # $config_directory/main.cf, Postfix installation parameters.
191 # $meta_directory/postfix-files, installation control file.
192 # $meta_directory/postfix-files.d/*, optional control files.
193 # $config_directory/install.cf, obsolete configuration file.
197 # The Secure Mailer license must be distributed with this software.
200 # IBM T.J. Watson Research
202 # Yorktown Heights, NY 10598, USA
207 PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc:/usr/contrib/bin:/usr/gnu/bin:/usr/ucb:/usr/bsd
214 MOST_PARAMETERS="command_directory daemon_directory data_directory
215 html_directory mail_owner mailq_path manpage_directory
216 newaliases_path queue_directory readme_directory sample_directory
217 sendmail_path setgid_group shlib_directory meta_directory"
218 NON_SHARED="config_directory queue_directory data_directory"
220 USAGE="Usage: $0 [name=value] command
221 create-missing Create missing queue directories.
222 upgrade-source When installing or upgrading from source code.
223 upgrade-package When installing or upgrading from pre-built package.
224 first-install-reminder Remind of mandatory first-time configuration steps.
225 name=value Specify an installation parameter".
227 # Process command-line options and parameter settings. Work around
228 # brain damaged shells. "IFS=value command" should not make the
229 # IFS=value setting permanent. But some broken standard allows it.
231 create=; set_perms=; upgrade_perms=; upgrade_conf=; first_install_reminder=
232 obsolete=; keep_list=;
237 *[" "]*) echo $0: "Error: argument contains whitespace: '$arg'"
239 *=*) IFS= eval $arg; IFS="$BACKUP_IFS";;
240 create-missing) create=1;;
241 set-perm*) create=1; set_perms=1;;
242 upgrade-perm*) create=1; upgrade_perms=1;;
243 upgrade-conf*) upgrade_conf=1;;
244 upgrade-source) create=1; upgrade_conf=1; upgrade_perms=1;;
245 upgrade-package) create=1; upgrade_conf=1; set_perms=1;;
246 first-install*) first_install_reminder=1;;
247 *) echo "$0: Error: $USAGE" 1>&2; exit 1;;
254 test -n "$create$upgrade_conf$first_install_reminder" || {
255 echo "$0: Error: $USAGE" 1>&2
259 # Bootstrapping problem.
261 if [ -n "$command_directory" ]
263 POSTCONF="$command_directory/postconf"
268 $POSTCONF -d mail_version >/dev/null 2>/dev/null || {
269 echo $0: Error: no $POSTCONF command found. 1>&2
270 echo Re-run this command as $0 command_directory=/some/where. 1>&2
274 # Also used to require license etc. files only in the default instance.
276 def_config_directory=`$POSTCONF -d -h config_directory` || exit 1
277 test -n "$config_directory" ||
278 config_directory="$def_config_directory"
280 test -d "$config_directory" || {
281 echo $0: Error: $config_directory is not a directory. 1>&2
285 # If this is a secondary instance, don't touch shared files.
286 # XXX Solaris does not have "test -e".
288 instances=`test ! -f $def_config_directory/main.cf ||
289 $POSTCONF -c $def_config_directory -h multi_instance_directories |
290 sed 's/,/ /'` || exit 1
292 update_shared_files=1
293 for name in $instances
296 "$def_config_directory") ;;
297 "$config_directory") update_shared_files=; break;;
301 test -f $meta_directory/postfix-files || {
302 echo $0: Error: $meta_directory/postfix-files is not a file. 1>&2
306 # SunOS5 fmt(1) truncates lines > 1000 characters.
311 /^\( *\)\([^ ][^ ]*\) */{
323 SunOS*) FMT=fake_fmt;;
327 # If a parameter is not set via the command line or environment,
328 # try to use settings from installed configuration files.
330 # Extract parameter settings from the obsolete install.cf file, as
331 # a transitional aid.
333 grep setgid_group $config_directory/main.cf >/dev/null 2>&1 || {
334 test -f $config_directory/install.cf && {
335 for name in sendmail_path newaliases_path mailq_path setgid manpages
339 "") eval unset $name;;
341 eval : \${$name="\`. $config_directory/install.cf; echo \$$name\`"} \
344 : ${setgid_group=$setgid}
345 : ${manpage_directory=$manpages}
349 # Extract parameter settings from the installed main.cf file.
351 test -f $config_directory/main.cf && {
352 for name in $MOST_PARAMETERS
356 "") eval unset $name;;
358 eval : \${$name=\`$POSTCONF -c $config_directory -h $name\`} || exit 1
364 case $manpage_directory in
365 no) echo $0: Error: manpage_directory no longer accepts \"no\" values. 1>&2
366 echo Try again with \"$0 manpage_directory=/pathname ...\". 1>&2; exit 1;;
369 case $setgid_group in
370 no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
371 echo Try again with \"$0 setgid_group=groupname ...\" 1>&2; exit 1;;
374 for path in "$daemon_directory" "$command_directory" "$queue_directory" \
375 "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory" \
380 *) echo $0: Error: \"$path\" should be an absolute path name. 1>&2; exit 1;;
384 for path in "$html_directory" "$readme_directory" "$shlib_directory"
389 *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2; exit 1;;
393 # Find out what parameters were not specified via command line,
394 # via environment, or via installed configuration files.
397 for name in $MOST_PARAMETERS
399 eval test -n \"\$$name\" || missing="$missing $name"
402 # All parameters must be specified at this point.
404 test -n "$non_interactive" -a -n "$missing" && {
405 cat <<EOF | ${FMT} 1>&2
406 $0: Error: some required installation parameters are not defined.
408 - Either the parameters need to be given in the $config_directory/main.cf
409 file from a recent Postfix installation,
411 - Or the parameters need to be specified through the process
414 - Or the parameters need to be specified as name=value arguments
415 on the $0 command line,
417 The following parameters were missing:
425 POSTCONF="$command_directory/postconf"
427 # Save settings, allowing command line/environment override.
429 # Undo MAIL_VERSION expansion at the end of a parameter value. If
430 # someone really wants the expanded mail version in main.cf, then
433 # Confine side effects from mail_version unexpansion within a subshell.
435 (case "$mail_version" in
436 "") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
439 for name in $MOST_PARAMETERS
445 "") pattern=`echo "$mail_version" | sed 's/\./\\\\./g'` || exit 1
447 val=`echo "$junk" | sed "s/$pattern"'$/${mail_version}/g'` || exit 1
448 eval ${name}='"$val"'
452 # XXX Maybe update main.cf only with first install, upgrade, set
453 # permissions, and what else? Should there be a warning otherwise?
456 for name in $MOST_PARAMETERS
458 eval junk=\"\$$name\"
459 test "$junk" = "`$POSTCONF -c $config_directory -h $name`" || {
465 test -n "$override" && {
466 $POSTCONF -c $config_directory -e \
467 "daemon_directory = $daemon_directory" \
468 "command_directory = $command_directory" \
469 "queue_directory = $queue_directory" \
470 "data_directory = $data_directory" \
471 "mail_owner = $mail_owner" \
472 "setgid_group = $setgid_group" \
473 "sendmail_path = $sendmail_path" \
474 "mailq_path = $mailq_path" \
475 "newaliases_path = $newaliases_path" \
476 "html_directory = $html_directory" \
477 "manpage_directory = $manpage_directory" \
478 "sample_directory = $sample_directory" \
479 "readme_directory = $readme_directory" \
480 "shlib_directory = $shlib_directory" \
481 "meta_directory = $meta_directory" \
483 } || exit 0) || exit 1
485 # Use file/directory status information in $meta_directory/postfix-files.
487 test -n "$create" && {
488 postfix_files_d=$meta_directory/postfix-files.d
489 for postfix_file in $meta_directory/postfix-files \
490 `test -d $postfix_files_d && { find $postfix_files_d -type f | sort; }`
492 exec <$postfix_file || exit 1
493 while IFS=: read path type owner group mode flags junk
497 # Skip comments. Skip shared files, if updating a secondary instance.
499 [$]*) case "$update_shared_files" in
500 1) $debug keep non-shared or shared $path;;
502 for name in $NON_SHARED
505 "\$$name"*) non_shared=1; break;;
508 case "$non_shared" in
509 1) $debug keep non-shared $path;;
510 *) $debug skip shared $path; continue;;
515 # Skip hard links and symbolic links.
519 *) echo unknown type $type for $path in $postfix_file 1>&2; exit 1;;
521 # Expand $name, and canonicalize null fields.
522 for name in path owner group flags
526 [$]*) eval $name=$junk;;
531 # Skip uninstalled files.
536 case $flags in *u*) upgrade_flag=1;; *) upgrade_flag=;; esac
537 case $flags in *c*) create_flag=1;; *) create_flag=;; esac
538 case $flags in *r*) recursive="-R";; *) recursive=;; esac
539 case $flags in *o*) obsolete_flag=1;; *) obsolete_flag=;; esac
540 case $flags in *[1i]*) test ! -r "$path" -a "$config_directory" != \
541 "$def_config_directory" && continue;; esac
542 # Flag obsolete objects. XXX Solaris 2..9 does not have "test -e".
543 if [ -n "$obsolete_flag" ]
545 test -r $path -a "$type" != "d" && obsolete="$obsolete $path"
548 keep_list="$keep_list $path"
550 # Create missing directories with proper owner/group/mode settings.
551 if [ -n "$create" -a "$type" = "d" -a -n "$create_flag" -a ! -d "$path" ]
553 mkdir $path || exit 1
555 # Update all owner/group/mode settings.
556 elif [ -n "$set_perms" ]
559 # Update obsolete owner/group/mode settings.
560 elif [ -n "$upgrade_perms" -a -n "$upgrade_flag" ]
564 test -n "$set_permission" && {
565 chown $recursive $owner $path || exit 1
566 test -z "$group" || chgrp $recursive $group $path || exit 1
567 # Don't "chmod -R"; queue file status is encoded in mode bits.
568 if [ "$type" = "d" -a -n "$recursive" ]
570 find $path -type d -exec chmod $mode "{}" ";"
580 # Upgrade existing Postfix configuration files if necessary.
582 test -n "$upgrade_conf" && {
585 # Add missing relay service to master.cf.
587 grep '^relay' $config_directory/master.cf >/dev/null || {
588 echo Editing $config_directory/master.cf, adding missing entry for relay service
589 cat >>$config_directory/master.cf <<EOF || exit 1
590 relay unix - - n - - smtp
595 # Add missing flush service to master.cf.
597 grep '^flush.*flush' $config_directory/master.cf >/dev/null || {
598 echo Editing $config_directory/master.cf, adding missing entry for flush service
599 cat >>$config_directory/master.cf <<EOF || exit 1
600 flush unix - - n 1000? 0 flush
605 # Add missing trace service to master.cf.
607 grep 'trace.*bounce' $config_directory/master.cf >/dev/null || {
608 echo Editing $config_directory/master.cf, adding missing entry for trace service
609 cat >>$config_directory/master.cf <<EOF || exit 1
610 trace unix - - n - 0 bounce
615 # Add missing verify service to master.cf.
617 grep '^verify.*verify' $config_directory/master.cf >/dev/null || {
618 echo Editing $config_directory/master.cf, adding missing entry for verify service
619 cat >>$config_directory/master.cf <<EOF || exit 1
620 verify unix - - n - 1 verify
625 # Fix verify service process limit.
627 grep '^verify.*[ ]0[ ]*verify' \
628 $config_directory/master.cf >/dev/null && {
629 echo Editing $config_directory/master.cf, setting verify process limit to 1
630 ed $config_directory/master.cf <<EOF || exit 1
631 /^verify.*[ ]0[ ]*verify/
632 s/\([ ]\)0\([ ]\)/\11\2/
640 # Change privileged pickup service into unprivileged.
642 grep "^pickup[ ]*fifo[ ]*n[ ]*n" \
643 $config_directory/master.cf >/dev/null && {
644 echo Editing $config_directory/master.cf, making the pickup service unprivileged
645 ed $config_directory/master.cf <<EOF || exit 1
646 /^pickup[ ]*fifo[ ]*n[ ]*n/
655 # Change private cleanup and flush services into public.
657 for name in cleanup flush
659 grep "^$name[ ]*unix[ ]*[-y]" \
660 $config_directory/master.cf >/dev/null && {
661 echo Editing $config_directory/master.cf, making the $name service public
662 ed $config_directory/master.cf <<EOF || exit 1
663 /^$name[ ]*unix[ ]*[-y]/
673 # File systems have improved since Postfix came out, and all we
674 # require now is that defer and deferred are hashed because those
675 # can contain lots of files.
677 found=`$POSTCONF -c $config_directory -h hash_queue_names`
679 (echo "$found" | grep defer >/dev/null) || missing="$missing defer"
680 (echo "$found" | grep deferred>/dev/null)|| missing="$missing deferred"
681 test -n "$missing" && {
682 echo fixing main.cf hash_queue_names for missing $missing
683 $POSTCONF -c $config_directory -e hash_queue_names="$found$missing" ||
687 # Turn on safety nets for new features that could bounce mail that
688 # would be accepted by a previous Postfix version.
690 # [The "unknown_local_recipient_reject_code = 450" safety net,
691 # introduced with Postfix 2.0 and deleted after Postfix 2.3.]
694 # Add missing proxymap service to master.cf.
696 grep '^proxymap.*proxymap' $config_directory/master.cf >/dev/null || {
697 echo Editing $config_directory/master.cf, adding missing entry for proxymap service
698 cat >>$config_directory/master.cf <<EOF || exit 1
699 proxymap unix - - n - - proxymap
704 # Add missing anvil service to master.cf.
706 grep '^anvil.*anvil' $config_directory/master.cf >/dev/null || {
707 echo Editing $config_directory/master.cf, adding missing entry for anvil service
708 cat >>$config_directory/master.cf <<EOF || exit 1
709 anvil unix - - n - 1 anvil
714 # Add missing scache service to master.cf.
716 grep '^scache.*scache' $config_directory/master.cf >/dev/null || {
717 echo Editing $config_directory/master.cf, adding missing entry for scache service
718 cat >>$config_directory/master.cf <<EOF || exit 1
719 scache unix - - n - 1 scache
724 # Add missing discard service to master.cf.
726 grep '^discard.*discard' $config_directory/master.cf >/dev/null || {
727 echo Editing $config_directory/master.cf, adding missing entry for discard service
728 cat >>$config_directory/master.cf <<EOF || exit 1
729 discard unix - - n - - discard
734 # Update the tlsmgr fifo->unix service.
736 grep "^tlsmgr[ ]*fifo[ ]" \
737 $config_directory/master.cf >/dev/null && {
738 echo Editing $config_directory/master.cf, updating the tlsmgr from fifo to unix service
739 ed $config_directory/master.cf <<EOF || exit 1
750 # Add missing tlsmgr service to master.cf.
752 grep '^tlsmgr.*tlsmgr' $config_directory/master.cf >/dev/null || {
753 echo Editing $config_directory/master.cf, adding missing entry for tlsmgr service
754 cat >>$config_directory/master.cf <<EOF || exit 1
755 tlsmgr unix - - n 1000? 1 tlsmgr
760 # Add missing retry service to master.cf.
762 grep '^retry.*error' $config_directory/master.cf >/dev/null || {
763 echo Editing $config_directory/master.cf, adding missing entry for retry service
764 cat >>$config_directory/master.cf <<EOF || exit 1
765 retry unix - - n - - error
770 # Add missing proxywrite service to master.cf.
772 grep '^proxywrite.*proxymap' $config_directory/master.cf >/dev/null || {
773 echo Editing $config_directory/master.cf, adding missing entry for proxywrite service
774 cat >>$config_directory/master.cf <<EOF || exit 1
775 proxywrite unix - - n - 1 proxymap
780 # Fix a typo in the default master.cf proxywrite entry.
782 grep '^proxywrite.*-[ ]*proxymap' $config_directory/master.cf >/dev/null && {
783 echo Editing $config_directory/master.cf, setting proxywrite process limit to 1
784 ed $config_directory/master.cf <<EOF || exit 1
785 /^proxywrite.*-[ ]*proxymap/
786 s/-\([ ]*proxymap\)/1\1/
794 # Add missing postscreen service to master.cf.
796 grep '^#*smtp.*postscreen' $config_directory/master.cf >/dev/null || {
797 echo Editing $config_directory/master.cf, adding missing entry for postscreen TCP service
798 cat >>$config_directory/master.cf <<EOF || exit 1
799 #smtp inet n - n - 1 postscreen
804 # Add missing smtpd (unix-domain) service to master.cf.
806 grep '^#*smtpd.*smtpd' $config_directory/master.cf >/dev/null || {
807 echo Editing $config_directory/master.cf, adding missing entry for smtpd unix-domain service
808 cat >>$config_directory/master.cf <<EOF || exit 1
809 #smtpd pass - - n - - smtpd
814 # Add temporary dnsblog (unix-domain) service to master.cf.
816 grep '^#*dnsblog.*dnsblog' $config_directory/master.cf >/dev/null || {
817 echo Editing $config_directory/master.cf, adding missing entry for dnsblog unix-domain service
818 cat >>$config_directory/master.cf <<EOF || exit 1
819 #dnsblog unix - - n - 0 dnsblog
824 # Add tlsproxy (unix-domain) service to master.cf.
826 grep '^#*tlsproxy.*tlsproxy' $config_directory/master.cf >/dev/null || {
827 echo Editing $config_directory/master.cf, adding missing entry for tlsproxy unix-domain service
828 cat >>$config_directory/master.cf <<EOF || exit 1
829 #tlsproxy unix - - n - 0 tlsproxy
833 # Report (but do not remove) obsolete files.
835 test -n "$obsolete" && {
838 Note: the following files or directories still exist but are
839 no longer part of Postfix:
847 # Safety net for incompatible changes in IPv6 defaults.
848 # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO AVOID AN
849 # UNEXPECTED DROP IN PERFORMANCE AFTER UPGRADING FROM POSTFIX
851 # This code assumes that the default is "inet_protocols = ipv4"
852 # when IPv6 support is not compiled in. See util/sys_defs.h.
854 test "`$POSTCONF -dh inet_protocols`" = "ipv4" ||
855 test -n "`$POSTCONF -c $config_directory -n inet_protocols`" || {
857 COMPATIBILITY: editing $config_directory/main.cf, setting
858 inet_protocols=ipv4. Specify inet_protocols explicitly if you
860 In a future release IPv6 will be enabled by default.
862 $POSTCONF -c $config_directory inet_protocols=ipv4 || exit 1
865 # Disabled because unhelpful down-stream maintainers disable the safety net.
867 # # Safety net for incompatible changes due to the introduction
868 # # of the smtpd_relay_restrictions feature to separate the
869 # # mail relay policy from the spam blocking policy.
870 # # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO PREVENT
871 # # INBOUND MAIL FROM UNEXPECTEDLY BOUNCING AFTER UPGRADING FROM
872 # # POSTFIX BEFORE 2.10.
873 # test -n "`$POSTCONF -c $config_directory -n smtpd_relay_restrictions`" || {
875 # COMPATIBILITY: editing $config_directory/main.cf, overriding
876 # smtpd_relay_restrictions to prevent inbound mail from
877 # unexpectedly bouncing.
878 # Specify an empty smtpd_relay_restrictions value to keep using
879 # smtpd_recipient_restrictions as before.
881 # $POSTCONF -c $config_directory "smtpd_relay_restrictions = \
882 # permit_mynetworks permit_sasl_authenticated \
883 # defer_unauth_destination" || exit 1
887 # A reminder if this is the first time Postfix is being installed.
889 test -n "$first_install_reminder" && {
891 ALIASES=`$POSTCONF -c $config_directory -h alias_database | sed 's/^[^:]*://'`
892 NEWALIASES_PATH=`$POSTCONF -c $config_directory -h newaliases_path`
895 Warning: you still need to edit myorigin/mydestination/mynetworks
896 parameter settings in $config_directory/main.cf.
898 See also http://www.postfix.org/STANDARD_CONFIGURATION_README.html
899 for information about dialup sites or about sites inside a
902 BTW: Check your $ALIASES file and be sure to set up aliases
903 that send mail for root and postmaster to a real person, then
904 run $NEWALIASES_PATH.