1 .
/hostname |
tr '[A-Z]' '[a-z]' |
(
4 echo Your hostname is
"$host".
5 .
/dnsfq
"$host" |
tr '[A-Z]' '[a-z]' |
(
8 echo Your
host\'s fully qualified name
in DNS is
"$fqdn".
9 echo Putting
"$fqdn" into control
/me...
10 echo "$fqdn" > QMAIL
/control
/me
11 chmod 644 QMAIL
/control
/me
12 ( echo "$fqdn" |
sed 's/^\([^\.]*\)\.\([^\.]*\)\./\2\./' |
(
14 echo Putting
"$ddom" into control
/defaultdomain...
15 echo "$ddom" > QMAIL
/control
/defaultdomain
16 chmod 644 QMAIL
/control
/defaultdomain
18 ( echo "$fqdn" |
sed 's/^.*\.\([^\.]*\)\.\([^\.]*\)$/\1.\2/' |
(
20 echo Putting
"$pdom" into control
/plusdomain...
21 echo "$pdom" > QMAIL
/control
/plusdomain
22 chmod 644 QMAIL
/control
/plusdomain
25 echo Checking
local IP addresses
:
26 : > QMAIL
/control
/locals
27 chmod 644 QMAIL
/control
/locals
29 .
/ipmeprint
) |
sort -u | \
33 echo "$localip: " |
tr -d
'\012'
34 .
/dnsptr
"$localip" 2>/dev
/null |
(
37 echo Adding
"$local" to control
/locals...
38 echo "$local" >> QMAIL
/control
/locals
40 echo PTR lookup failed. I assume this address has no DNS name.
46 echo If there are any other domain names that point to you
,
47 echo you will have to add them to QMAIL
/control
/locals.
48 echo You don
\'t have to worry about aliases
, i.e.
, domains with CNAME records.
50 echo Copying QMAIL
/control
/locals to QMAIL
/control
/rcpthosts...
51 cp QMAIL
/control
/locals QMAIL
/control
/rcpthosts
52 chmod 644 QMAIL
/control
/rcpthosts
53 echo 'Now qmail will refuse to accept SMTP messages except to those hosts.'
54 echo 'Make sure to change rcpthosts if you add hosts to locals or virtualdomains!'
56 echo Sorry
, I couldn
\'t
find your
host\'s canonical name
in DNS.
57 echo You will have to
set up control
/me yourself.
61 echo Sorry
, I couldn
\'t
find your hostname.
62 echo You will have to
set up control
/me yourself.