#!/bin/sh cd / SPOOLDIR="$(/usr/bin/exim -bP spool_directory | /bin/sed 's/.*=[[:space:]]\(.*\)/\1/')" [ ! -d "$SPOOLDIR" ] && echo "Spooldir [$SPOOLDIR] is not a directory" && exit 1 for db in $(/usr/bin/find $SPOOLDIR/db -maxdepth 1 -name '*.lockfile' -or -type f -printf '%f\n'); do t= case "$db" in callout) t="-t 3d" ;; *) ;; esac /usr/bin/exim_tidydb $t $SPOOLDIR $db > /dev/null done exit 0