summaryrefslogtreecommitdiff
path: root/user/netqmail/netqmail.post-install
diff options
context:
space:
mode:
authorLaurent Bercot <ska-adelie@skarnet.org>2018-08-28 16:14:58 +0000
committerLaurent Bercot <ska-adelie@skarnet.org>2018-08-28 16:14:58 +0000
commit6990bd384a5a11f1dfa75bc32d094dd02d1851a2 (patch)
tree8a0febc1bd96aafde6f622faf5ca43abbcce51f1 /user/netqmail/netqmail.post-install
parent3f2f1bfb288e936b66a25b31319690fb479fa10c (diff)
downloadpackages-6990bd384a5a11f1dfa75bc32d094dd02d1851a2.tar.gz
packages-6990bd384a5a11f1dfa75bc32d094dd02d1851a2.tar.bz2
packages-6990bd384a5a11f1dfa75bc32d094dd02d1851a2.tar.xz
packages-6990bd384a5a11f1dfa75bc32d094dd02d1851a2.zip
user/netqmail: new package. First of *many* iterations.
Diffstat (limited to 'user/netqmail/netqmail.post-install')
-rw-r--r--user/netqmail/netqmail.post-install22
1 files changed, 22 insertions, 0 deletions
diff --git a/user/netqmail/netqmail.post-install b/user/netqmail/netqmail.post-install
new file mode 100644
index 000000000..b9c03e947
--- /dev/null
+++ b/user/netqmail/netqmail.post-install
@@ -0,0 +1,22 @@
+#!/bin/sh -e
+
+# Basic /var/qmail/control configuration so qmail has a chance to
+# work out-of-the-box for very simple installations.
+
+name=`uname -n`
+ddom=`echo "$name" | sed 's/^\([^\.]*\)\.\([^\.]*\)\./\2\./'`
+pdom=`echo "$name" | sed 's/^.*\.\([^\.]*\)\.\([^\.]*\)$/\1.\2/'`
+
+cd /var/qmail/control
+echo "$name" > me
+echo "$name" > locals
+echo "$name" > rcpthosts
+echo "$name powered by qmail" > smtpgreeting
+echo "$ddom" > defaultdomain
+echo "$pdom" > plusdomain
+
+{
+ echo "Minimal qmail configuration done in /var/qmail/control."
+ echo "Please check and adjust those settings before starting the service."
+ echo "Please review /etc/init.d/netqmail for more settings."
+} 1>&2