diff options
author | Jonas <dr@jones.dk> | 2012-10-08 19:09:11 +0200 |
---|---|---|
committer | Jonas <dr@jones.dk> | 2012-10-08 19:09:11 +0200 |
commit | 69030d4bee0eaac396d8744905edf7dc6695f798 (patch) | |
tree | 97ea0c522c4dae0d10f832a88953c1789fe76784 | |
parent | 32467d3debad9f6a64cd5d86067e6e12cc48be45 (diff) |
Add pflogsumm cronjobs.
-rwxr-xr-x | postfix/cron.daily/00local-pflogsumm | 10 | ||||
-rwxr-xr-x | postfix/cron.weekly/00local-pflogsumm | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/postfix/cron.daily/00local-pflogsumm b/postfix/cron.daily/00local-pflogsumm new file mode 100755 index 0000000..7eca532 --- /dev/null +++ b/postfix/cron.daily/00local-pflogsumm @@ -0,0 +1,10 @@ +#!/bin/sh +# +# Debian pflogsumm daily cron script +# +# This script analyses the logfile for statistics and problems. +# + +if [ -x /usr/sbin/pflogsumm ]; then + (cat /var/log/mail.log.1 /var/log/mail.log) | /usr/sbin/pflogsumm -d yesterday --problems_first +fi diff --git a/postfix/cron.weekly/00local-pflogsumm b/postfix/cron.weekly/00local-pflogsumm new file mode 100755 index 0000000..10206c2 --- /dev/null +++ b/postfix/cron.weekly/00local-pflogsumm @@ -0,0 +1,10 @@ +#!/bin/sh +# +# Debian pflogsumm weekly cron script +# +# This script analyses the logfile for statistics and problems. +# + +if [ -x /usr/sbin/pflogsumm ]; then + for i in $(seq 8 -1 2); do zcat /var/log/mail.log.$i.gz; done | /usr/sbin/pflogsumm --problems_first +fi |