1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-19 03:52:17 +00:00
freebsd-ports/security/amavis-perl/pkg-deinstall
Will Andrews 3d01a083e9 Add amavis-perl 10, a mail virus scanner (uses external antivirus).
PR:		23978
Submitted by:	Roman Shterenzon <roman@xpert.com>
2001-01-07 07:38:32 +00:00

29 lines
814 B
Bash

#!/bin/sh
# $FreeBSD$
prefix=/usr/local
PATH="/bin:/usr/bin"
if [ "$2" != "POST-DEINSTALL" ]; then
exit 0
fi
if [ -f /etc/sendmail.cf.pre-amavis ]; then
CFG=/etc
elif [ -f /etc/mail/sendmail.cf.pre-amavis ]; then
CFG=/etc/mail
else
echo "No sendmail.cf.pre-amavis found, are you sure that amavis was installed?"
exit 1
fi
rm -f ${CFG}/sendmail.cf
rm -f ${CFG}/sendmail.orig.cf
mv ${CFG}/sendmail.cf.pre-amavis ${CFG}/sendmail.cf
sed /^virusalert/d ${CFG}/aliases > ${CFG}/aliases.tmp
mv ${CFG}/aliases.tmp ${CFG}/aliases
newaliases
rmdir /var/spool/mqamavis 2>/dev/null || echo "You may wish to inspect /var/spool/mqamavis directory by yourself and remove it"
rmdir /var/spool/quarantine 2>/dev/null || echo "You may wish to inspect /var/spool/quarantine directory by yourself and remove it"
exit 0