diff options
author | Marc Haber <zugschlus@debian.org> | 2005-04-02 21:15:45 +0000 |
---|---|---|
committer | Marc Haber <zugschlus@debian.org> | 2005-04-02 21:15:45 +0000 |
commit | b2291277ab9ac8c8ce2fe647e12fbcc325ba62d4 (patch) | |
tree | 728bd78f469100cb66536686cafa771d4ceac1f8 /debian/exim4-base.cron.daily | |
download | exim4-4.14-0.5.tar.gz |
adapt tag name to svn scheme to allow better sorting4.14-0.5
svn path=/exim/tags/4.14-0.5/; revision=1013
Diffstat (limited to 'debian/exim4-base.cron.daily')
-rw-r--r-- | debian/exim4-base.cron.daily | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/debian/exim4-base.cron.daily b/debian/exim4-base.cron.daily new file mode 100644 index 0000000..9cc30b3 --- /dev/null +++ b/debian/exim4-base.cron.daily @@ -0,0 +1,27 @@ +#!/bin/sh + +# Only do anything if exim4 is actually installed +if [ ! -x /usr/lib/exim4/exim4 ]; then + exit 0 +fi + +# Uncomment the following lines to get daily e-mail reports +#if [ -x /usr/sbin/eximstats ]; then +# eximstats </var/log/exim4/mainlog \ +# | mail postmaster -s"$(hostname) Daily email activity report" +#fi + + +# run tidydb as mail:mail. +alias exim_tidydb_as_mail='start-stop-daemon --start --exec /usr/sbin/exim_tidydb --chuid mail:mail --' + +if [ -x /usr/sbin/exim_tidydb ]; then + cd /var/spool/exim4/db || exit 1 + for file in *; do + if echo $file | grep \\.lockfile >/dev/null 2>&1; then + : # skip lock files + else + exim_tidydb_as_mail /var/spool/exim4 $file >/dev/null + fi + done +fi |