#!/bin/sh

set -e

if [ -f /usr/share/debconf/confmodule ]; then
	. /usr/share/debconf/confmodule
fi


if [ "$1" = "purge" ]; then
		
	rm -f /etc/dbmail/dbmail.conf || true
	rm -f /etc/default/dbmail || true
	
	rmdir /etc/dbmail >/dev/null || true
	
	ucf --purge /etc/dbmail/dbmail.conf || true
	ucf --purge /etc/default/dbmail || true

        userdel dbmail 2>&1 > /dev/null || true

	db_purge || true
fi

#DEBHELPER#

exit 0
