nsbin/ssa/sub.add.apache-v2-obsoleted

50 lines
1.1 KiB
Text
Raw Normal View History

#!/bin/sh
. `dirname $0`/sub.defaults
case $# in
3)
TLD="$1"
SLD="$2"
VUSER="$3"
echo -n adding qmail entry for $SLD.$TLD,which points to $VUSER
echo "$SLD.$TLD" >> $RCPTHOSTS
echo "$SLD.$TLD:$VUSER-$SLD.$TLD" >> $VDOMAINS
;;
4)
exit 1
TLD="$1"
SLD="$2"
SUBDOMAIN="$3" # currently unused
VUSER="$4"
echo -n adding qmail entry for $SUBDOMAIN.$SLD.$TLD,which points to $VUSER
echo "$SUBDOMAIN.$SLD.$TLD" >> $RCPTHOSTS
echo "$SUBDOMAIN.$SLD.$TLD:$VUSER-$SLD.$TLD" >> $VDOMAINS
;;
*)
echo $0: 'TLD SLD [SUBDOMAIN] VUSER'
exit 1
;;
esac
# default handling
echo "&$VUSER@schottelius.org" > /home/user/$VUSER/.qmail-$SLD\:$TLD-default
# moi
echo "&nico@schottelius.org" > /home/user/$VUSER/.qmail-$SLD\:$TLD-postmaster
echo "&nico@schottelius.org" > /home/user/$VUSER/.qmail-$SLD\:$TLD-mailer-daemon
echo "&nico@schottelius.org" > /home/user/$VUSER/.qmail-$SLD\:$TLD-root
# perms
chown $VUSER /home/user/$VUSER/.qmail-$SLD\:$TLD-*
echo -n restarting qmail...
# restart
killall -HUP qmail-send
echo done.