- # sendmail?
- if grep -q $PKG $sendmail_mc $submit_mc 2>&- || \
- grep -q '^amavis$' $ct_file 2>&- ; then
- echo "Removing sendmail configuration for ${PKG}... "
- cp-update -r -c dnl $PKG $sendmail_mc >&-
- cp-update -r -c dnl $PKG $submit_mc >&-
- grep -v '^amavis$' $ct_file > ${ct_file}.dpkg-tmp.$$ || true
- cp_mv ${ct_file}.dpkg-tmp.$$ $ct_file
- make -C /etc/mail 2>&1 | grep -v 'issue .*/etc/init.d/sendmail reload' 1>&2 || true
- echo "Removed sendmail configuration for ${PKG}."
- if pgrep -u root -f 'sendmail: MTA: accepting connections' >&- ; then
- /etc/init.d/sendmail reload
- if ! pgrep -u root -f 'sendmail: MTA: accepting connections' >&- ; then
- echo 'CN: Something bad happened to sendmail on reload!' 1>&2
- exit 1
- fi
- # Everything went well, apparently. Remove old backup files.
- rm -f $sendmail_cf.$PKG
- rm -f $sendmail_mc.$PKG
- rm -f $submit_mc.$PKG
- fi
- fi
- # postfix?