#!/bin/bash
# Created by Derrick Rose

TMPFILE=/tmp/eximstats.log
LOGFILE=/var/log/exim4/mainlog
DATE=`date +%Y-%m-%d`
EMAIL=YOUR_EMAIL_ADDRESS_HERE

## Full Log file output
eximstats -ne -nr -nt $LOGFILE > $TMPFILE

## Per day log file output
#fgrep $DATE $LOGFILE | eximstats > $TMPFILE

## Put script to sleep for 3 seconds
sleep 3

## Mail Stats
mail -s "OUT Mail Statistics" $EMAIL < $TMPFILE

Comments:

Leave a Reply



(Your email will not be publicly displayed.)

Please type the letters and numbers shown in the image.Captcha Code