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
|
#!/bin/sh -e
case "$1" in
configure)
# Create directories for log etc
install -d -omail -gmail /var/log/exim
install -d -omail -gmail /var/run/exim
# Configure exim
if [ ! -f /etc/exim.conf ]; then
/usr/sbin/eximconfig $*
fi
# Register as suid
if [ -e /etc/suid.conf -a -x /usr/sbin/suidregister ]; then
suidregister -s exim /usr/sbin/exim root root 4755
fi
# Remove smail from inetd.conf incase it hasn't done so properly
update-inetd --remove in.smtpd
# Install us in inetd, if configured
if [ -f /etc/exim.conf ]; then
update-inetd --group MAIL --comment-chars \#disabled\# \
--add \
"smtp stream tcp nowait mail /usr/sbin/exim exim -bs"
fi
# Install in init.d
update-rc.d exim defaults >/dev/null
# Start running exim (maybe)
/etc/init.d/exim start || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
# Restart exim
/etc/init.d/exim start
;;
esac
|