1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
$NetBSD: patch-aa,v 1.5 2001/03/20 12:50:50 hubertf Exp $
--- INSTALL.sh.orig Thu Jan 25 11:02:53 2001
+++ INSTALL.sh Sun Feb 4 14:45:40 2001
@@ -7,39 +7,39 @@
umask 022
test -t 0 &&
-cat <<EOF
-
-Warning: this script replaces existing sendmail or Postfix programs.
-Make backups if you want to be able to recover.
-
-In addition to doing a fresh install, this script can change an
-existing installation from using a world-writable maildrop to a
-group-writable one. It cannot be used to change Postfix queue
-file/directory ownership.
-
-Before installing files, this script prompts you for some definitions.
-Most definitions will be remembered, so you have to specify them
-only once. All definitions have a reasonable default value.
-
- install_root - prefix for installed file names (for package building)
-
- tempdir - where to write scratch files
-
- config_directory - directory with Postfix configuration files.
- daemon_directory - directory with Postfix daemon programs.
- command_directory - directory with Postfix administrative commands.
- queue_directory - directory with Postfix queues.
-
- sendmail_path - full pathname of the Postfix sendmail command.
- newaliases_path - full pathname of the Postfix newaliases command.
- mailq_path - full pathname of the Postfix mailq command.
-
- mail_owner - owner of Postfix queue files.
-
- setgid - groupname, e.g., postdrop (default: no). See INSTALL section 12.
- manpages - "no" or path to man tree. Example: /usr/local/man.
-
-EOF
+#cat <<EOF
+#
+#Warning: this script replaces existing sendmail or Postfix programs.
+#Make backups if you want to be able to recover.
+#
+#In addition to doing a fresh install, this script can change an
+#existing installation from using a world-writable maildrop to a
+#group-writable one. It cannot be used to change Postfix queue
+#file/directory ownership.
+#
+#Before installing files, this script prompts you for some definitions.
+#Most definitions will be remembered, so you have to specify them
+#only once. All definitions have a reasonable default value.
+#
+# install_root - prefix for installed file names (for package building)
+#
+# tempdir - where to write scratch files
+#
+# config_directory - directory with Postfix configuration files.
+# daemon_directory - directory with Postfix daemon programs.
+# command_directory - directory with Postfix administrative commands.
+# queue_directory - directory with Postfix queues.
+#
+# sendmail_path - full pathname of the Postfix sendmail command.
+# newaliases_path - full pathname of the Postfix newaliases command.
+# mailq_path - full pathname of the Postfix mailq command.
+#
+# mail_owner - owner of Postfix queue files.
+#
+# setgid - groupname, e.g., postdrop (default: no). See INSTALL section 12.
+# manpages - "no" or path to man tree. Example: /usr/local/man.
+#
+#EOF
# By now, shells must have functions. Ultrix users must use sh5 or lose.
# The following shell functions replace files/symlinks while minimizing
@@ -109,35 +109,32 @@
: ${install_root=/}
: ${tempdir=`pwd`}
-: ${config_directory=/etc/postfix}
-: ${daemon_directory=/usr/libexec/postfix}
-: ${command_directory=/usr/sbin}
+: ${config_directory=__PREFIX/share/postfix}
+: ${daemon_directory=__PREFIX/libexec/postfix}
+: ${command_directory=__PREFIX/sbin}
: ${queue_directory=/var/spool/postfix}
-if [ -f /usr/lib/sendmail ]
- then : ${sendmail_path=/usr/lib/sendmail}
- else : ${sendmail_path=/usr/sbin/sendmail}
-fi
-: ${newaliases_path=/usr/bin/newaliases}
-: ${mailq_path=/usr/bin/mailq}
+: ${sendmail_path=__PREFIX/libexec/postfix/sendmail}
+#: ${newaliases_path=/usr/bin/newaliases}
+#: ${mailq_path=/usr/bin/mailq}
: ${mail_owner=postfix}
-: ${setgid=no}
-: ${manpages=/usr/local/man}
+: ${setgid=maildrop}
+: ${manpages=__PREFIX/man}
# Find out the location of configuration files.
-test -t 0 &&
-for name in install_root tempdir config_directory
-do
- while :
- do
- eval echo \$n "$name: [\$$name]\ \$c"
- read ans
- case $ans in
- "") break;;
- *) eval $name=\$ans; break;;
- esac
- done
-done
+#test -t 0 &&
+#for name in install_root tempdir config_directory
+#do
+# while :
+# do
+# eval echo \$n "$name: [\$$name]\ \$c"
+# read ans
+# case $ans in
+# "") break;;
+# *) eval $name=\$ans; break;;
+# esac
+# done
+#done
# Sanity checks
@@ -159,32 +156,32 @@
CONFIG_DIRECTORY=$install_root$config_directory
-test -f $CONFIG_DIRECTORY/main.cf && {
- for name in daemon_directory command_directory queue_directory mail_owner
- do
- eval $name='"`bin/postconf -c $CONFIG_DIRECTORY -h $name`"' || kill $$
- done
-}
+#test -f $CONFIG_DIRECTORY/main.cf && {
+# for name in daemon_directory command_directory queue_directory mail_owner
+# do
+# eval $name='"`bin/postconf -c $CONFIG_DIRECTORY -h $name`"' || kill $$
+# done
+#}
-test -f $CONFIG_DIRECTORY/install.cf && . $CONFIG_DIRECTORY/install.cf
+#test -f $CONFIG_DIRECTORY/install.cf && . $CONFIG_DIRECTORY/install.cf
# Override default settings.
-test -t 0 &&
-for name in daemon_directory command_directory \
- queue_directory sendmail_path newaliases_path mailq_path mail_owner\
- setgid manpages
-do
- while :
- do
- eval echo \$n "$name: [\$$name]\ \$c"
- read ans
- case $ans in
- "") break;;
- *) eval $name=\$ans; break;;
- esac
- done
-done
+#test -t 0 &&
+#for name in daemon_directory command_directory \
+# queue_directory sendmail_path newaliases_path mailq_path mail_owner\
+# setgid manpages
+#do
+# while :
+# do
+# eval echo \$n "$name: [\$$name]\ \$c"
+# read ans
+# case $ans in
+# "") break;;
+# *) eval $name=\$ans; break;;
+# esac
+# done
+#done
# Sanity checks
@@ -232,10 +229,10 @@
DAEMON_DIRECTORY=$install_root$daemon_directory
COMMAND_DIRECTORY=$install_root$command_directory
-QUEUE_DIRECTORY=$install_root$queue_directory
+QUEUE_DIRECTORY=$queue_directory
SENDMAIL_PATH=$install_root$sendmail_path
-NEWALIASES_PATH=$install_root$newaliases_path
-MAILQ_PATH=$install_root$mailq_path
+#NEWALIASES_PATH=$install_root$newaliases_path
+#MAILQ_PATH=$install_root$mailq_path
MANPAGES=$install_root$manpages
# Create any missing directories.
@@ -244,7 +241,7 @@
test -d $DAEMON_DIRECTORY || mkdir -p $DAEMON_DIRECTORY || exit 1
test -d $COMMAND_DIRECTORY || mkdir -p $COMMAND_DIRECTORY || exit 1
test -d $QUEUE_DIRECTORY || mkdir -p $QUEUE_DIRECTORY || exit 1
-for path in $SENDMAIL_PATH $NEWALIASES_PATH $MAILQ_PATH
+for path in $SENDMAIL_PATH
do
dir=`echo $path|sed -e 's/[/][/]*[^/]*$//' -e 's/^$/\//'`
test -d $dir || mkdir -p $dir || exit 1
@@ -264,8 +261,8 @@
test -f bin/sendmail && {
compare_or_replace a+x,go-w bin/sendmail $SENDMAIL_PATH || exit 1
- compare_or_symlink $SENDMAIL_PATH $NEWALIASES_PATH
- compare_or_symlink $SENDMAIL_PATH $MAILQ_PATH
+# compare_or_symlink $SENDMAIL_PATH $NEWALIASES_PATH
+# compare_or_symlink $SENDMAIL_PATH $MAILQ_PATH
}
if [ -f $CONFIG_DIRECTORY/main.cf ]
@@ -290,13 +287,13 @@
"mail_owner = $mail_owner" \
|| exit 1
-(echo "# This file was generated by $0"
-for name in sendmail_path newaliases_path mailq_path setgid manpages
-do
- eval echo $name=\$$name
-done) >$tempdir/junk || exit 1
-compare_or_move a+x,go-w $tempdir/junk $CONFIG_DIRECTORY/install.cf || exit 1
-rm -f $tempdir/junk
+#(echo "# This file was generated by $0"
+#for name in sendmail_path newaliases_path mailq_path setgid manpages
+#do
+# eval echo $name=\$$name
+#done) >$tempdir/junk || exit 1
+#compare_or_move a+x,go-w $tempdir/junk $CONFIG_DIRECTORY/install.cf || exit 1
+#rm -f $tempdir/junk
# Use set-gid privileges instead of writable maildrop (optional).
|