pkgsrc/mail/qmail/INSTALL
schmonz 2cdc1d129b With the "viruscan" option, enable Russ Nelson's patch to SMTP-reject
messages with MIME attachments that match certain signatures, as
well as Jeremy Kitchen's patch that causes such rejections to be
logged.

Bump PKGREVISION.
2004-12-21 05:32:56 +00:00

77 lines
2 KiB
Text

# $NetBSD: INSTALL,v 1.4 2004/12/21 05:32:56 schmonz Exp $
DOCDIR=@DOCDIR@
EGDIR=@EGDIR@
QMAILDIR=@QMAILDIR@
QMAIL_QUEUE_DIR=@QMAIL_QUEUE_DIR@
QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
VIRUSCAN_SIGS_SRCFILE=@VIRUSCAN_SIGS_SRCFILE@
VAR_QMAIL_DIRS="alias bin boot control doc man queue users"
case ${STAGE} in
PRE-INSTALL)
for dir in $VAR_QMAIL_DIRS; do
if [ -e ${QMAILDIR}/$dir ]; then
${CAT} <<EOF
===========================================================================
ERROR: ${QMAILDIR} exists and is non-empty.
Please remove or rename it, then try again.
===========================================================================
EOF
exit 1
fi
done
if ${ECHO} ${QMAIL_QUEUE_DIR} | ${GREP} -q "^${QMAILDIR}/"; then
${CAT} <<EOF
===========================================================================
ERROR: QMAIL_QUEUE_DIR must not be under ${QMAILDIR}.
Please adjust your definition of QMAIL_QUEUE_DIR, then try again.
===========================================================================
EOF
exit 1
fi
${LN} -s ${PKG_SYSCONFDIR}/alias ${QMAILDIR}/alias
${LN} -s ${PREFIX}/bin ${QMAILDIR}/bin
${LN} -s ${EGDIR}/boot ${QMAILDIR}/boot
${LN} -s ${PKG_SYSCONFDIR}/control ${QMAILDIR}/control
${LN} -s ${DOCDIR} ${QMAILDIR}/doc
${LN} -s ${PREFIX}/man ${QMAILDIR}/man
${LN} -s ${QMAIL_QUEUE_DIR} ${QMAILDIR}/queue
${LN} -s ${PKG_SYSCONFDIR}/users ${QMAILDIR}/users
;;
POST-INSTALL)
if ! [ -z ${QMAIL_QUEUE_EXTRA} ]; then
${CAT} <<EOF
===========================================================================
NOTE: Before using qmail, create a .qmail file corresponding with the local
user or alias "${QMAIL_QUEUE_EXTRA}" that meets the requirements for
QUEUE_EXTRA.
===========================================================================
EOF
fi
if ! [ -z ${VIRUSCAN_SIGS_SRCFILE} ] && \
! [ -s ${PKG_SYSCONFDIR}/control/signatures ]; then
${SED} -e '1,15d' -e '34,$d' \
< ${VIRUSCAN_SIGS_SRCFILE} \
> ${PKG_SYSCONFDIR}/control/signatures
${CHMOD} 644 ${PKG_SYSCONFDIR}/control/signatures
fi
;;
esac