postinst is in sa-exim 4.2.1-14build1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
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 | #!/bin/sh
set -e
. /usr/share/debconf/confmodule
LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path
DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled'
DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\ -f1`
OLDCRONJOB=/etc/cron.hourly/greylistclean
OLDCRONJOBREN=/etc/cron.hourly/.greylistclean.insecure.deleteme
if test -f $OLDCRONJOB; then
echo "disabling old insecure $OLDCRONJOB"
echo "(renamed to $OLDCRONJOBREN)"
echo "See new cronjob in /etc/cron.d/greylistclean"
mv $OLDCRONJOB $OLDCRONJOBREN
fi
case "$1" in
configure)
if [ ! -e /var/spool/sa-exim ] ; then
# Debian-exim should exist as we depend on exim4-base
install -d -m770 -oDebian-exim -gDebian-exim \
/var/spool/sa-exim
fi
# Support for greylisting tuplets (written by default as Debian-exim by spamd)
if [ ! -e /var/spool/sa-exim/tuplets ] ; then
install -d -m770 -oDebian-exim -gDebian-exim \
/var/spool/sa-exim/tuplets
elif [ `stat -c "%U:%G" /var/spool/sa-exim/tuplets` = "nobody:Debian-exim" ] &&
dpkg --compare-versions "$2" lt-nl "4.2.1-14"; then
# If ownership is as before 4.2.1-14, give the Debian-exim
# group write permissions. Bug 563492.
chmod g+w /var/spool/sa-exim/tuplets
fi
# clean up temporary file generated by postrm uninstall
if [ -e "${LOCALSCANCONF}.rul" ] && \
[ "`md5sum ${LOCALSCANCONF}.rul | cut -d\ -f1`" = "${DISABLELOCALSCANMD5}" ]; then
rm ${LOCALSCANCONF}.rul
fi
if [ -x /etc/init.d/exim4 ]; then
if [ -x /usr/sbin/invoke-rc.d ]; then
invoke-rc.d exim4 reload || true
else
/etc/init.d/exim4 reload || true
fi
fi
;;
esac
|