summaryrefslogtreecommitdiff
path: root/config-fast.sh
diff options
context:
space:
mode:
authorJohn Denker <jsd@av8n.com>2012-06-02 01:58:45 (GMT)
committerJohn Denker <jsd@av8n.com>2012-06-02 01:58:45 (GMT)
commitb732a73bc773789894466b0e5320b2f1fe42c7e9 (patch)
tree385358983f064a1f10a5080b33a3ba13010886db /config-fast.sh
parent634d365a03cb0581a062cd3cf4db9ae69f1cde26 (diff)
original, as downloaded from http://www.qmail.org/netqmail-1.06.tar.gz
Diffstat (limited to 'config-fast.sh')
-rw-r--r--config-fast.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/config-fast.sh b/config-fast.sh
new file mode 100644
index 0000000..d05cda9
--- /dev/null
+++ b/config-fast.sh
@@ -0,0 +1,30 @@
+fqdn="$1"
+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" | sed 's/^\([^\.]*\)\.\([^\.]*\)\./\2\./' | (
+ read ddom
+ echo Putting "$ddom" into control/defaultdomain...
+ echo "$ddom" > QMAIL/control/defaultdomain
+ chmod 644 QMAIL/control/defaultdomain
+) )
+
+( 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 Putting "$fqdn" into control/locals...
+echo "$fqdn" >> QMAIL/control/locals
+chmod 644 QMAIL/control/locals
+
+echo Putting "$fqdn" into control/rcpthosts...
+echo "$fqdn" >> QMAIL/control/rcpthosts
+chmod 644 QMAIL/control/rcpthosts
+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!'