1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
#!/bin/sh -e
# Debian smail postinst script
# (c) 1998 Soenke Lange soenke@escher.north.de
# 2000 Adrian Bunk bunk@fs.tum.de
#install, run smailconfig on a not configured smail-system
# if I find something in /etc/smail/routers .. this is not the first inst of
# smail, so assuming it's configured
#update-rc.d smail defaults 50 >/dev/null
if [ -s /etc/smail/routers ]
then
echo Good. Smail is configured.
else
/usr/sbin/smailconfig || \
(echo "Can't execute smailconfig."; exit 1)
fi
if [ -f /etc/smail/config ]
then
if grep -q " Debian Config Version 3" /etc/smail/config
then
echo "Good. You have a recent smail configuration"
else
# it seem to be an old smail installation
# so I only append some information at /etc/smail/config
# about all the new antispam/relay features of smail
# zcat /usr/doc/smail/New-Config-Features.gz >> /etc/smail/config
#echo "Please read the /usr/doc/smail/New-Config-Features carefully"
echo "Some of the control parameters for the /etc/smail/config"
echo "file have changed their funtionality. Please read the "
echo "smail-config man page. Especially the HELO part which is the"
echo "one that changed the most"
fi
fi
if [ -d /var/spool/mail ]
then
if [ ! -d /var/mail ]
then
echo "The default dir for spooling mail now is /var/mail no /var/spool/mail"
echo "Please execute: 'mv /var/spool/mail /var/mail' or 'ln -s "
echo "/var/spool/mail /var/mail' so smail can keep on working normally"
fi
fi
# at least we have to restart smail ...
if egrep -q '^smtp\b' /etc/inetd.conf
then
crontab -u mail -r 2>/dev/null || true
crontab -u mail /etc/smail/crontab
# else
# /etc/init.d/smail restart 2>/dev/null
fi
#DEBHELPER#
|