#!/bin/sh
set -e

# Source debconf library.
if [ -f /usr/share/debconf/confmodule ]
then
	. /usr/share/debconf/confmodule
fi

case "$1" in
	remove)
		if [ `which squirrelmail-configure` ]
		then
			squirrelmail-configure --remove-plugin avelsieve
		fi
		db_input high avelsieve/no_purge || true
		db_go || true
	;;
	purge)
		rm -f /var/lib/squirrelmail/data/*.sievesource
	;;
	*)
	;;
esac

#DEBHELPER#

exit 0
