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 # New York, NY 10011, USA
212 PATH=/bin:/usr/bin:/usr/sbin:/usr/etc:/sbin:/etc:/usr/contrib/bin:/usr/gnu/bin:/usr/ucb:/usr/bsd
219 MOST_PARAMETERS="command_directory daemon_directory data_directory
220 html_directory mail_owner mailq_path manpage_directory
221 newaliases_path queue_directory readme_directory sample_directory
222 sendmail_path setgid_group shlib_directory meta_directory"
223 NON_SHARED="config_directory queue_directory data_directory"
225 USAGE="Usage: $0 [name=value] command
226 create-missing Create missing queue directories.
227 upgrade-source When installing or upgrading from source code.
228 upgrade-package When installing or upgrading from pre-built package.
229 first-install-reminder Remind of mandatory first-time configuration steps.
230 name=value Specify an installation parameter".
232 # Process command-line options and parameter settings. Work around
233 # brain damaged shells. "IFS=value command" should not make the
234 # IFS=value setting permanent. But some broken standard allows it.
236 create=; set_perms=; upgrade_perms=; upgrade_conf=; first_install_reminder=
237 obsolete=; keep_list=;
242 *[" "]*) echo $0: "Error: argument contains whitespace: '$arg'"
244 *=*) IFS= eval $arg; IFS="$BACKUP_IFS";;
245 create-missing) create=1;;
246 set-perm*) create=1; set_perms=1;;
247 upgrade-perm*) create=1; upgrade_perms=1;;
248 upgrade-conf*) upgrade_conf=1;;
249 upgrade-source) create=1; upgrade_conf=1; upgrade_perms=1;;
250 upgrade-package) create=1; upgrade_conf=1; set_perms=1;;
251 first-install*) first_install_reminder=1;;
252 *) echo "$0: Error: $USAGE" 1>&2; exit 1;;
259 test -n "$create$upgrade_conf$first_install_reminder" || {
260 echo "$0: Error: $USAGE" 1>&2
264 # Bootstrapping problem.
266 if [ -n "$command_directory" ]
268 POSTCONF="$command_directory/postconf"
273 $POSTCONF -d mail_version >/dev/null 2>/dev/null || {
274 echo $0: Error: no $POSTCONF command found. 1>&2
275 echo Re-run this command as $0 command_directory=/some/where. 1>&2
279 # Also used to require license etc. files only in the default instance.
281 def_config_directory=`$POSTCONF -d -h config_directory` || exit 1
282 test -n "$config_directory" ||
283 config_directory="$def_config_directory"
285 test -d "$config_directory" || {
286 echo $0: Error: $config_directory is not a directory. 1>&2
290 # If this is a secondary instance, don't touch shared files.
291 # XXX Solaris does not have "test -e".
293 instances=`test ! -f $def_config_directory/main.cf ||
294 $POSTCONF -c $def_config_directory -h multi_instance_directories |
295 sed 's/,/ /'` || exit 1
297 update_shared_files=1
298 for name in $instances
301 "$def_config_directory") ;;
302 "$config_directory") update_shared_files=; break;;
306 test -f $meta_directory/postfix-files || {
307 echo $0: Error: $meta_directory/postfix-files is not a file. 1>&2
311 # SunOS5 fmt(1) truncates lines > 1000 characters.
316 /^\( *\)\([^ ][^ ]*\) */{
328 SunOS*) FMT=fake_fmt;;
332 # If a parameter is not set via the command line or environment,
333 # try to use settings from installed configuration files.
335 # Extract parameter settings from the obsolete install.cf file, as
336 # a transitional aid.
338 grep setgid_group $config_directory/main.cf >/dev/null 2>&1 || {
339 test -f $config_directory/install.cf && {
340 for name in sendmail_path newaliases_path mailq_path setgid manpages
344 "") eval unset $name;;
346 eval : \${$name="\`. $config_directory/install.cf; echo \$$name\`"} \
349 : ${setgid_group=$setgid}
350 : ${manpage_directory=$manpages}
354 # Extract parameter settings from the installed main.cf file.
356 test -f $config_directory/main.cf && {
357 for name in $MOST_PARAMETERS
361 "") eval unset $name;;
363 eval : \${$name=\`$POSTCONF -c $config_directory -h $name\`} || exit 1
369 case $manpage_directory in
370 no) echo $0: Error: manpage_directory no longer accepts \"no\" values. 1>&2
371 echo Try again with \"$0 manpage_directory=/pathname ...\". 1>&2; exit 1;;
374 case $setgid_group in
375 no) echo $0: Error: setgid_group no longer accepts \"no\" values. 1>&2
376 echo Try again with \"$0 setgid_group=groupname ...\" 1>&2; exit 1;;
379 for path in "$daemon_directory" "$command_directory" "$queue_directory" \
380 "$sendmail_path" "$newaliases_path" "$mailq_path" "$manpage_directory" \
385 *) echo $0: Error: \"$path\" should be an absolute path name. 1>&2; exit 1;;
389 for path in "$html_directory" "$readme_directory" "$shlib_directory"
394 *) echo $0: Error: \"$path\" should be \"no\" or an absolute path name. 1>&2; exit 1;;
398 # Find out what parameters were not specified via command line,
399 # via environment, or via installed configuration files.
402 for name in $MOST_PARAMETERS
404 eval test -n \"\$$name\" || missing="$missing $name"
407 # All parameters must be specified at this point.
409 test -n "$non_interactive" -a -n "$missing" && {
410 cat <<EOF | ${FMT} 1>&2
411 $0: Error: some required installation parameters are not defined.
413 - Either the parameters need to be given in the $config_directory/main.cf
414 file from a recent Postfix installation,
416 - Or the parameters need to be specified through the process
419 - Or the parameters need to be specified as name=value arguments
420 on the $0 command line,
422 The following parameters were missing:
430 POSTCONF="$command_directory/postconf"
432 # Save settings, allowing command line/environment override.
434 # Undo MAIL_VERSION expansion at the end of a parameter value. If
435 # someone really wants the expanded mail version in main.cf, then
438 # Confine side effects from mail_version unexpansion within a subshell.
440 (case "$mail_version" in
441 "") mail_version="`$POSTCONF -dhx mail_version`" || exit 1
444 for name in $MOST_PARAMETERS
450 "") pattern=`echo "$mail_version" | sed 's/\./\\\\./g'` || exit 1
452 val=`echo "$junk" | sed "s/$pattern"'$/${mail_version}/g'` || exit 1
453 eval ${name}='"$val"'
457 # XXX Maybe update main.cf only with first install, upgrade, set
458 # permissions, and what else? Should there be a warning otherwise?
461 for name in $MOST_PARAMETERS
463 eval junk=\"\$$name\"
464 test "$junk" = "`$POSTCONF -c $config_directory -h $name`" || {
470 test -n "$override" && {
471 $POSTCONF -c $config_directory -e \
472 "daemon_directory = $daemon_directory" \
473 "command_directory = $command_directory" \
474 "queue_directory = $queue_directory" \
475 "data_directory = $data_directory" \
476 "mail_owner = $mail_owner" \
477 "setgid_group = $setgid_group" \
478 "sendmail_path = $sendmail_path" \
479 "mailq_path = $mailq_path" \
480 "newaliases_path = $newaliases_path" \
481 "html_directory = $html_directory" \
482 "manpage_directory = $manpage_directory" \
483 "sample_directory = $sample_directory" \
484 "readme_directory = $readme_directory" \
485 "shlib_directory = $shlib_directory" \
486 "meta_directory = $meta_directory" \
488 } || exit 0) || exit 1
490 # Use file/directory status information in $meta_directory/postfix-files.
492 test -n "$create" && {
493 postfix_files_d=$meta_directory/postfix-files.d
494 for postfix_file in $meta_directory/postfix-files \
495 `test -d $postfix_files_d && { find $postfix_files_d -type f | sort; }`
497 exec <$postfix_file || exit 1
498 while IFS=: read path type owner group mode flags junk
502 # Skip comments. Skip shared files, if updating a secondary instance.
504 [$]*) case "$update_shared_files" in
505 1) $debug keep non-shared or shared $path;;
507 for name in $NON_SHARED
510 "\$$name"*) non_shared=1; break;;
513 case "$non_shared" in
514 1) $debug keep non-shared $path;;
515 *) $debug skip shared $path; continue;;
520 # Skip hard links and symbolic links.
524 *) echo unknown type $type for $path in $postfix_file 1>&2; exit 1;;
526 # Expand $name, and canonicalize null fields.
527 for name in path owner group flags
531 [$]*) eval $name=$junk;;
536 # Skip uninstalled files.
541 case $flags in *u*) upgrade_flag=1;; *) upgrade_flag=;; esac
542 case $flags in *c*) create_flag=1;; *) create_flag=;; esac
543 case $flags in *r*) recursive="-R";; *) recursive=;; esac
544 case $flags in *o*) obsolete_flag=1;; *) obsolete_flag=;; esac
545 case $flags in *[1i]*) test ! -r "$path" -a "$config_directory" != \
546 "$def_config_directory" && continue;; esac
547 # Flag obsolete objects. XXX Solaris 2..9 does not have "test -e".
548 if [ -n "$obsolete_flag" ]
550 test -r $path -a "$type" != "d" && obsolete="$obsolete $path"
553 keep_list="$keep_list $path"
555 # Create missing directories with proper owner/group/mode settings.
556 if [ -n "$create" -a "$type" = "d" -a -n "$create_flag" -a ! -d "$path" ]
558 mkdir $path || exit 1
560 # Update all owner/group/mode settings.
561 elif [ -n "$set_perms" ]
564 # Update obsolete owner/group/mode settings.
565 elif [ -n "$upgrade_perms" -a -n "$upgrade_flag" ]
569 test -n "$set_permission" && {
570 chown $recursive $owner $path || exit 1
571 test -z "$group" || chgrp $recursive $group $path || exit 1
572 # Don't "chmod -R"; queue file status is encoded in mode bits.
573 if [ "$type" = "d" -a -n "$recursive" ]
575 find $path -type d -exec chmod $mode "{}" ";"
585 # Upgrade existing Postfix configuration files if necessary.
587 test -n "$upgrade_conf" && {
590 # Add missing relay service to master.cf.
592 grep '^relay' $config_directory/master.cf >/dev/null || {
593 echo Editing $config_directory/master.cf, adding missing entry for relay service
594 cat >>$config_directory/master.cf <<EOF || exit 1
595 relay unix - - n - - smtp
600 # Add missing flush service to master.cf.
602 grep '^flush.*flush' $config_directory/master.cf >/dev/null || {
603 echo Editing $config_directory/master.cf, adding missing entry for flush service
604 cat >>$config_directory/master.cf <<EOF || exit 1
605 flush unix - - n 1000? 0 flush
610 # Add missing trace service to master.cf.
612 grep 'trace.*bounce' $config_directory/master.cf >/dev/null || {
613 echo Editing $config_directory/master.cf, adding missing entry for trace service
614 cat >>$config_directory/master.cf <<EOF || exit 1
615 trace unix - - n - 0 bounce
620 # Add missing verify service to master.cf.
622 grep '^verify.*verify' $config_directory/master.cf >/dev/null || {
623 echo Editing $config_directory/master.cf, adding missing entry for verify service
624 cat >>$config_directory/master.cf <<EOF || exit 1
625 verify unix - - n - 1 verify
630 # Fix verify service process limit.
632 grep '^verify.*[ ]0[ ]*verify' \
633 $config_directory/master.cf >/dev/null && {
634 echo Editing $config_directory/master.cf, setting verify process limit to 1
635 ed $config_directory/master.cf <<EOF || exit 1
636 /^verify.*[ ]0[ ]*verify/
637 s/\([ ]\)0\([ ]\)/\11\2/
645 # Change privileged pickup service into unprivileged.
647 grep "^pickup[ ]*fifo[ ]*n[ ]*n" \
648 $config_directory/master.cf >/dev/null && {
649 echo Editing $config_directory/master.cf, making the pickup service unprivileged
650 ed $config_directory/master.cf <<EOF || exit 1
651 /^pickup[ ]*fifo[ ]*n[ ]*n/
660 # Change private cleanup and flush services into public.
662 for name in cleanup flush
664 grep "^$name[ ]*unix[ ]*[-y]" \
665 $config_directory/master.cf >/dev/null && {
666 echo Editing $config_directory/master.cf, making the $name service public
667 ed $config_directory/master.cf <<EOF || exit 1
668 /^$name[ ]*unix[ ]*[-y]/
678 # File systems have improved since Postfix came out, and all we
679 # require now is that defer and deferred are hashed because those
680 # can contain lots of files.
682 found=`$POSTCONF -c $config_directory -h hash_queue_names`
684 (echo "$found" | grep defer >/dev/null) || missing="$missing defer"
685 (echo "$found" | grep deferred>/dev/null)|| missing="$missing deferred"
686 test -n "$missing" && {
687 echo fixing main.cf hash_queue_names for missing $missing
688 $POSTCONF -c $config_directory -e hash_queue_names="$found$missing" ||
692 # Turn on safety nets for new features that could bounce mail that
693 # would be accepted by a previous Postfix version.
695 # [The "unknown_local_recipient_reject_code = 450" safety net,
696 # introduced with Postfix 2.0 and deleted after Postfix 2.3.]
699 # Add missing proxymap service to master.cf.
701 grep '^proxymap.*proxymap' $config_directory/master.cf >/dev/null || {
702 echo Editing $config_directory/master.cf, adding missing entry for proxymap service
703 cat >>$config_directory/master.cf <<EOF || exit 1
704 proxymap unix - - n - - proxymap
709 # Add missing anvil service to master.cf.
711 grep '^anvil.*anvil' $config_directory/master.cf >/dev/null || {
712 echo Editing $config_directory/master.cf, adding missing entry for anvil service
713 cat >>$config_directory/master.cf <<EOF || exit 1
714 anvil unix - - n - 1 anvil
719 # Add missing scache service to master.cf.
721 grep '^scache.*scache' $config_directory/master.cf >/dev/null || {
722 echo Editing $config_directory/master.cf, adding missing entry for scache service
723 cat >>$config_directory/master.cf <<EOF || exit 1
724 scache unix - - n - 1 scache
729 # Add missing discard service to master.cf.
731 grep '^discard.*discard' $config_directory/master.cf >/dev/null || {
732 echo Editing $config_directory/master.cf, adding missing entry for discard service
733 cat >>$config_directory/master.cf <<EOF || exit 1
734 discard unix - - n - - discard
739 # Update the tlsmgr fifo->unix service.
741 grep "^tlsmgr[ ]*fifo[ ]" \
742 $config_directory/master.cf >/dev/null && {
743 echo Editing $config_directory/master.cf, updating the tlsmgr from fifo to unix service
744 ed $config_directory/master.cf <<EOF || exit 1
755 # Add missing tlsmgr service to master.cf.
757 grep '^tlsmgr.*tlsmgr' $config_directory/master.cf >/dev/null || {
758 echo Editing $config_directory/master.cf, adding missing entry for tlsmgr service
759 cat >>$config_directory/master.cf <<EOF || exit 1
760 tlsmgr unix - - n 1000? 1 tlsmgr
765 # Add missing retry service to master.cf.
767 grep '^retry.*error' $config_directory/master.cf >/dev/null || {
768 echo Editing $config_directory/master.cf, adding missing entry for retry service
769 cat >>$config_directory/master.cf <<EOF || exit 1
770 retry unix - - n - - error
775 # Add missing proxywrite service to master.cf.
777 grep '^proxywrite.*proxymap' $config_directory/master.cf >/dev/null || {
778 echo Editing $config_directory/master.cf, adding missing entry for proxywrite service
779 cat >>$config_directory/master.cf <<EOF || exit 1
780 proxywrite unix - - n - 1 proxymap
785 # Fix a typo in the default master.cf proxywrite entry.
787 grep '^proxywrite.*-[ ]*proxymap' $config_directory/master.cf >/dev/null && {
788 echo Editing $config_directory/master.cf, setting proxywrite process limit to 1
789 ed $config_directory/master.cf <<EOF || exit 1
790 /^proxywrite.*-[ ]*proxymap/
791 s/-\([ ]*proxymap\)/1\1/
799 # Add missing postscreen service to master.cf.
801 grep '^#*smtp.*postscreen' $config_directory/master.cf >/dev/null || {
802 echo Editing $config_directory/master.cf, adding missing entry for postscreen TCP service
803 cat >>$config_directory/master.cf <<EOF || exit 1
804 #smtp inet n - n - 1 postscreen
809 # Add missing smtpd (unix-domain) service to master.cf.
811 grep '^#*smtpd.*smtpd' $config_directory/master.cf >/dev/null || {
812 echo Editing $config_directory/master.cf, adding missing entry for smtpd unix-domain service
813 cat >>$config_directory/master.cf <<EOF || exit 1
814 #smtpd pass - - n - - smtpd
819 # Add temporary dnsblog (unix-domain) service to master.cf.
821 grep '^#*dnsblog.*dnsblog' $config_directory/master.cf >/dev/null || {
822 echo Editing $config_directory/master.cf, adding missing entry for dnsblog unix-domain service
823 cat >>$config_directory/master.cf <<EOF || exit 1
824 #dnsblog unix - - n - 0 dnsblog
829 # Add tlsproxy (unix-domain) service to master.cf.
831 grep '^#*tlsproxy.*tlsproxy' $config_directory/master.cf >/dev/null || {
832 echo Editing $config_directory/master.cf, adding missing entry for tlsproxy unix-domain service
833 cat >>$config_directory/master.cf <<EOF || exit 1
834 #tlsproxy unix - - n - 0 tlsproxy
838 # Report (but do not remove) obsolete files.
840 test -n "$obsolete" && {
843 Note: the following files or directories still exist but are
844 no longer part of Postfix:
852 # Safety net for incompatible changes in IPv6 defaults.
853 # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO AVOID AN
854 # UNEXPECTED DROP IN PERFORMANCE AFTER UPGRADING FROM POSTFIX
856 # This code assumes that the default is "inet_protocols = ipv4"
857 # when IPv6 support is not compiled in. See util/sys_defs.h.
859 test "`$POSTCONF -dh inet_protocols`" = "ipv4" ||
860 test -n "`$POSTCONF -c $config_directory -n inet_protocols`" || {
862 COMPATIBILITY: editing $config_directory/main.cf, setting
863 inet_protocols=ipv4. Specify inet_protocols explicitly if you
865 In a future release IPv6 will be enabled by default.
867 $POSTCONF -c $config_directory inet_protocols=ipv4 || exit 1
870 # Disabled because unhelpful down-stream maintainers disable the safety net.
872 # # Safety net for incompatible changes due to the introduction
873 # # of the smtpd_relay_restrictions feature to separate the
874 # # mail relay policy from the spam blocking policy.
875 # # PLEASE DO NOT REMOVE THIS CODE. ITS PURPOSE IS TO PREVENT
876 # # INBOUND MAIL FROM UNEXPECTEDLY BOUNCING AFTER UPGRADING FROM
877 # # POSTFIX BEFORE 2.10.
878 # test -n "`$POSTCONF -c $config_directory -n smtpd_relay_restrictions`" || {
880 # COMPATIBILITY: editing $config_directory/main.cf, overriding
881 # smtpd_relay_restrictions to prevent inbound mail from
882 # unexpectedly bouncing.
883 # Specify an empty smtpd_relay_restrictions value to keep using
884 # smtpd_recipient_restrictions as before.
886 # $POSTCONF -c $config_directory "smtpd_relay_restrictions = \
887 # permit_mynetworks permit_sasl_authenticated \
888 # defer_unauth_destination" || exit 1
892 # A reminder if this is the first time Postfix is being installed.
894 test -n "$first_install_reminder" && {
896 ALIASES=`$POSTCONF -c $config_directory -h alias_database | sed 's/^[^:]*://'`
897 NEWALIASES_PATH=`$POSTCONF -c $config_directory -h newaliases_path`
900 Warning: you still need to edit myorigin/mydestination/mynetworks
901 parameter settings in $config_directory/main.cf.
903 See also http://www.postfix.org/STANDARD_CONFIGURATION_README.html
904 for information about dialup sites or about sites inside a
907 BTW: Check your $ALIASES file and be sure to set up aliases
908 that send mail for root and postmaster to a real person, then
909 run $NEWALIASES_PATH.