pkgsrc/mail/qmail-run/INSTALL

51 lines
1.6 KiB
Text
Raw Normal View History

QMAIL_QUEUE_EXTRA=@QMAIL_QUEUE_EXTRA@
psmsg='#
# This file was auto-generated by pkgsrc.'
case ${STAGE} in
POST-INSTALL)
cd ${LOCALBASE}/share/qmail/setup && ./config-fast `./hostname`
cd ${PKG_SYSCONFDIR}/alias && ${TOUCH} .qmail-postmaster .qmail-mailer-daemon .qmail-root
if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencypop3 ]; then
${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencypop3
${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencypop3
${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencypop3
fi
if ! [ -s ${PKG_SYSCONFDIR}/control/concurrencyincoming ]; then
${ECHO} 20 > ${PKG_SYSCONFDIR}/control/concurrencyincoming
${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/concurrencyincoming
${CHMOD} 644 ${PKG_SYSCONFDIR}/control/concurrencyincoming
fi
if ! [ -s ${PKG_SYSCONFDIR}/control/defaultdelivery ]; then
${ECHO} ./Mailbox > ${PKG_SYSCONFDIR}/control/defaultdelivery
${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/control/defaultdelivery
${CHMOD} 644 ${PKG_SYSCONFDIR}/control/defaultdelivery
fi
pop3rule=':allow'
smtprule='127.:allow,RELAYCLIENT=""'
for i in pop3 smtp; do
if ! [ -s ${PKG_SYSCONFDIR}/tcp.${i} ]; then
${ECHO} "$psmsg" > ${PKG_SYSCONFDIR}/tcp.${i}
eval ${ECHO} \"\$${i}rule\" > ${PKG_SYSCONFDIR}/tcp.${i}
fi
${CHMOD} 644 ${PKG_SYSCONFDIR}/tcp.${i}
${LOCALBASE}/bin/tcprules ${PKG_SYSCONFDIR}/tcp.${i}.cdb ${PKG_SYSCONFDIR}/tcp.${i}.tmp < ${PKG_SYSCONFDIR}/tcp.${i}
${CHMOD} 644 ${PKG_SYSCONFDIR}/tcp.${i}.cdb
done
if ! [ -z ${QMAIL_QUEUE_EXTRA} ]; then
${ECHO} "$psmsg" >> ${PKG_SYSCONFDIR}/alias/.qmail-${QMAIL_QUEUE_EXTRA}
${CHMOD} 644 ${PKG_SYSCONFDIR}/alias/.qmail-${QMAIL_QUEUE_EXTRA}
fi
;;
esac