#!/bin/sh
# Run the Smail error checking script and rotate the logfiles.
# We have to rotate the logs as root as otherwise we can't fix the
# timestamps, and so we might as well add the checkerr script here
# too.
cd /tmp
su mail -c /usr/lib/smail/checkerr

set -e
cd /var/log/smail
savelog -c 7 logfile paniclog >/dev/null
