#!/bin/sh

# Uncomment the following lines to get daily e-mail reports
#if [ -x /usr/sbin/eximstats ]; then
#  eximstats </var/log/exim/mainlog \
#                    | mail postmaster -s"$(hostname) Daily email activity report"
#fi

# Cycle logs
if [ -x /usr/bin/savelog ]; then
  for i in mainlog rejectlog paniclog; do
    if [ -e /var/log/exim/$i ]; then
      savelog -p -c 10 /var/log/exim/$i >/dev/null
    fi
  done
fi
