#! /bin/sh
###############################################################################
#
# $Id: postinst,v 1.4 1998/01/19 22:49:01 bcwhite Exp $
#
# postinst file for spamfilter
#

spamdbconfig=/etc/spamdb/config

convvar="CONVERTER"


# support for old spamdb package
if [ -r $spamdbconfig ]; then
    if grep -q CONVERTER=spamfilter $spamdbconfig; then
	if grep -q ^CONVERTER=spamfilter $spamdbconfig; then
	    other=true
	else
	    other=false
	fi
    else
	if grep -q ^CONVERTER $spamdbconfig; then
	    convvar="#$convvar"
	    other=true
	else
	    other=false
	fi
	echo "$convvar=spamfilter" >>$spamdbconfig
    fi
fi

killall -9 pattern-server >/dev/null 2>&1

echo "- To install a personal spamfilter, type 'spamfilter' on the command line."
