#!/bin/sh
#
# $Id: logdaily.sh,v 4.4 1999/02/07 11:05:21 mj Exp $
#
# Daily log processing
#

# run logcheck
if [ -f /var/log/maillog.1.gz ]; then
    zcat /var/log/maillog.1.gz | /usr/pkg/lib/fidogate/bin/logcheck -n
    zcat /var/log/maillog.1.gz | /usr/pkg/lib/fidogate/bin/logcheck -r -m admin-logs
fi

# run logsendmail
if [ -f /var/log/maillog.1.gz ]; then
    zcat /var/log/maillog.1.gz | /usr/pkg/lib/fidogate/bin/logsendmail -m admin-logs
fi

# run logstat
if [ -f /var/log/fido/log-in.1.gz ]; then
    zcat /var/log/fido/log-in.1.gz \
    | /usr/pkg/lib/fidogate/bin/logstat -m admin-logs -t '(inbound)'
fi
if [ -f /var/log/fido/log-mail.1.gz ]; then
    zcat /var/log/fido/log-mail.1.gz \
    | /usr/pkg/lib/fidogate/bin/logstat -m admin-logs -t '(gateway output mail)'
fi
if [ -f /var/log/fido/log-news.1.gz ]; then
    zcat /var/log/fido/log-news.1.gz \
    | /usr/pkg/lib/fidogate/bin/logstat -m admin-logs -t '(gateway output news)'
fi

# run logreport
if [ -f /var/log/fido/log-in.1.gz ]; then
    zcat /var/log/fido/log-in.1.gz \
    | /usr/pkg/lib/fidogate/bin/logreport -n
fi
