1 # arg 1: the new package version
4 echo "==> Creating nullmail user"
5 getent group nullmail > /dev/null || groupadd nullmail
6 getent passwd nullmail > /dev/null || useradd -c "Nullmail mail server" -g nullmail -s /bin/false -d /dev/null nullmail
8 echo "==> Fixing permissions"
10 chown nullmail /var/nullmailer/*
11 chown nullmail /usr/sbin/nullmailer-queue
12 chmod u+s /usr/sbin/nullmailer-queue
13 chown nullmail /usr/bin/mailq
14 chmod u+s /usr/bin/mailq
16 echo "==> Configuring"
17 [ -s /etc/nullmailer/me ] || /bin/hostname > /etc/nullmailer/me
19 [ -s /etc/nullmailer/remotes ] || \
20 echo -e "\n\n#Type your mail relay hosts at the top, one per line" > \
21 /etc/nullmailer/remotes
27 echo "==> Stopping nullmailer"
28 sv stop nullmailer >& /dev/null
29 rm -f /var/service/nullmailer
30 echo "==> Removing nullmailer user and group"
31 usr/sbin/userdel nullmail >& /dev/null
32 usr/sbin/groupdel nullmail >& /dev/null