Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > contrib-release > by-pkgid > 45f3ae8265b951b73d2b2c3842e24848 > scriptlet

mailscanner-4.64.3_2-1mdv2008.1.noarch.rpm

PREUN

/bin/sh
if [ $1 = 0 ]; then
    # We are being deleted, not upgraded
    service MailScanner stop >/dev/null 2>&1
    chkconfig MailScanner off
    chkconfig --del MailScanner
fi
exit 0

POSTIN

/bin/sh

#Configure postfix via postconf
postconf -e "header_checks = regexp:/etc/postfix/header_checks"
echo "/^Received:/ HOLD" >> /etc/postfix/header_checks

# Create the incoming and quarantine dirs if needed
for F in incoming quarantine
do
  if [ \! -d /var/spool/MailScanner/$F ]; then
    mkdir -p /var/spool/MailScanner/$F
    chown postfix.postfix /var/spool/MailScanner/$F
    chmod 0700 /var/spool/MailScanner/$F
  fi
done
# Sort out the rc.d directories
# chkconfig --add MailScanner
[ ! -d /etc/rc.d/init/sendmail ] || chkconfig --level 2 sendmail off # To fix bug in some RedHat dist's

exit 0

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
    # We are being upgraded or replaced, not deleted
    echo 'To upgrade your MailScanner.conf and languages.conf files automatically, run'
    echo '    upgrade_MailScanner_conf'
    echo '    upgrade_languages_conf'
    #service MailScanner restart </dev/null >/dev/null 2>&1
fi
exit 0