2 # From original Solaris 8 version by Matthew X. Economou
3 # Solaris 10 version updated by JD Bronson. Caution: this copies
4 # too many files. There is no need to copy libc.so and other files
5 # that are already linked in before a Postfix daemon chroots itself.
7 COMMAND_DIRECTORY
="/usr/sbin"
8 DAEMON_DIRECTORY
="/usr/libexec/postfix"
9 QUEUE_DIRECTORY
="/var/spool/postfix"
11 ## Copy any shared libraries, device entries, or configuration files
12 ## needed by Postfix into the jail.
14 $DAEMON_DIRECTORY/virtual
15 $DAEMON_DIRECTORY/trivial-rewrite
16 $DAEMON_DIRECTORY/spawn
17 $DAEMON_DIRECTORY/smtpd
18 $DAEMON_DIRECTORY/smtp
19 $DAEMON_DIRECTORY/showq
20 $DAEMON_DIRECTORY/qmqpd
21 $DAEMON_DIRECTORY/qmgr
22 $DAEMON_DIRECTORY/proxymap
23 $DAEMON_DIRECTORY/pipe
24 $DAEMON_DIRECTORY/pickup
25 $DAEMON_DIRECTORY/nqmgr
26 $DAEMON_DIRECTORY/master
27 $DAEMON_DIRECTORY/local
28 $DAEMON_DIRECTORY/lmtp
29 $DAEMON_DIRECTORY/flush
30 $DAEMON_DIRECTORY/error
31 $DAEMON_DIRECTORY/cleanup
32 $DAEMON_DIRECTORY/bounce
34 $COMMAND_DIRECTORY/postsuper
35 $COMMAND_DIRECTORY/postqueue
36 $COMMAND_DIRECTORY/postmap
37 $COMMAND_DIRECTORY/postlog
38 $COMMAND_DIRECTORY/postlock
39 $COMMAND_DIRECTORY/postkick
40 $COMMAND_DIRECTORY/postfix
41 $COMMAND_DIRECTORY/postdrop
42 $COMMAND_DIRECTORY/postconf
43 $COMMAND_DIRECTORY/postcat
44 $COMMAND_DIRECTORY/postalias
46 ldd
$binlist |
awk '/[=]>/ { print $3 }' |
sort -u |
while read i
48 mkdir
-p $QUEUE_DIRECTORY`dirname $i`
49 ## Sun's version of tar sucks. We'll have to remove the leading
50 ## slashes from file names ourself, otherwise the copy doesn't
52 (cd / && tar cphf
- `echo $i | sed -e 's/^\///'`) |
(cd $QUEUE_DIRECTORY && tar xpf
-)
55 ## More stuff for the jail, mostly discovered by inspection
56 ## (e.g. strings, lsof).
69 /devices/pseudo/mm@0:zero
70 /devices/pseudo/mm@0:null
71 /devices/pseudo/udp6@0:udp6
72 /devices/pseudo/tcp6@0:tcp6
73 /devices/pseudo/udp@0:udp
74 /devices/pseudo/tcp@0:tcp
75 /devices/pseudo/poll@0:poll
76 /devices/pseudo/icmp@0:icmp
77 /devices/pseudo/tl@0:ticlts
78 /devices/pseudo/tl@0:ticotsord
79 /devices/pseudo/tl@0:ticots
93 /usr/lib/sparcv9/straddr.so
101 /lib/nss_nisplus.so.1
104 /usr/share/lib/zoneinfo
108 mkdir
-p $QUEUE_DIRECTORY`dirname $i`
109 (cd / && tar cpf
- `echo $i | sed -e 's/^\///'`) |
(cd $QUEUE_DIRECTORY && tar xpf
-)