2000-11-01 07:00:13 -05:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Created by: hetzels@westbend.net
|
|
|
|
|
|
|
|
#set -vx
|
|
|
|
|
|
|
|
PKG_BATCH=${BATCH:=NO}
|
|
|
|
|
|
|
|
PKG_PREFIX=${PKG_PREFIX:=/usr/local}
|
|
|
|
|
2001-12-20 07:18:57 -05:00
|
|
|
SASLDB_NAME=${PKG_PREFIX}/etc/%%SASLDB%%
|
|
|
|
|
2000-11-01 07:00:13 -05:00
|
|
|
# delete sasldb database
|
|
|
|
|
|
|
|
delete_sasldb() {
|
2002-01-17 10:04:40 -05:00
|
|
|
if [ -f ${SASLDB_NAME} ] ; then
|
|
|
|
if [ `${PKG_PREFIX}/sbin/sasldblistusers | wc -l` -eq 0 ] ; then
|
|
|
|
rm ${SASLDB_NAME}
|
|
|
|
else
|
|
|
|
echo "WARNING: Users SASL passwords are in ${SASLDB_NAME}, keeping this file"
|
|
|
|
fi
|
|
|
|
fi
|
2000-11-01 07:00:13 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
# This should really be uninstalled by Sendmail
|
|
|
|
|
|
|
|
sendmail_conf() {
|
|
|
|
if [ -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf ]; then
|
|
|
|
echo "pwcheck_method: pwcheck" > ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp
|
|
|
|
if cmp -s ${PKG_PREFIX}/lib/sasl/Sendmail.conf ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp; then
|
|
|
|
rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf
|
|
|
|
fi
|
|
|
|
rm -f ${PKG_PREFIX}/lib/sasl/Sendmail.conf.tmp
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
case $2 in
|
|
|
|
DEINSTALL)
|
|
|
|
delete_sasldb
|
|
|
|
sendmail_conf
|
|
|
|
;;
|
|
|
|
POST-DEINSTALL)
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|