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
|
First, read the file INSTALL. This file gives details of what
needs to be in the chroot jail for smtpd to work properly on a SunOS
5.5.1 machine.
The basics are, you need /etc/netconfig, /etc/resolv.conf and
/etc/nsswitch.conf, as well as /dev/udp. the nsswitch.conf file must
have "files" only for everything except hosts which should be "files
dns". you'll need to do a mknod to make a /dev/udp in the chroot, major
11, minor 41. An ls -lR, and the etc/nsswitch.conf file used are below.
(This machine is in the Canada/Mountain timezone, so your timezone files
will be different most likely).
---------ls -lR---------
/usr/spool/smtpd:
total 6
drwxr-xr-x 2 root other 512 Jul 28 16:26 dev
drwxr-xr-x 2 root other 512 Aug 4 14:26 etc
drwxr-xr-x 3 root other 512 Jul 23 10:54 usr
/usr/spool/smtpd/dev:
total 0
crw-rw-rw- 1 root other 11, 41 Jul 28 16:26 udp
/usr/spool/smtpd/etc:
total 28
-r-xr-xr-x 1 root other 467 Jul 23 10:53 TIMEZONE
-r--r--r-- 1 root other 1064 Jul 28 16:08 netconfig
-rw-r--r-- 1 root other 690 Jul 23 10:46 nsswitch.conf
-rw-r--r-- 1 root other 2535 Aug 7 20:06 smtpd_check_rules
/usr/spool/smtpd/usr:
total 2
drwxr-xr-x 3 root other 512 Jul 23 10:54 share
/usr/spool/smtpd/usr/share:
total 2
drwxr-xr-x 3 root other 512 Jul 23 10:54 lib
/usr/spool/smtpd/usr/share/lib:
total 2
drwxr-xr-x 3 root other 512 Jul 23 10:54 zoneinfo
/usr/spool/smtpd/usr/share/lib/zoneinfo:
total 2
drwxr-xr-x 2 root other 512 Jul 23 10:55 Canada
/usr/spool/smtpd/usr/share/lib/zoneinfo/Canada:
total 2
-rw-r--r-- 1 root other 842 Jul 23 10:55 Mountain
------------8< /usr/spool/smtpd/etc/nsswitch.conf 8<-------------
#
# /etc/nsswitch.files:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# does not use any naming service.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
passwd: files
group: files
hosts: files dns
networks: files
protocols: files
rpc: files
ethers: files
netmasks: files
bootparams: files
publickey: files
# At present there isn't a 'files' backend for netgroup; the system will
# figure it out pretty quickly, and won't use netgroups at all.
netgroup: files
automount: files
aliases: files
services: files
sendmailvars: files
|