Rev 67 | Details | Compare with Previous | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line | 
|---|---|---|---|
| 1 | magnus | 1 | #!/bin/sh  | 
        
| 2 | set -e  | 
        ||
| 3 | |||
| 4 | . /usr/share/debconf/confmodule  | 
        ||
| 5 | |||
| 6 | LOCALSCANCONF=/etc/exim4/conf.d/main/15_sa-exim_plugin_path  | 
        ||
| 7 | DISABLELOCALSCANTEXT='# sa-exim plugin is disabled, because it was uninstalled'  | 
        ||
| 8 | DISABLELOCALSCANMD5=`echo "${DISABLELOCALSCANTEXT}" | md5sum | cut -d\  -f1` | 
        ||
| 9 | |||
| 10 | OLDCRONJOB=/etc/cron.hourly/greylistclean  | 
        ||
| 11 | OLDCRONJOBREN=/etc/cron.hourly/.greylistclean.insecure.deleteme  | 
        ||
| 12 | if test -f $OLDCRONJOB; then  | 
        ||
| 13 | echo "disabling old insecure $OLDCRONJOB"  | 
        ||
| 14 | echo "(renamed to $OLDCRONJOBREN)"  | 
        ||
| 15 | echo "See new cronjob in /etc/cron.d/greylistclean"  | 
        ||
| 53 | magnus | 16 | mv $OLDCRONJOB $OLDCRONJOBREN  | 
        
| 1 | magnus | 17 | fi  | 
        
| 18 | |||
| 19 | case "$1" in  | 
        ||
| 20 | configure)  | 
        ||
| 21 | if [ ! -e /var/spool/sa-exim ] ; then  | 
        ||
| 22 | # Debian-exim should exist as we depend on exim4-base  | 
        ||
| 67 | magnus | 23 | install -d -m770 -oDebian-exim -gDebian-exim \  | 
        
| 1 | magnus | 24 | /var/spool/sa-exim  | 
        
| 25 | fi  | 
        ||
| 67 | magnus | 26 | # Support for greylisting tuplets (written by default as Debian-exim by spamd)  | 
        
| 1 | magnus | 27 | if [ ! -e /var/spool/sa-exim/tuplets ] ; then  | 
        
| 67 | magnus | 28 | install -d -m770 -oDebian-exim -gDebian-exim \  | 
        
| 1 | magnus | 29 | /var/spool/sa-exim/tuplets  | 
        
| 67 | magnus | 30 | elif [ `stat -c "%U:%G" /var/spool/sa-exim/tuplets` = "nobody:Debian-exim" ] &&  | 
        
| 31 | dpkg --compare-versions "$2" lt-nl "4.2.1-14"; then  | 
        ||
| 32 | # If ownership is as before 4.2.1-14, give the Debian-exim  | 
        ||
| 33 | # group write permissions. Bug 563492.  | 
        ||
| 34 | chmod g+w /var/spool/sa-exim/tuplets  | 
        ||
| 1 | magnus | 35 | fi  | 
        
| 36 | # clean up temporary file generated by postrm uninstall  | 
        ||
| 37 | 	if [ -e "${LOCALSCANCONF}.rul" ] && \ | 
        ||
| 38 | 	   [ "`md5sum ${LOCALSCANCONF}.rul | cut -d\  -f1`" = "${DISABLELOCALSCANMD5}" ]; then | 
        ||
| 39 | 	   rm ${LOCALSCANCONF}.rul | 
        ||
| 40 | fi  | 
        ||
| 41 | if [ -x /etc/init.d/exim4 ]; then  | 
        ||
| 79 | magnus | 42 | if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then  | 
        
| 1 | magnus | 43 | invoke-rc.d exim4 reload || true  | 
        
| 44 | else  | 
        ||
| 45 | /etc/init.d/exim4 reload || true  | 
        ||
| 46 | fi  | 
        ||
| 47 | fi  | 
        ||
| 48 | ;;  | 
        ||
| 49 | |||
| 50 | esac  | 
        ||
| 51 | |||
| 52 | #DEBHELPER#  |