Subversion Repositories

?revision_form?Rev ?revision_input??revision_submit??revision_endform?

Rev 4 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#!/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 -m771 -oDebian-exim -gDebian-exim \
                /var/spool/sa-exim
        elif [ -d /var/spool/sa-exim ]; then
                # Fix permissions
                chmod 771 /var/spool/sa-exim
                chown Debian-exim:Debian-exim /var/spool/sa-exim
        fi
        # Support for greylisting tuplets (written as nobody by spamd)
        if [ ! -e /var/spool/sa-exim/tuplets ] ; then
                install -d -m750 -onobody -gDebian-exim \
                /var/spool/sa-exim/tuplets
        elif [ -d /var/spool/sa-exim/tuplets ]; then
                # Fix permissions
                chmod 771 /var/spool/sa-exim/tuplets 
                chown nobody:Debian-exim /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

#DEBHELPER#