mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-06 08:26:50 +01:00
888ec031ac
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
97 lines
3.4 KiB
Diff
97 lines
3.4 KiB
Diff
--- config-fast.sh 1998/06/15 10:53:16 1.1
|
|
+++ config-fast.sh 2017/02/07 01:58:27
|
|
@@ -2,29 +2,29 @@
|
|
echo Your fully qualified host name is "$fqdn".
|
|
|
|
echo Putting "$fqdn" into control/me...
|
|
-echo "$fqdn" > QMAIL/control/me
|
|
-chmod 644 QMAIL/control/me
|
|
+echo "$fqdn" > QMAIL/control/me.new
|
|
+chmod 644 QMAIL/control/me.new
|
|
|
|
( echo "$fqdn" | sed 's/^\([^\.]*\)\.\([^\.]*\)\./\2\./' | (
|
|
read ddom
|
|
echo Putting "$ddom" into control/defaultdomain...
|
|
- echo "$ddom" > QMAIL/control/defaultdomain
|
|
- chmod 644 QMAIL/control/defaultdomain
|
|
+ echo "$ddom" > QMAIL/control/defaultdomain.new
|
|
+ chmod 644 QMAIL/control/defaultdomain.new
|
|
) )
|
|
|
|
( echo "$fqdn" | sed 's/^.*\.\([^\.]*\)\.\([^\.]*\)$/\1.\2/' | (
|
|
read pdom
|
|
echo Putting "$pdom" into control/plusdomain...
|
|
- echo "$pdom" > QMAIL/control/plusdomain
|
|
- chmod 644 QMAIL/control/plusdomain
|
|
+ echo "$pdom" > QMAIL/control/plusdomain.new
|
|
+ chmod 644 QMAIL/control/plusdomain.new
|
|
) )
|
|
|
|
echo Putting "$fqdn" into control/locals...
|
|
-echo "$fqdn" >> QMAIL/control/locals
|
|
-chmod 644 QMAIL/control/locals
|
|
+echo "$fqdn" >> QMAIL/control/locals.new
|
|
+chmod 644 QMAIL/control/locals.new
|
|
|
|
echo Putting "$fqdn" into control/rcpthosts...
|
|
-echo "$fqdn" >> QMAIL/control/rcpthosts
|
|
-chmod 644 QMAIL/control/rcpthosts
|
|
+echo "$fqdn" >> QMAIL/control/rcpthosts.new
|
|
+chmod 644 QMAIL/control/rcpthosts.new
|
|
echo "Now qmail will refuse to accept SMTP messages except to $fqdn."
|
|
echo 'Make sure to change rcpthosts if you add hosts to locals or virtualdomains!'
|
|
--- config.sh 1998/06/15 10:53:16 1.1
|
|
+++ config.sh 2017/02/07 01:51:04
|
|
@@ -7,24 +7,24 @@
|
|
then
|
|
echo Your host\'s fully qualified name in DNS is "$fqdn".
|
|
echo Putting "$fqdn" into control/me...
|
|
- echo "$fqdn" > QMAIL/control/me
|
|
- chmod 644 QMAIL/control/me
|
|
+ echo "$fqdn" > QMAIL/control/me.new
|
|
+ chmod 644 QMAIL/control/me.new
|
|
( echo "$fqdn" | sed 's/^\([^\.]*\)\.\([^\.]*\)\./\2\./' | (
|
|
read ddom
|
|
echo Putting "$ddom" into control/defaultdomain...
|
|
- echo "$ddom" > QMAIL/control/defaultdomain
|
|
- chmod 644 QMAIL/control/defaultdomain
|
|
+ echo "$ddom" > QMAIL/control/defaultdomain.new
|
|
+ chmod 644 QMAIL/control/defaultdomain.new
|
|
) )
|
|
( echo "$fqdn" | sed 's/^.*\.\([^\.]*\)\.\([^\.]*\)$/\1.\2/' | (
|
|
read pdom
|
|
echo Putting "$pdom" into control/plusdomain...
|
|
- echo "$pdom" > QMAIL/control/plusdomain
|
|
- chmod 644 QMAIL/control/plusdomain
|
|
+ echo "$pdom" > QMAIL/control/plusdomain.new
|
|
+ chmod 644 QMAIL/control/plusdomain.new
|
|
) )
|
|
echo ' '
|
|
echo Checking local IP addresses:
|
|
- : > QMAIL/control/locals
|
|
- chmod 644 QMAIL/control/locals
|
|
+ : > QMAIL/control/locals.new
|
|
+ chmod 644 QMAIL/control/locals.new
|
|
( ./dnsip "$fqdn"
|
|
./ipmeprint ) | sort -u | \
|
|
(
|
|
@@ -35,7 +35,7 @@
|
|
if read local
|
|
then
|
|
echo Adding "$local" to control/locals...
|
|
- echo "$local" >> QMAIL/control/locals
|
|
+ echo "$local" >> QMAIL/control/locals.new
|
|
else
|
|
echo PTR lookup failed. I assume this address has no DNS name.
|
|
fi
|
|
@@ -48,8 +48,8 @@
|
|
echo You don\'t have to worry about aliases, i.e., domains with CNAME records.
|
|
echo ' '
|
|
echo Copying QMAIL/control/locals to QMAIL/control/rcpthosts...
|
|
- cp QMAIL/control/locals QMAIL/control/rcpthosts
|
|
- chmod 644 QMAIL/control/rcpthosts
|
|
+ cp QMAIL/control/locals.new QMAIL/control/rcpthosts.new
|
|
+ chmod 644 QMAIL/control/rcpthosts.new
|
|
echo 'Now qmail will refuse to accept SMTP messages except to those hosts.'
|
|
echo 'Make sure to change rcpthosts if you add hosts to locals or virtualdomains!'
|
|
else
|