1 diff -ru3 postfix-3.0.3/conf/postfix-script postfix-3.0.3-new/conf/postfix-script
2 --- postfix-3.0.3/conf/postfix-script 2014-06-27 18:05:15.000000000 +0400
3 +++ postfix-3.0.3-new/conf/postfix-script 2016-01-09 17:51:38.545733631 +0300
8 -# If this is a secondary instance, don't touch shared files.
10 -instances=`test ! -f $def_config_directory/main.cf ||
11 - $command_directory/postconf -qc $def_config_directory \
12 - -h multi_instance_directories | sed 's/,/ /'` || {
13 - $FATAL cannot execute $command_directory/postconf!
18 -for name in $instances
21 - "$def_config_directory") ;;
22 - "$config_directory") check_shared_files=; break;;
30 -prune \( -perm -020 -o -perm -002 \) \
31 -exec $WARN group or other writable: {} \;
33 - # Check Postfix root-owned directory tree owner/permissions.
35 - todo="$config_directory/."
36 - test -n "$check_shared_files" && {
37 - todo="$daemon_directory/. $meta_directory/. $todo"
38 - test "$shlib_directory" = "no" ||
39 - todo="$shlib_directory/. $todo"
41 - todo=`echo "$todo" | tr ' ' '\12' | sort -u`
43 - find $todo ! -user root \
44 - -exec $WARN not owned by root: {} \;
46 - find $todo \( -perm -020 -o -perm -002 \) \
47 - -exec $WARN group or other writable: {} \;
49 # Check Postfix mail_owner-owned directory tree owner/permissions.
51 find $data_directory/. ! -user $mail_owner \
53 # Check Postfix setgid_group-owned directory and file group/permissions.
55 todo="$queue_directory/public $queue_directory/maildrop"
56 - test -n "$check_shared_files" &&
57 - todo="$command_directory/postqueue $command_directory/postdrop $todo"
60 -prune ! -group $setgid_group \
61 -exec $WARN not owned by group $setgid_group: {} \;
63 - test -n "$check_shared_files" &&
64 - find $command_directory/postqueue $command_directory/postdrop \
65 - -prune ! -perm -02111 \
66 - -exec $WARN not set-gid or not owner+group+world executable: {} \;
68 # Check non-Postfix root-owned directory tree owner/content.
70 for dir in bin etc lib sbin usr
73 find corrupt -type f -exec $WARN damaged message: {} \;
75 - # Check for non-Postfix MTA remnants.
77 - test -n "$check_shared_files" -a -f /usr/sbin/sendmail -a \
78 - -f /usr/lib/sendmail && {
79 - cmp -s /usr/sbin/sendmail /usr/lib/sendmail || {
80 - $WARN /usr/lib/sendmail and /usr/sbin/sendmail differ
81 - $WARN Replace one by a symbolic link to the other